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;
38 Qt::MotionPreference motionPreference(
39 Qt::MotionPreference fallback = Qt::MotionPreference::NoPreference)
const;
43 void updateColorScheme(Qt::ColorScheme colorScheme);
44 void updateContrast(Qt::ContrastPreference contrast);
45 void updateMotion(Qt::MotionPreference motion);
48 void colorSchemeChanged(Qt::ColorScheme);
49 void contrastChanged(Qt::ContrastPreference);
50 void motionChanged(Qt::MotionPreference);
51 void themeNameChanged(
const QString &themeName);
54 void dbusSettingChanged(QDBusListener::Provider, QDBusListener::Setting,
const QVariant &value);
57 mutable uint m_version = 0;
58 std::optional<Qt::ColorScheme> m_colorScheme;
59 std::optional<Qt::ContrastPreference> m_contrast;
60 std::optional<Qt::MotionPreference> m_motion;
61 std::unique_ptr<QDBusListener> m_dbus;
62 static constexpr QLatin1StringView s_service{
"org.freedesktop.portal.Desktop" };
63 static constexpr QLatin1StringView s_path{
"/org/freedesktop/portal/desktop" };
64 static constexpr QLatin1StringView s_interface{
"org.freedesktop.portal.Settings" };