Subversion Repositories Scribus

Rev

Rev 5792 | Rev 5940 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5783 cbradney 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
 *   Copyright (C) 2006 by Craig Bradney                                   *
9
 *   mrb@scribus.info                                                      *
10
 *                                                                         *
11
 *   This program is free software; you can redistribute it and/or modify  *
12
 *   it under the terms of the GNU General Public License as published by  *
13
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 *   (at your option) any later version.                                   *
15
 *                                                                         *
16
 *   This program is distributed in the hope that it will be useful,       *
17
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
18
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
19
 *   GNU General Public License for more details.                          *
20
 *                                                                         *
21
 *   You should have received a copy of the GNU General Public License     *
22
 *   along with this program; if not, write to the                         *
23
 *   Free Software Foundation, Inc.,                                       *
24
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
25
 ***************************************************************************/
26
 
27
#include "cmsettings.h"
28
#include "scribusdoc.h"
29
 
30
CMSettings::CMSettings(ScribusDoc* doc, const QString& profileName) :
31
m_Doc(doc),
32
m_ProfileName(profileName)
33
{
34
}
35
 
36
CMSettings::~CMSettings()
37
{
38
}
5788 jghali 39
 
40
bool CMSettings::useColorManagement() const
41
{
5813 jghali 42
        if (m_Doc)
5792 jghali 43
                return m_Doc->CMSSettings.CMSinUse;
44
        return false;
5813 jghali 45
}
46
 
47
QString CMSettings::defaultMonitorProfile()
48
{
49
        if (m_Doc)
50
                return m_Doc->CMSSettings.DefaultMonitorProfile;
51
        return QString();
52
}
53
 
54
QString CMSettings::defaultPrinterProfile()
55
{
56
        if (m_Doc)
57
                return m_Doc->CMSSettings.DefaultPrinterProfile;
58
        return QString();
59
}
60
 
61
QString CMSettings::defaultImageRGBProfile()
62
{
63
        if (m_Doc)
64
                return m_Doc->CMSSettings.DefaultImageRGBProfile;
65
        return QString();
66
}
67
 
68
QString CMSettings::defaultImageCMYKProfile()
69
{
70
        if (m_Doc)
71
                return m_Doc->CMSSettings.DefaultImageCMYKProfile;
72
        return QString();
73
}
74
 
75
QString CMSettings::defaultSolidColorRGBProfile()
76
{
77
        if (m_Doc)
78
                return m_Doc->CMSSettings.DefaultSolidColorRGBProfile;
79
        return QString();
80
}
81
 
82
QString CMSettings::defaultSolidColorCMYKProfile()
83
{
84
        if (m_Doc)
85
                return m_Doc->CMSSettings.DefaultSolidColorCMYKProfile;
86
        return QString();
87
}
88
 
89
int CMSettings::colorRenderingIntent() const
90
{
91
        if (m_Doc)
92
                return m_Doc->IntentColors;
93
        return -1;
94
}
95
 
96
int CMSettings::imageRenderingIntent() const
97
{
98
        if (m_Doc)
99
                return m_Doc->IntentImages;
100
        return -1;
101
}
102
 
103
bool CMSettings::useBlackPoint() const
104
{
105
        if (m_Doc)
106
                return m_Doc->CMSSettings.BlackPoint;
5788 jghali 107
        return false;
108
}
109
 
5813 jghali 110
bool CMSettings::doSoftProofing() const
111
{
112
        if (m_Doc)
113
                return m_Doc->CMSSettings.SoftProofOn;
114
        return false;
115
}
116
 
117
bool CMSettings::doGamutCheck() const
118
{
119
        if (m_Doc)
120
                return m_Doc->CMSSettings.GamutCheck;
121
        return false;
122
}
123
 
5788 jghali 124
#ifdef HAVE_CMS
125
cmsHPROFILE CMSettings::monitorProfile() const
126
{
5813 jghali 127
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 128
                return m_Doc->DocOutputProf;
129
        return NULL;
130
}
131
 
132
cmsHPROFILE CMSettings::printerProfile() const
133
{
5813 jghali 134
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 135
                return m_Doc->DocPrinterProf;
136
        return NULL;
137
}
138
 
139
cmsHTRANSFORM CMSettings::rgbColorDisplayTransform() const  // stdTransRGBMonG
140
{
5813 jghali 141
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 142
                return m_Doc->stdTransRGBMon;
143
        return NULL;
144
}
145
 
146
cmsHTRANSFORM CMSettings::rgbColorProofingTransform() const  // stdProofG
147
{
5813 jghali 148
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 149
                return m_Doc->stdProof;
150
        return NULL;
151
}
152
 
153
cmsHTRANSFORM CMSettings::rgbImageDisplayTransform() const   // stdTransImgG
154
{
5813 jghali 155
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 156
                return m_Doc->stdTransImg;
157
        return NULL;
158
}
159
 
160
cmsHTRANSFORM CMSettings::rgbImageProofingTransform() const  // stdProofImgG
161
{
5813 jghali 162
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 163
                return m_Doc->stdProofImg;
164
        return NULL;
165
}
166
 
167
cmsHTRANSFORM CMSettings::rgbToCymkColorTransform() const // stdTransCMYKG
168
{
5813 jghali 169
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 170
                return m_Doc->stdTransCMYK;
171
        return NULL;
172
}
173
 
174
cmsHTRANSFORM CMSettings::rgbGamutCheckTransform() const // stdProofGCG
175
{
5813 jghali 176
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 177
                return m_Doc->stdProofGC;
178
        return NULL;
179
}
180
 
181
cmsHTRANSFORM CMSettings::cmykColorDisplayTransform() const // stdTransCMYKMonG
182
{
5813 jghali 183
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 184
                return m_Doc->stdTransCMYKMon;
185
        return NULL;
186
}
187
 
188
cmsHTRANSFORM CMSettings::cmykColorProofingTransform() const // stdProofCMYKG
189
{
5813 jghali 190
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 191
                return m_Doc->stdProofCMYK;
192
        return NULL;
193
}
194
 
195
cmsHTRANSFORM CMSettings::cmykToRgbColorTransform() const  // stdTransRGBG
196
{
5813 jghali 197
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 198
                return m_Doc->stdTransRGB;
199
        return NULL;
200
}
201
 
202
cmsHTRANSFORM CMSettings::cmykGamutCheckTransform() const //stdProofCMYKGCG
203
{
5813 jghali 204
        if (m_Doc->CMSSettings.CMSinUse)
5788 jghali 205
                return m_Doc->stdProofCMYKGC;
206
        return NULL;
207
}
208
 
209
#endif