1// Copyright (C) 2025 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 QDBUSSETTINGS_P_H
5#define QDBUSSETTINGS_P_H
6
7#include <QtCore/qnamespace.h>
8#include <QtCore/qstring.h>
9QT_REQUIRE_CONFIG(dbus);
10
11//
12// W A R N I N G
13// -------------
14//
15// This file is not part of the Qt API. It exists purely as an
16// implementation detail. This header file may change from version to
17// version without notice, or even be removed.
18//
19// We mean it.
20//
21
22QT_BEGIN_NAMESPACE
23
24namespace QDBusSettings {
25// XDG Desktop Portal Settings (Preferred)
26// https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Settings.html
27namespace XdgSettings {
28static constexpr QLatin1StringView AppearanceNamespace{ "org.freedesktop.appearance" };
29static constexpr QLatin1StringView ColorSchemeKey{ "color-scheme" };
30static constexpr QLatin1StringView ContrastKey{ "contrast" };
31Qt::ContrastPreference convertContrastPreference(const QVariant &value);
32Qt::ColorScheme convertColorScheme(const QVariant &value);
33} // namespace XdgSettings
34
35namespace GnomeSettings {
36// GNOME Destop Settings (Alternative)
37// https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2069
38// https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/commit/0e97f1f571c495184f80d875c68f241261a50e30
39static constexpr QLatin1StringView AllyNamespace{ "org.gnome.desktop.a11y.interface" };
40static constexpr QLatin1StringView ContrastKey{ "high-contrast" };
41Qt::ContrastPreference convertContrastPreference(const QVariant &value);
42} // namespace GnomeSettings
43} // namespace QDBusSettings
44
45QT_END_NAMESPACE
46#endif // QDBUSSETTINGS_P_H
47

source code of qtbase/src/gui/platform/unix/qdbussettings_p.h