| 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> |
| 9 | QT_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 | |
| 22 | QT_BEGIN_NAMESPACE |
| 23 | |
| 24 | namespace QDBusSettings { |
| 25 | // XDG Desktop Portal Settings (Preferred) |
| 26 | // https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Settings.html |
| 27 | namespace XdgSettings { |
| 28 | static constexpr QLatin1StringView AppearanceNamespace{ "org.freedesktop.appearance"}; |
| 29 | static constexpr QLatin1StringView ColorSchemeKey{ "color-scheme"}; |
| 30 | static constexpr QLatin1StringView ContrastKey{ "contrast"}; |
| 31 | Qt::ContrastPreference convertContrastPreference(const QVariant &value); |
| 32 | Qt::ColorScheme convertColorScheme(const QVariant &value); |
| 33 | } // namespace XdgSettings |
| 34 | |
| 35 | namespace 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 |
| 39 | static constexpr QLatin1StringView AllyNamespace{ "org.gnome.desktop.a11y.interface"}; |
| 40 | static constexpr QLatin1StringView ContrastKey{ "high-contrast"}; |
| 41 | Qt::ContrastPreference convertContrastPreference(const QVariant &value); |
| 42 | } // namespace GnomeSettings |
| 43 | } // namespace QDBusSettings |
| 44 | |
| 45 | QT_END_NAMESPACE |
| 46 | #endif // QDBUSSETTINGS_P_H |
| 47 |
