Rev 23489 | Rev 23516 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14152 | jghali | 1 | /* |
2 | For general Scribus (>=1.3.2) copyright and licensing information please refer |
||
3 | to the COPYING file provided with the program. Following this notice may exist |
||
4 | a copyright and/or license notice that predates the release of Scribus 1.3.2 |
||
5 | for which a new license (GPL+exception) is in place. |
||
6 | */ |
||
7 | |||
8 | #ifndef SCCOLORPROFILE_H |
||
9 | #define SCCOLORPROFILE_H |
||
10 | |||
11 | #include <QSharedPointer> |
||
14217 | jghali | 12 | #include <QWeakPointer> |
23489 | jghali | 13 | |
14170 | jghali | 14 | #include "scribusapi.h" |
14152 | jghali | 15 | #include "sccolorprofiledata.h" |
16 | |||
14170 | jghali | 17 | class SCRIBUS_API ScColorProfile |
14152 | jghali | 18 | { |
14217 | jghali | 19 | friend class ScColorProfileCache; |
20 | |||
14152 | jghali | 21 | public: |
22 | ScColorProfile(); |
||
23 | ScColorProfile(ScColorProfileData*); |
||
14217 | jghali | 24 | ScColorProfile(const QSharedPointer<ScColorProfileData>&); |
14152 | jghali | 25 | |
14491 | jghali | 26 | ScColorMgmtEngine& engine() { return m_data->engine(); } |
27 | const ScColorMgmtEngine& engine() const { return m_data->engine(); } |
||
14152 | jghali | 28 | |
29 | inline bool isNull() const { return (m_data.isNull() || m_data->isNull()); } |
||
30 | inline operator bool () const { return !isNull(); } |
||
31 | |||
23489 | jghali | 32 | bool isSuitableForOutput() const; |
33 | |||
14152 | jghali | 34 | QString profilePath() const; |
35 | QString productDescription() const; |
||
36 | |||
14772 | jghali | 37 | eColorSpaceType colorSpace() const; |
38 | eProfileClass deviceClass() const; |
||
14152 | jghali | 39 | |
40 | const ScColorProfileData* data() const { return m_data.data(); } |
||
23489 | jghali | 41 | QString dataHash() const; |
14170 | jghali | 42 | |
23515 | jghali | 43 | bool save(QByteArray& profileData) const; |
44 | |||
14170 | jghali | 45 | bool operator==(const ScColorProfile& prof) const; |
14152 | jghali | 46 | |
47 | protected: |
||
48 | QSharedPointer<ScColorProfileData> m_data; |
||
14217 | jghali | 49 | |
50 | QWeakPointer<ScColorProfileData> weakRef() const { return m_data.toWeakRef(); } |
||
51 | QSharedPointer<ScColorProfileData> strongRef() const { return m_data; } |
||
14152 | jghali | 52 | }; |
53 | |||
54 | #endif |