- qtgui
- qtdbus
- qtwidgets
- qtcore
- dtkcore
- qsettingbackend_zh
- dobject_zh
- abstractappender_zh
- abstractstringappender_zh
- dfilewatcher_zh
- outputdebugappender_zh
- dsettingsbackend_zh
- drecentmanager_zh
- ddesktopentry_zh
- consoleappender_zh
- gsettingsbackend_zh
- dsettingsgroup_zh
- dlogmanager_zh
- fileappender_zh
- dsettings_zh
- dfilesystemwatcher_zh
- dfilewatchermanager_zh
- dbasefilewatcher_zh
- dtkgui
- dtkwidget
- dviewitemaction_zh
- dstandarditem_zh
- dfiledialog_zh
- dclipeffectwidget_zh
- danchors_zh
- dgraphicsclipeffect_zh
- dstyle_zh
- dcoloredprogressbar_zh
- dbuttonboxbutton_zh
- dlabel_zh
- dtiplabel_zh
- darrowlinedrawer_zh
- daboutdialog_zh
- dsettingswidgetfactory_zh
- dsearchcombobox_zh
- dcrumbedit_zh
- dcommandlinkbutton_zh
- dsettingsdialog_zh
- dwindowoptionbutton_zh
- dspinner_zh
- dsimplelistview_zh
- dwaterprogress_zh
- dmainwindow_zh
- dhidpihelper_zh
- dslider_zh
- dpasswordedit_zh
- danchorinfo_zh
- dmpriscontrol_zh
- darrowbutton_zh
- dbackgroundgroup_zh
- dcircleprogress_zh
- dwarningbutton_zh
- dwindowclosebutton_zh
- dvideowidget_zh
- dfilechooseredit_zh
- dblureffectwidget_zh
- darrowrectangle_zh
- dsearchedit_zh
- dfloatingmessage_zh
- dswitchlineexpand_zh
- dtabbar_zh
- dlineedit_zh
- danchorsbase_zh
- dstylediconengine_zh
- dwindowmaxbutton_zh
- dpageindicator_zh
- dsuggestbutton_zh
- dapplicationsettings_zh
- dtooltip_zh
- dwindowminbutton_zh
- ddrawer_zh
- dtitlebar_zh
- dsimplelistitem_zh
- dpicturesequenceview_zh
dsettingsbackend_zh
Class::DSettingsBackend
暂无该属性
Detailed Description
- ~english *
DSettingsBackend is interface of DSettings storage class. * * Simaple example:
json { "groups": [{ "key": "base", "name": "Basic settings", "groups": [{ "key": "open_action", "name": "Open Action", "options": [{ "key": "alway_open_on_new", "type": "checkbox", "text": "Always Open On New Windows", "default": true }, { "key": "open_file_action", "name": "Open File:", "type": "combobox", "default": "" } ] }, { "key": "new_tab_windows", "name": "New Tab & Window", "options": [{ "key": "new_window_path", "name": "New Window Open:", "type": "combobox", "default": "" }, { "key": "new_tab_path", "name": "New Tab Open:", "type": "combobox", "default": "" } ] } ] }] }
- How to read/write key and value:
// read settings from json auto settings = Dtk::Core::DSettings::fromJsonFile(":/resources/data/dfm-settings.json"); settings->setBackend(backend);
// read value auto opt = settings->option("base.new_tab_windows.new_window_path"); qDebug() << opt->value();
// modify value opt->setValue("Test") qDebug() << opt->value(); ``` *
*
*
*
*
**See also** Dtk::Core::DSettingsOptionDtk::Core::DSettingsGroupDtk::Core::DSettingsBackendDtk::Widget::DSettingsWidgetFactoryDtk::Widget::DSettingsDialog
# DSettingsBackend::metaObject
<a id="name"></a>
[<font color="green">public</font> <font color="green">plain</font> <font color="green"></font> <font color="green">virtual</font>]
const QMetaObject * metaObject() const
# DSettingsBackend::qt_metacast
<a id="name"></a>
[<font color="green">public</font> <font color="green">plain</font> <font color="green"></font> <font color="green">virtual</font>]
void * qt_metacast(const char *)
# DSettingsBackend::qt_metacall
<a id="name"></a>
[<font color="green">public</font> <font color="green">plain</font> <font color="green"></font> <font color="green">virtual</font>]
int qt_metacall(QMetaObject::Call , int , void **)
# DSettingsBackend::tr
<a id="name"></a>
[<font color="green">public</font> <font color="green">plain</font> <font color="green">static</font> <font color="green"></font>]
QString tr(const char *s, const char *c, int n)
# DSettingsBackend::trUtf8
<a id="name"></a>
[<font color="green">public</font> <font color="green">plain</font> <font color="green">static</font> <font color="green"></font>]
QString trUtf8(const char *s, const char *c, int n)
# DSettingsBackend::qt_static_metacall
<a id="name"></a>
[<font color="green">private</font> <font color="green">plain</font> <font color="green">static</font> <font color="green"></font>]
void qt_static_metacall(QObject *, QMetaObject::Call , int , void **)
# Class::QPrivateSignal
### DSettingsBackend::QPrivateSignal
<hr />
# Detailed Description
# DSettingsBackend::DSettingsBackend
<a id="name"></a>
[<font color="green">public</font> <font color="green">constructor</font> <font color="green"></font> <font color="green"></font>]
DSettingsBackend(QObject *parent)
# DSettingsBackend::~DSettingsBackend
<a id="name"></a>
[<font color="green">public</font> <font color="green">destructor</font> <font color="green"></font> <font color="green">virtual</font>]
~DSettingsBackend()
# DSettingsBackend::keys
<a id="name"></a>
[<font color="green">public</font> <font color="green">plain</font> <font color="green"></font> <font color="green"></font>]
QStringList keys() const = 0
# DSettingsBackend::getOption
<a id="name"></a>
[<font color="green">public</font> <font color="green">plain</font> <font color="green"></font> <font color="green"></font>]
QVariant getOption(const QString &key) const = 0
# DSettingsBackend::doSync
<a id="name"></a>
[<font color="green">public</font> <font color="green">plain</font> <font color="green"></font> <font color="green"></font>]
void doSync() = 0
# DSettingsBackend::doSetOption
<a id="name"></a>
[<font color="green">protected</font> <font color="green">plain</font> <font color="green"></font> <font color="green"></font>]
void doSetOption(const QString &key, const QVariant &value) = 0
# DSettingsBackend::optionChanged
<a id="name"></a>
[<font color="green">public</font> <font color="green">signal</font> <font color="green"></font> <font color="green"></font>]
void optionChanged(const QString &key, const QVariant &value)
# DSettingsBackend::sync
<a id="name"></a>
[<font color="green">public</font> <font color="green">signal</font> <font color="green"></font> <font color="green"></font>]
void sync()
# DSettingsBackend::setOption
<a id="name"></a>
[<font color="green">public</font> <font color="green">signal</font> <font color="green"></font> <font color="green"></font>]
void setOption(const QString &key, const QVariant &value)