Scribus
Open source desktop publishing at your fingertips
sccolorprofile.h
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 SCCOLORPROFILE_H
9 #define SCCOLORPROFILE_H
10 
11 #include <QSharedPointer>
12 #include <QWeakPointer>
13 #include "scribusapi.h"
14 #include "sccolorprofiledata.h"
15 
16 class SCRIBUS_API ScColorProfile
17 {
18  friend class ScColorProfileCache;
19 
20 public:
23  ScColorProfile(const QSharedPointer<ScColorProfileData>&);
24 
25  ScColorMgmtEngine& engine() { return m_data->engine(); }
26  const ScColorMgmtEngine& engine() const { return m_data->engine(); }
27 
28  inline bool isNull() const { return (m_data.isNull() || m_data->isNull()); }
29  inline operator bool () const { return !isNull(); }
30 
31  QString profilePath() const;
32  QString productDescription() const;
33 
34  eColorSpaceType colorSpace() const;
35  eProfileClass deviceClass() const;
36 
37  const ScColorProfileData* data() const { return m_data.data(); }
38 
39  bool operator==(const ScColorProfile& prof) const;
40 
41 protected:
42  QSharedPointer<ScColorProfileData> m_data;
43 
44  QWeakPointer<ScColorProfileData> weakRef() const { return m_data.toWeakRef(); }
45  QSharedPointer<ScColorProfileData> strongRef() const { return m_data; }
46 };
47 
48 #endif
Definition: sccolorprofilecache.h:16
Definition: sccolorprofile.h:16
Definition: sccolormgmtengine.h:16
Definition: sccolorprofiledata.h:17