SettingsPortal Class

(Sailfish::XDP::SettingsPortal)

Backend interface of the Settings Portal More...

Header: #include <SettingsPortal>

Public Types

class FDOConfKeys
enum FDOColorScheme { None, Dark, Light }

Properties

Public Functions

SettingsPortal(QObject *parent)
uint version() const

Public Slots

QDBusVariant Read(const QString &ns, const QString &key)
void ReadAll(const QStringList &nss, const QDBusMessage &message)
void ambienceChanged(const int &i)
void valueChanged(const QString &key)

Signals

void SettingChanged(const QString &ns, const QString &key, const QVariant &value)

Detailed Description

Backend interface of the Settings Portal

See XDG Desktop Portal Backend Specification for details.

Features restrieving the properties from the org.freedesktop.appearance namespace as well as a custom namespace called org.sailfishos.desktop, and optionally others.

See Supported Namespaces for details.

Member Type Documentation

enum SettingsPortal::FDOColorScheme

Possible values for org.freedesktop.appearance color-scheme

ConstantValueDescription
Sailfish::XDP::SettingsPortal::None-1No preference
Sailfish::XDP::SettingsPortal::Dark0Prefer dark appearance
Sailfish::XDP::SettingsPortal::Light1Prefer light appearance

Property Documentation

version : const uint

This property contains the backend implementation version.

Access functions:

uint version() const

Member Function Documentation

SettingsPortal::SettingsPortal(QObject *parent)

Default constructs an instance of SettingsPortal.

[slot] QDBusVariant SettingsPortal::Read(const QString &ns, const QString &key)

Reads and returns a single value, specified by key, from namespace ns

[slot] void SettingsPortal::ReadAll(const QStringList &nss, const QDBusMessage &message)

Implements org.freedesktop.impl.portal.Settings.ReadAll

nss specifies the a list of namespaces. See the class description for supported namespaces. message is used to send the reply

[signal] void SettingsPortal::SettingChanged(const QString &ns, const QString &key, const QVariant &value)

Emitted when any of the supported values have changed. ns, key, value are namespace, key within that namespace, and value that has changed.

Note: emitting this signal is mandaroty for the XDP namespace. It may or may not be emitted in the same way for other namespaces.

See also SettingsPortalNamespaces.

[slot] void SettingsPortal::ambienceChanged(const int &i)

Slot to receive change signals from ambienced, and do something about that i.

See also [ambienced]{com.jolla.ambienced.contentChanged()} and Sailfish::Ambience.

[slot] void SettingsPortal::valueChanged(const QString &key)

Slot to receive change signals, and do something about that.

key corresponds to a FDOSettingsKey value

See also SettingsPortal::SettingChanged.