|
gio-qt 0.0.16
|
Access GSettings in a more Qt way. More...


Signals | |
| void | valueChanged (const QString &key, const QVariant &value) |
Public Member Functions | |
| DGioSettings (const QString &schemaId, QObject *parent=nullptr) | |
| Create a DGioSettings object for a given schemaId. | |
| DGioSettings (const QString &schemaId, const QString &path, QObject *parent=nullptr) | |
| Create a DGioSettings object for a given schemaId and path. | |
| void | sync () |
| bool | setValue (const QString &key, const QVariant &value, bool sync=false) |
| Sets the value at key to value. | |
| QVariant | value (const QString &key) const |
| Q_DECL_DEPRECATED QStringList | keys () const |
| Retrieves the list of avaliable keys. | |
| void | reset (const QString &key) |
Static Public Member Functions | |
| static bool | isSchemaInstalled (const QString &schemaId) |
Access GSettings in a more Qt way.
This is not a directly wrapper of Gio::Settings class, so interfaces are not matched to the giomm ome.
|
explicit |
Create a DGioSettings object for a given schemaId.
In case you would like to skip path but provide a parent.
Warning: not existed schemaId will cause the program crashed.
| DGioSettings::DGioSettings | ( | const QString & | schemaId, |
| const QString & | path, | ||
| QObject * | parent = nullptr ) |
Create a DGioSettings object for a given schemaId and path.
Warning: not existed schemaId will cause the program crashed.
| QStringList DGioSettings::keys | ( | ) | const |
Retrieves the list of avaliable keys.
According to g_settings_list_keys() document: You should probably not be calling this function from "normal" code (since you should already know what keys are in your schema). This function is intended for introspection reasons.
Thus we also mark this function as DEPRECATED just like what glib does.
| bool DGioSettings::setValue | ( | const QString & | key, |
| const QVariant & | value, | ||
| bool | sync = false ) |
Sets the value at key to value.
Not all values that a QVariant can hold can be serialized into a setting. Basic types are supported. the provided variant value will be converted according to the original GSetting value type.
List of supported types:
| sync | call sync() after value applied if success. |