1 | // Copyright (C) 2024 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QGTK3PORTALINTERFACE_H |
5 | #define QGTK3PORTALINTERFACE_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtCore/QObject> |
19 | #include <QtCore/QLoggingCategory> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class QDBusVariant; |
24 | class QGtk3Storage; |
25 | |
26 | Q_DECLARE_LOGGING_CATEGORY(lcQGtk3PortalInterface); |
27 | |
28 | class QGtk3PortalInterface : public QObject |
29 | { |
30 | Q_OBJECT |
31 | public: |
32 | QGtk3PortalInterface(QGtk3Storage *s); |
33 | ~QGtk3PortalInterface() = default; |
34 | |
35 | Qt::ColorScheme colorScheme() const; |
36 | |
37 | private Q_SLOTS: |
38 | void settingChanged(const QString &group, const QString &key, |
39 | const QDBusVariant &value); |
40 | private: |
41 | void queryColorScheme(); |
42 | |
43 | Qt::ColorScheme m_colorScheme = Qt::ColorScheme::Unknown; |
44 | QGtk3Storage *m_storage = nullptr; |
45 | }; |
46 | |
47 | QT_END_NAMESPACE |
48 | |
49 | #endif // QGTK3PORTALINTERFACE_H |
50 |