Subversion Repositories Scribus

Rev

Rev 23489 | 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
#include "sccolorprofile.h"
9
 
22598 craig 10
ScColorProfile::ScColorProfile() : m_data(nullptr)
14152 jghali 11
{
12
}
13
 
14
ScColorProfile::ScColorProfile(ScColorProfileData* data) : m_data(data)
15
{
16
}
17
 
14217 jghali 18
ScColorProfile::ScColorProfile(const QSharedPointer<ScColorProfileData>& data) : m_data(data)
19
{
20
}
21
 
14772 jghali 22
eColorSpaceType ScColorProfile::colorSpace() const
14152 jghali 23
{
14179 jghali 24
        if (m_data)
25
                return m_data->colorSpace();
14772 jghali 26
        return ColorSpace_Unknown;
14152 jghali 27
}
28
 
14772 jghali 29
eProfileClass ScColorProfile::deviceClass() const
14152 jghali 30
{
14179 jghali 31
        if (m_data)
32
                return m_data->deviceClass();
14772 jghali 33
        return Class_Unknown;
14152 jghali 34
}
35
 
23489 jghali 36
QString ScColorProfile::dataHash() const
37
{
38
        if (m_data)
39
                return m_data->dataHash();
40
        return QString();
41
}
42
 
43
bool ScColorProfile::isSuitableForOutput() const
44
{
45
        if (m_data)
46
                return m_data->isSuitableForOutput();
47
        return false;
48
}
49
 
14152 jghali 50
QString ScColorProfile::profilePath() const
51
{
14179 jghali 52
        if (m_data)
53
                return m_data->path();
54
        return QString();
14152 jghali 55
}
56
 
57
QString ScColorProfile::productDescription() const
58
{
14179 jghali 59
        if (m_data)
60
                return m_data->productDescription();
61
        return QString();
14170 jghali 62
}
63
 
23515 jghali 64
bool ScColorProfile::save(QByteArray& profileData) const
65
{
66
        if (m_data)
67
                return m_data->save(profileData);
68
        return false;
69
}
70
 
14170 jghali 71
bool ScColorProfile::operator==(const ScColorProfile& other) const
72
{
73
        return m_data == other.m_data;
22598 craig 74
}