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 #include "sccolorprofile.h" 9 ScColorProfile()10ScColorProfile::ScColorProfile() : m_data(nullptr) 11 { 12 } 13 ScColorProfile(ScColorProfileData * data)14ScColorProfile::ScColorProfile(ScColorProfileData* data) : m_data(data) 15 { 16 } 17 ScColorProfile(const QSharedPointer<ScColorProfileData> & data)18ScColorProfile::ScColorProfile(const QSharedPointer<ScColorProfileData>& data) : m_data(data) 19 { 20 } 21 colorSpace() const22eColorSpaceType ScColorProfile::colorSpace() const 23 { 24 if (m_data) 25 return m_data->colorSpace(); 26 return ColorSpace_Unknown; 27 } 28 connectionSpace() const29eColorSpaceType ScColorProfile::connectionSpace() const 30 { 31 if (m_data) 32 return m_data->connectionSpace(); 33 return ColorSpace_Unknown; 34 } 35 deviceClass() const36eProfileClass ScColorProfile::deviceClass() const 37 { 38 if (m_data) 39 return m_data->deviceClass(); 40 return Class_Unknown; 41 } 42 channelsOfColorSpace() const43int ScColorProfile::channelsOfColorSpace() const 44 { 45 if (m_data) 46 return m_data->channelsOfColorSpace(); 47 return 0; 48 } 49 channelsOfConnectionSpace() const50int ScColorProfile::channelsOfConnectionSpace() const 51 { 52 if (m_data) 53 return m_data->channelsOfConnectionSpace(); 54 return 0; 55 } 56 dataHash() const57QString ScColorProfile::dataHash() const 58 { 59 if (m_data) 60 return m_data->dataHash(); 61 return QString(); 62 } 63 isSuitableForOutput() const64bool ScColorProfile::isSuitableForOutput() const 65 { 66 if (m_data) 67 return m_data->isSuitableForOutput(); 68 return false; 69 } 70 profilePath() const71QString ScColorProfile::profilePath() const 72 { 73 if (m_data) 74 return m_data->path(); 75 return QString(); 76 } 77 productDescription() const78QString ScColorProfile::productDescription() const 79 { 80 if (m_data) 81 return m_data->productDescription(); 82 return QString(); 83 } 84 save(QByteArray & profileData) const85bool ScColorProfile::save(QByteArray& profileData) const 86 { 87 if (m_data) 88 return m_data->save(profileData); 89 return false; 90 } 91 operator ==(const ScColorProfile & other) const92bool ScColorProfile::operator==(const ScColorProfile& other) const 93 { 94 return m_data == other.m_data; 95 } 96