digiKam
iccsettings.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 : 2009-08-09
7  * Description : central place for ICC settings
8  *
9  * Copyright (C) 2005-2006 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  * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_ICC_SETTINGS_H
27 #define DIGIKAM_ICC_SETTINGS_H
28 
29 // Qt includes
30 
31 #include <QObject>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 #include "iccsettingscontainer.h"
37 
38 namespace Digikam
39 {
40 
41 class IccProfile;
42 
43 class DIGIKAM_EXPORT IccSettings : public QObject
44 {
45  Q_OBJECT
46 
47 public:
48 
52  static IccSettings* instance();
53 
57  ICCSettingsContainer settings();
58 
62  bool isEnabled() const;
63 
67  bool useManagedPreviews() const;
68 
75  IccProfile monitorProfile(QWidget* const widget = nullptr);
76 
82  bool monitorProfileFromSystem() const;
83 
87  void setSettings(const ICCSettingsContainer& settings);
88 
92  void setUseManagedView(bool useManagedView);
93  void setUseManagedPreviews(bool useManagedPreviews);
94  void setIccPath(const QString& path);
95 
96  QList<IccProfile> allProfiles();
97 
101  QList<IccProfile> workspaceProfiles();
102 
106  QList<IccProfile> displayProfiles();
107 
111  QList<IccProfile> inputProfiles();
112 
116  QList<IccProfile> outputProfiles();
117 
121  QList<IccProfile> profilesForDescription(const QString& description);
122 
129  void loadAllProfilesProperties();
130 
131 Q_SIGNALS:
132 
135 
136 private:
137 
138  IccSettings();
139  explicit IccSettings(QObject*);
140  ~IccSettings() override;
141 
142  void readFromConfig();
143 
144 private:
145 
146  class Private;
147  Private* const d;
148 
149  friend class Private;
150  friend class IccSettingsCreator;
151 };
152 
153 } // namespace Digikam
154 
155 #endif // DIGIKAM_ICC_SETTINGS_H
Definition: iccsettingscontainer.h:44
Definition: iccprofile.h:43
Definition: iccsettings_p.h:59
Definition: iccsettings.h:44
void signalICCSettingsChanged(const ICCSettingsContainer &current, const ICCSettingsContainer &previous)
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43