DtkCore
DTK Core module
Dtk::Core::GSettingsBackend类 参考

Storage backend of DSettings use gsettings. 更多...

类 Dtk::Core::GSettingsBackend 继承关系图:
Dtk::Core::DSettingsBackend

Public 成员函数

 GSettingsBackend (DSettings *settings, QObject *parent=nullptr)
 
virtual QStringList keys () const Q_DECL_OVERRIDE
 List all gsettings keys. 更多...
 
virtual QVariant getOption (const QString &key) const Q_DECL_OVERRIDE
 Get value of key. 更多...
 
- Public 成员函数 继承自 Dtk::Core::DSettingsBackend
 DSettingsBackend (QObject *parent=Q_NULLPTR)
 
virtual QStringList keys () const =0
 return all key of storage. 更多...
 
virtual QVariant getOption (const QString &key) const =0
 get value by key. 更多...
 
virtual void doSync ()=0
 do the real sync action. 更多...
 

Protected 槽

virtual void doSetOption (const QString &key, const QVariant &value) Q_DECL_OVERRIDE
 Set value to gsettings Use the key to save the value.
 
virtual void doSync () Q_DECL_OVERRIDE
 Trigger DSettings to sync option to storage.
 

额外继承的成员函数

- 信号 继承自 Dtk::Core::DSettingsBackend
void optionChanged (const QString &key, const QVariant &value)
 emitted when option value changed. 更多...
 
void sync ()
 private signal, please do not use it. 更多...
 
void setOption (const QString &key, const QVariant &value)
 private signal, please do not use it. 更多...
 
- Protected 成员函数 继承自 Dtk::Core::DSettingsBackend
virtual void doSetOption (const QString &key, const QVariant &value)=0
 write key / value to storage. 更多...
 

详细描述

Storage backend of DSettings use gsettings.

\inmodule dtkcore

You should generate gsetting schema with /usr/lib/x86_64-linux-gnu/libdtk-$$VERSION/DCore/bin/dtk-settings.

You can find this tool from libdtkcore-bin. use /usr/lib/x86_64-linux-gnu/libdtk-$$VERSION/DCore/bin/dtk-settings -h for help.

成员函数说明

◆ getOption()

QVariant Dtk::Core::GSettingsBackend::getOption ( const QString &  key) const
virtual

Get value of key.

返回
Return the value of the given key.

实现了 Dtk::Core::DSettingsBackend.

◆ keys()

QStringList Dtk::Core::GSettingsBackend::keys ( ) const
virtual

List all gsettings keys.

返回
Return all gsettings keys.

实现了 Dtk::Core::DSettingsBackend.


该类的文档由以下文件生成: