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 #ifndef CXFCOLORSPECIFICATION_H
9 #define CXFCOLORSPECIFICATION_H
10 
11 #include <QDomDocument>
12 #include <QSharedPointer>
13 #include <QString>
14 
15 #include "cxfmeasurementspec.h"
16 #include "cxftristimulusspec.h"
17 
18 class CxfColorSpecification
19 {
20 public:
21 	CxfColorSpecification();
22 
id()23 	const QString& id() const { return m_id; }
24 
hasMeasurementSpec()25 	bool hasMeasurementSpec() const { return m_hasMeasurementSpec; }
hasTristimulusSpec()26 	bool hasTristimulusSpec() const { return m_hasTristimulusSpec; }
hasWavelengthRange()27 	bool hasWavelengthRange() const { return m_measurementSpec.hasWavelengthRange(); }
28 
measurementSpec()29 	const CxfMeasurementSpec& measurementSpec() const { return m_measurementSpec; }
tristimulusSpec()30 	const CxfTristimulusSpec& tristimulusSpec() const { return m_tristimulusSpec; }
31 
32 	bool isValid() const;
33 	bool parse(QDomElement& elem);
34 
35 	void reset();
36 
37 protected:
38 	QString m_id;
39 
40 	bool m_hasMeasurementSpec;
41 	bool m_hasTristimulusSpec;
42 
43 	CxfMeasurementSpec m_measurementSpec;
44 	CxfTristimulusSpec m_tristimulusSpec;
45 };
46 
47 typedef QSharedPointer<CxfColorSpecification> CxfColorSpecificationShPtr;
48 
49 #endif
50