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  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *
25  ***************************************************************************/
26 
27 #ifndef CMSETTINGS_H
28 #define CMSETTINGS_H
29 
30 #include "scconfig.h"
31 #include "scribusapi.h"
32 #include <QString>
33 class ScribusDoc;
34 
35 #include "colormgmt/sccolormgmtengine.h"
36 
37 class SCRIBUS_API CMSettings
38 {
39 	public:
40 		CMSettings(ScribusDoc* doc, const QString& profileName, eRenderIntent intent);
41 		~CMSettings();
42 
doc()43 		ScribusDoc* doc() const {return m_Doc;}
profileName()44 		QString profileName() const {return m_ProfileName;}
intent()45 		eRenderIntent intent() const { return m_Intent; }
46 
colorManagementAllowed()47 		bool colorManagementAllowed() const { return m_colorManagementAllowed; }
allowColorManagement(bool allowed)48 		void allowColorManagement(bool allowed) { m_colorManagementAllowed = allowed; }
49 
softProofingAllowed()50 		bool softProofingAllowed() const { return m_softProofingAllowed; }
allowSoftProofing(bool allowed)51 		void allowSoftProofing(bool allowed) { m_softProofingAllowed = allowed; }
52 
useEmbeddedProfile()53 		bool useEmbeddedProfile() const { return m_useEmbeddedProfile; }
setUseEmbeddedProfile(bool useEmbedded)54 		void setUseEmbeddedProfile(bool useEmbedded) { m_useEmbeddedProfile = useEmbedded; }
55 
useOutputProfile()56 		bool useOutputProfile() const { return !m_outputProfile.isNull(); }
setOutputProfile(const ScColorProfile & prof)57 		void setOutputProfile(const ScColorProfile& prof) { m_outputProfile = prof; }
58 
59 		bool useColorManagement() const;
60 
61 		QString defaultMonitorProfile() const;
62 		QString defaultPrinterProfile() const;
63 		QString defaultImageRGBProfile() const;
64 		QString defaultImageCMYKProfile() const;
65 		QString defaultSolidColorRGBProfile() const;
66 		QString defaultSolidColorCMYKProfile() const;
67 
68 		eRenderIntent colorRenderingIntent() const;
69 		eRenderIntent imageRenderingIntent() const;
70 
71 		bool useBlackPoint() const;
72 		bool doSoftProofing() const;
73 		bool doGamutCheck() const;
74 
75 		ScColorProfile monitorProfile() const;
76 		ScColorProfile printerProfile() const;
77 		ScColorProfile outputProfile() const;
78 
79 		ScColorTransform rgbColorDisplayTransform() const;   // stdTransRGBMonG
80 		ScColorTransform rgbColorProofingTransform() const;  // stdProofG
81 		ScColorTransform rgbImageDisplayTransform() const;   // stdTransImgG
82 		ScColorTransform rgbImageProofingTransform() const;  // stdProofImgG
83 		ScColorTransform rgbToCymkColorTransform() const;    // stdTransCMYKG
84 		ScColorTransform rgbGamutCheckTransform() const;     // stdProofGCG
85 
86 		ScColorTransform cmykColorDisplayTransform() const;  // stdTransCMYKMonG
87 		ScColorTransform cmykColorProofingTransform() const; // stdProofCMYKG
88 		ScColorTransform cmykImageProofingTransform() const; // stdProofImgCMYK
89 		ScColorTransform cmykToRgbColorTransform() const;    // stdTransRGBG
90 		ScColorTransform cmykGamutCheckTransform() const;    //stdProofCMYKGCG
91 
92 	private:
93 		ScribusDoc*    m_Doc;
94 		bool           m_colorManagementAllowed {true};
95 		bool           m_softProofingAllowed {false};
96 		bool           m_useEmbeddedProfile {false};
97 		QString        m_ProfileName;
98 		eRenderIntent  m_Intent;
99 		ScColorProfile m_outputProfile;
100 };
101 
102 #endif
103