digiKam
iccsettingscontainer.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2005-12-08
7  * Description : ICC Settings Container.
8  *
9  * Copyright (C) 2005-2007 by F.J. Cruz <fj dot cruz at supercable dot es>
10  * Copyright (C) 2005-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_ICC_SETTINGS_CONTAINER_H
26 #define DIGIKAM_ICC_SETTINGS_CONTAINER_H
27 
28 // Qt includes
29 
30 #include <QColor>
31 #include <QFlags>
32 #include <QString>
33 
34 // Local includes
35 
36 #include "digikam_export.h"
37 
38 class KConfigGroup;
39 
40 namespace Digikam
41 {
42 
43 class DIGIKAM_EXPORT ICCSettingsContainer
44 {
45 
46 public:
47 
49  {
51 
52  InvalidBehavior = 0,
53 
55 
56  UseEmbeddedProfile = 1 << 0,
57  UseSRGB = 1 << 1,
58  UseWorkspace = 1 << 2,
59  UseDefaultInputProfile = 1 << 3,
60  UseSpecifiedProfile = 1 << 4,
61  AutomaticColors = 1 << 5,
62  DoNotInterpret = 1 << 6,
63 
65 
66  KeepProfile = 1 << 10,
67  ConvertToWorkspace = 1 << 11,
68 
70 
71  LeaveFileUntagged = 1 << 18,
72 
73  AskUser = 1 << 20,
74  SafestBestAction = 1 << 21,
75 
77 
78  PreserveEmbeddedProfile = UseEmbeddedProfile | KeepProfile,
79  EmbeddedToWorkspace = UseEmbeddedProfile | ConvertToWorkspace,
80  SRGBToWorkspace = UseSRGB | ConvertToWorkspace,
81  AutoToWorkspace = AutomaticColors | ConvertToWorkspace,
82  InputToWorkspace = UseDefaultInputProfile | ConvertToWorkspace,
83  SpecifiedToWorkspace = UseSpecifiedProfile | ConvertToWorkspace,
84  NoColorManagement = DoNotInterpret | LeaveFileUntagged
85  };
86  Q_DECLARE_FLAGS(Behavior, BehaviorEnum)
87 
88 public:
89 
90  explicit ICCSettingsContainer();
92 
93  void readFromConfig(KConfigGroup& group);
94  void writeToConfig(KConfigGroup& group) const;
95  void writeManagedViewToConfig(KConfigGroup& group) const;
96  void writeManagedPreviewsToConfig(KConfigGroup& group) const;
97 
98 public:
99 
100  bool enableCM;
101 
102  QString iccFolder;
103 
105 
109 
115 
118  QString monitorProfile;
119 
122 
123  bool useBPC;
125 
130 
131 private:
132 
133  QString getProfilePath(KConfigGroup& group, const char* key) const;
134 };
135 
136 } // namespace Digikam
137 
138 Q_DECLARE_OPERATORS_FOR_FLAGS(Digikam::ICCSettingsContainer::Behavior)
139 
140 #endif // DIGIKAM_ICC_SETTINGS_CONTAINER_H
Definition: iccsettingscontainer.h:44
BehaviorEnum
Definition: iccsettingscontainer.h:49
bool useBPC
Definition: iccsettingscontainer.h:123
Behavior lastMismatchBehavior
Definition: iccsettingscontainer.h:110
bool useManagedView
Definition: iccsettingscontainer.h:116
QString iccFolder
Definition: iccsettingscontainer.h:102
~ICCSettingsContainer()
Definition: iccsettingscontainer.h:91
bool useManagedPreviews
Definition: iccsettingscontainer.h:117
Behavior lastUncalibratedBehavior
Definition: iccsettingscontainer.h:112
Behavior defaultMissingProfileBehavior
Definition: iccsettingscontainer.h:107
Behavior defaultMismatchBehavior
Definition: iccsettingscontainer.h:106
Behavior defaultUncalibratedBehavior
Definition: iccsettingscontainer.h:108
int proofingRenderingIntent
Settings specific for soft proofing.
Definition: iccsettingscontainer.h:127
QString defaultInputProfile
Definition: iccsettingscontainer.h:120
QColor gamutCheckMaskColor
Definition: iccsettingscontainer.h:129
int renderingIntent
Definition: iccsettingscontainer.h:124
int doGamutCheck
Definition: iccsettingscontainer.h:128
QString lastSpecifiedInputProfile
Definition: iccsettingscontainer.h:114
QString lastSpecifiedAssignProfile
Definition: iccsettingscontainer.h:113
QString workspaceProfile
Definition: iccsettingscontainer.h:104
QString defaultProofProfile
Definition: iccsettingscontainer.h:121
QString monitorProfile
Definition: iccsettingscontainer.h:118
Behavior lastMissingProfileBehavior
Definition: iccsettingscontainer.h:111
bool enableCM
Definition: iccsettingscontainer.h:100
Definition: datefolderview.cpp:43