32 QGnomePortalInterface(QObject *parent =
nullptr);
33 ~QGnomePortalInterface() =
default;
35 Qt::ColorScheme colorScheme(Qt::ColorScheme fallback = Qt::ColorScheme::Unknown)
const;
36 Qt::ContrastPreference contrastPreference(
37 Qt::ContrastPreference fallback = Qt::ContrastPreference::NoPreference)
const;
41 void updateColorScheme(Qt::ColorScheme colorScheme);
42 void updateContrast(Qt::ContrastPreference contrast);
45 void colorSchemeChanged(Qt::ColorScheme);
46 void contrastChanged(Qt::ContrastPreference);
47 void themeNameChanged(
const QString &themeName);
50 void dbusSettingChanged(QDBusListener::Provider, QDBusListener::Setting,
const QVariant &value);
53 mutable uint m_version = 0;
54 std::optional<Qt::ColorScheme> m_colorScheme;
55 std::optional<Qt::ContrastPreference> m_contrast;
56 std::unique_ptr<QDBusListener> m_dbus;
57 static constexpr QLatin1StringView s_service{
"org.freedesktop.portal.Desktop" };
58 static constexpr QLatin1StringView s_path{
"/org/freedesktop/portal/desktop" };
59 static constexpr QLatin1StringView s_interface{
"org.freedesktop.portal.Settings" };