Back to index

scribus-ng  1.3.4.dfsg+svn20071115
cmsettings.cpp
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008  *   Copyright (C) 2006 by Craig Bradney                                   *
00009  *   mrb@scribus.info                                                      *
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  *   This program is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00019  *   GNU General Public License for more details.                          *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU General Public License     *
00022  *   along with this program; if not, write to the                         *
00023  *   Free Software Foundation, Inc.,                                       *
00024  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00025  ***************************************************************************/
00026 
00027 #include "cmsettings.h"
00028 #include "scribusdoc.h"
00029 
00030 CMSettings::CMSettings(ScribusDoc* doc, const QString& profileName, int intent) :
00031 m_Doc(doc),
00032 m_ProfileName(profileName), 
00033 m_Intent(intent)
00034 {
00035 }
00036 
00037 CMSettings::~CMSettings()
00038 {
00039 }
00040 
00041 bool CMSettings::useColorManagement() const
00042 {
00043        if (m_Doc)
00044               return m_Doc->HasCMS;
00045        return false;
00046 }
00047 
00048 QString CMSettings::defaultMonitorProfile() const
00049 {
00050        if (m_Doc)
00051               return m_Doc->CMSSettings.DefaultMonitorProfile;
00052        return QString();
00053 }
00054 
00055 QString CMSettings::defaultPrinterProfile() const
00056 {
00057        if (m_Doc)
00058               return m_Doc->CMSSettings.DefaultPrinterProfile;
00059        return QString();
00060 }
00061 
00062 QString CMSettings::defaultImageRGBProfile() const
00063 {
00064        if (m_Doc)
00065               return m_Doc->CMSSettings.DefaultImageRGBProfile;
00066        return QString();
00067 }
00068 
00069 QString CMSettings::defaultImageCMYKProfile() const
00070 {
00071        if (m_Doc)
00072               return m_Doc->CMSSettings.DefaultImageCMYKProfile;
00073        return QString();
00074 }
00075 
00076 QString CMSettings::defaultSolidColorRGBProfile() const
00077 {
00078        if (m_Doc)
00079               return m_Doc->CMSSettings.DefaultSolidColorRGBProfile;
00080        return QString();
00081 }
00082 
00083 QString CMSettings::defaultSolidColorCMYKProfile() const
00084 {
00085        if (m_Doc)
00086               return m_Doc->CMSSettings.DefaultSolidColorCMYKProfile;
00087        return QString();
00088 }
00089 
00090 int CMSettings::colorRenderingIntent() const
00091 {
00092        if (m_Doc)
00093               return m_Doc->IntentColors;
00094        return 1; // Use relative colorimetric by default
00095 }
00096 
00097 int CMSettings::imageRenderingIntent() const
00098 {
00099        if (m_Doc)
00100               return m_Doc->IntentImages;
00101        return 0; // Use perceptual by default
00102 }
00103 
00104 bool CMSettings::useBlackPoint() const
00105 {
00106        if (m_Doc)
00107               return m_Doc->CMSSettings.BlackPoint;
00108        return false;
00109 }
00110 
00111 bool CMSettings::doSoftProofing() const
00112 {
00113        if (m_Doc)
00114               return m_Doc->CMSSettings.SoftProofOn;
00115        return false;
00116 }
00117 
00118 bool CMSettings::doGamutCheck() const
00119 {
00120        if (m_Doc)
00121               return m_Doc->CMSSettings.GamutCheck;
00122        return false;
00123 }
00124 
00125 cmsHPROFILE CMSettings::monitorProfile() const
00126 {
00127        if (m_Doc->HasCMS)
00128               return m_Doc->DocOutputProf;
00129        return NULL;
00130 }
00131 
00132 cmsHPROFILE CMSettings::printerProfile() const
00133 {
00134        if (m_Doc->HasCMS)
00135               return m_Doc->DocPrinterProf;
00136        return NULL;
00137 }
00138 
00139 cmsHTRANSFORM CMSettings::rgbColorDisplayTransform() const  // stdTransRGBMonG
00140 {
00141        if (m_Doc->HasCMS)
00142               return m_Doc->stdTransRGBMon;
00143        return NULL;
00144 }
00145 
00146 cmsHTRANSFORM CMSettings::rgbColorProofingTransform() const  // stdProofG
00147 {
00148        if (m_Doc->HasCMS)
00149               return m_Doc->stdProof;
00150        return NULL;
00151 }
00152 
00153 cmsHTRANSFORM CMSettings::rgbImageDisplayTransform() const   // stdTransImgG
00154 {
00155        if (m_Doc->HasCMS)
00156               return m_Doc->stdTransImg;
00157        return NULL;
00158 }
00159 
00160 cmsHTRANSFORM CMSettings::rgbImageProofingTransform() const  // stdProofImgG
00161 {
00162        if (m_Doc->HasCMS)
00163               return m_Doc->stdProofImg;
00164        return NULL;
00165 }
00166 
00167 cmsHTRANSFORM CMSettings::rgbToCymkColorTransform() const // stdTransCMYKG
00168 {
00169        if (m_Doc->HasCMS)
00170               return m_Doc->stdTransCMYK;
00171        return NULL;
00172 }
00173 
00174 cmsHTRANSFORM CMSettings::rgbGamutCheckTransform() const // stdProofGCG
00175 {
00176        if (m_Doc->HasCMS)
00177               return m_Doc->stdProofGC;
00178        return NULL;
00179 }
00180 
00181 cmsHTRANSFORM CMSettings::cmykColorDisplayTransform() const // stdTransCMYKMonG
00182 {
00183        if (m_Doc->HasCMS)
00184               return m_Doc->stdTransCMYKMon;
00185        return NULL;
00186 }
00187 
00188 cmsHTRANSFORM CMSettings::cmykColorProofingTransform() const // stdProofCMYKG
00189 {
00190        if (m_Doc->HasCMS)
00191               return m_Doc->stdProofCMYK;
00192        return NULL;
00193 }
00194 
00195 cmsHTRANSFORM CMSettings::cmykToRgbColorTransform() const  // stdTransRGBG
00196 {
00197        if (m_Doc->HasCMS)
00198               return m_Doc->stdTransRGB;
00199        return NULL;
00200 }
00201 
00202 cmsHTRANSFORM CMSettings::cmykGamutCheckTransform() const //stdProofCMYKGCG
00203 {
00204        if (m_Doc->HasCMS)
00205               return m_Doc->stdProofCMYKGC;
00206        return NULL;
00207 }