F:/KPlato/koffice/libs/pigment/KoColorProfile.h

Aller à la documentation de ce fichier.
00001 /*
00002  *  KoColorProfile.h - part of Krayon
00003  *
00004  *  Copyright (c) 2000 Matthias Elter  <elter@kde.org>
00005  *                2004 Boudewijn Rempt <boud@valdyas.org>
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public License
00018  * along with this library; see the file COPYING.LIB.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020  * Boston, MA 02110-1301, USA.
00021 */
00022 
00023 #ifndef KOCOLORPROFILE_H
00024 #define KOCOLORPROFILE_H
00025 
00026 #include <config.h>
00027 
00028 #include <lcms.h>
00029 
00030 #include <q3valuevector.h>
00031 
00032 #include <kio/job.h>
00033 
00034 #include <koffice_export.h>
00035 
00039 class PIGMENT_EXPORT KoColorProfile {
00040 
00041 public:
00047     KoColorProfile(QByteArray rawData);
00053     KoColorProfile(const QString& file);
00057     KoColorProfile(const cmsHPROFILE profile);
00058 
00059     virtual ~KoColorProfile();
00060 
00065     virtual bool load();
00070     virtual bool save();
00071 
00075     inline icColorSpaceSignature colorSpaceSignature() const { return m_colorSpaceSignature; }
00079     inline icProfileClassSignature deviceClass() const { return m_deviceClass; }
00083     inline QString productName() const { return m_productName; }
00087     inline QString productDescription() const { return m_productDescription; }
00091     inline QString productInfo() const { return m_productInfo; }
00095     inline QString manufacturer() const { return m_manufacturer; }
00096     
00100     cmsHPROFILE profile();
00101 
00102     friend inline bool operator==( const KoColorProfile &,  const KoColorProfile & );
00103 
00108     inline bool valid() const { return m_valid; };
00109 
00114     inline bool isSuitableForOutput() { return m_suitableForOutput; };
00115 
00120     inline QString filename() const { return m_filename; }
00121 
00125     inline QByteArray rawData() const { return m_rawData; }
00126 
00127 public:
00131     static KoColorProfile *  getScreenProfile(int screen = -1);
00132 
00133 private:
00134     bool init();
00135 
00136     cmsHPROFILE m_profile;
00137     icColorSpaceSignature m_colorSpaceSignature;
00138     icProfileClassSignature m_deviceClass;
00139     QString m_productName;
00140     QString m_productDescription;
00141     QString m_productInfo;
00142     QString m_manufacturer;
00143 
00144     QByteArray m_rawData;
00145 
00146     QString m_filename;
00147     bool m_valid;
00148     bool m_suitableForOutput;
00149 
00150 };
00151 
00152 inline bool operator==( const KoColorProfile & p1,  const KoColorProfile & p2 )
00153 {
00154     return p1.m_profile == p2.m_profile;
00155 }
00156 
00157 #endif // KOCOLORPROFILE_H
00158 

Généré le Wed Nov 22 23:41:13 2006 pour KPlato par  doxygen 1.5.1-p1