krita
kis_profile.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KIS_PROFILE_H
00023 #define KIS_PROFILE_H
00024
00025 #include <config.h>
00026
00027 #include LCMS_HEADER
00028
00029 #include <qvaluevector.h>
00030 #include <qcstring.h>
00031
00032 #include <kio/job.h>
00033
00034 #include <kis_annotation.h>
00035
00036
00037
00038
00039 class KisProfile {
00040
00041 public:
00042 KisProfile(QByteArray rawData);
00043 KisProfile(const QString& file);
00044 KisProfile(const cmsHPROFILE profile);
00045
00046 virtual ~KisProfile();
00047
00048 virtual bool load();
00049 virtual bool save();
00050
00051 inline icColorSpaceSignature colorSpaceSignature() const { return m_colorSpaceSignature; }
00052 inline icProfileClassSignature deviceClass() const { return m_deviceClass; }
00053 inline QString productName() const { return m_productName; }
00054 inline QString productDescription() const { return m_productDescription; }
00055 inline QString productInfo() const { return m_productInfo; }
00056 inline QString manufacturer() const { return m_manufacturer; }
00057 cmsHPROFILE profile();
00058
00059 KisAnnotationSP annotation() const;
00060
00061 friend inline bool operator==( const KisProfile &, const KisProfile & );
00062
00063 inline bool valid() const { return m_valid; };
00064
00065 inline bool isSuitableForOutput() { return m_suitableForOutput; };
00066
00067 inline QString filename() const { return m_filename; }
00068
00069 public:
00070
00071 static KisProfile * getScreenProfile(int screen = -1);
00072
00073 private:
00074 bool init();
00075
00076 cmsHPROFILE m_profile;
00077 icColorSpaceSignature m_colorSpaceSignature;
00078 icProfileClassSignature m_deviceClass;
00079 QString m_productName;
00080 QString m_productDescription;
00081 QString m_productInfo;
00082 QString m_manufacturer;
00083
00084 QByteArray m_rawData;
00085
00086 QString m_filename;
00087 bool m_valid;
00088 bool m_suitableForOutput;
00089
00090 };
00091
00092 inline bool operator==( const KisProfile & p1, const KisProfile & p2 )
00093 {
00094 return p1.m_profile == p2.m_profile;
00095 }
00096
00097 #endif // KIS_PROFILE_H
00098
|