digiKam
iccsettings_p.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 - Private header.
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_P_H
27 #define DIGIKAM_ICC_SETTINGS_P_H
28 
29 #include "iccsettings.h"
30 #include "digikam_config.h"
31 
32 // Qt includes
33 
34 #include <QApplication>
35 #include <QScreen>
36 #include <QPointer>
37 #include <QWidget>
38 #include <QWindow>
39 #include <QDir>
40 #include <QFileInfo>
41 #include <QMutex>
42 #include <QMutexLocker>
43 
44 // KDE includes
45 
46 #include <kconfiggroup.h>
47 #include <ksharedconfig.h>
48 
49 // Local includes
50 
51 #include "digikam_debug.h"
52 #include "iccprofile.h"
53 #include "icctransform.h"
54 
55 namespace Digikam
56 {
57 
58 class Q_DECL_HIDDEN IccSettings::Private
59 {
60 public:
61 
62  explicit Private();
63 
64  QList<IccProfile> scanDirectories(const QStringList& dirs);
65  void scanDirectory(const QString& path, const QStringList& filter, QList<IccProfile>* const profiles);
66 
67  IccProfile profileFromWindowSystem(QWidget* const widget);
68 
69  ICCSettingsContainer readFromConfig() const;
70  void writeToConfig() const;
71  void writeManagedViewToConfig() const;
72  void writeManagedPreviewsToConfig() const;
73 
74 public:
75 
77  QMutex mutex;
78 
80 
81  QHash<int, IccProfile> screenProfiles;
82 
83  const QString configGroup;
84 
85 #if (QT_VERSION > QT_VERSION_CHECK(5, 99, 0))
86 
87 # ifdef HAVE_X11
88 
89 private:
90 
91  // X11 helper functions for Qt6 support.
92  // Imported from https://code.qt.io/cgit/qt/qtx11extras.git/tree/src/x11extras/qx11info_x11.cpp?h=5.15.2#n102
93 
94  bool isX11();
95  quint32 getAppRootWindow(int);
96  QScreen* findScreenForVirtualDesktop(int);
97  int appScreen();
98  Display* display();
99 
100 # endif
101 
102 #endif
103 
104 };
105 
106 } // namespace Digikam
107 
108 #endif // DIGIKAM_ICC_SETTINGS_P_H
Definition: iccsettingscontainer.h:44
Definition: iccprofile.h:43
Definition: iccsettings_p.h:59
QList< IccProfile > profiles
Definition: iccsettings_p.h:79
const QString configGroup
Definition: iccsettings_p.h:83
ICCSettingsContainer settings
Definition: iccsettings_p.h:76
QHash< int, IccProfile > screenProfiles
Definition: iccsettings_p.h:81
QMutex mutex
Definition: iccsettings_p.h:77
Definition: iccsettings.h:44
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43