DtkCore
DTK Core module
|
A group of DSettingsOption and DSettingsGroup. DSettingsGroup can contain a lost option and subgroup. 更多...
Public 成员函数 | |
DSettingsGroup (QObject *parent=Q_NULLPTR) | |
QPointer< DSettingsGroup > | parentGroup () const |
Get direct parent group of this group. 更多... | |
void | setParentGroup (QPointer< DSettingsGroup > parentGroup) |
Change the direct parentGroup of this group. 更多... | |
QString | key () const |
Return the full key of this group, include all parent. 更多... | |
QString | name () const |
Get display name of this group, it may be translated. 更多... | |
bool | isHidden () const |
Check this group will show on DSettings dialog. 更多... | |
QPointer< DSettingsGroup > | childGroup (const QString &groupKey) const |
Get the child group of groupKey groupKey is child group key 更多... | |
QPointer< DSettingsOption > | option (const QString &key) const |
Get the child option of key key is child option key 更多... | |
QList< QPointer< DSettingsGroup > > | childGroups () const |
Enum all direct child group of this group 更多... | |
QList< QPointer< DSettingsOption > > | childOptions () const |
Enum all direct child option with the raw order in json description file. 更多... | |
QList< QPointer< DSettingsOption > > | options () const |
Enum all direct child option of this group. 更多... | |
静态 Public 成员函数 | |
static QPointer< DSettingsGroup > | fromJson (const QString &prefixKey, const QJsonObject &group) |
Convert QJsonObject to DSettingsGroup. prefixKey instead parse prefix key from parent. group is an QJsonObejct instance. 更多... | |
A group of DSettingsOption and DSettingsGroup. DSettingsGroup can contain a lost option and subgroup.
\inmodule dtkcore
一组DSettings选项的集合,也可以包含子组。
QPointer< DSettingsGroup > Dtk::Core::DSettingsGroup::childGroup | ( | const QString & | groupKey | ) | const |
Get the child group of groupKey groupKey is child group key
返回给定键在选项组中对应的子组。 groupKey 子组的键
QList< QPointer< DSettingsGroup > > Dtk::Core::DSettingsGroup::childGroups | ( | ) | const |
Enum all direct child group of this group
列出组下面所有的直接子组。
QList< QPointer< DSettingsOption > > Dtk::Core::DSettingsGroup::childOptions | ( | ) | const |
Enum all direct child option with the raw order in json description file.
列出组下面所有的直接选项。
|
static |
Convert QJsonObject to DSettingsGroup. prefixKey instead parse prefix key from parent. group is an QJsonObejct instance.
将json对象转化为DSettingsGroup prefixKey 组键值前缀 group 待反序列化的json对象
bool Dtk::Core::DSettingsGroup::isHidden | ( | ) | const |
QString Dtk::Core::DSettingsGroup::key | ( | ) | const |
Return the full key of this group, include all parent.
QString Dtk::Core::DSettingsGroup::name | ( | ) | const |
Get display name of this group, it may be translated.
QPointer< DSettingsOption > Dtk::Core::DSettingsGroup::option | ( | const QString & | key | ) | const |
Get the child option of key key is child option key
根据键值获取选项。 key 选项的完整键
QList< QPointer< DSettingsOption > > Dtk::Core::DSettingsGroup::options | ( | ) | const |
Enum all direct child option of this group.
列出组下面所有的选项。
QPointer< DSettingsGroup > Dtk::Core::DSettingsGroup::parentGroup | ( | ) | const |
Get direct parent group of this group.
获取当前组的父组。
void Dtk::Core::DSettingsGroup::setParentGroup | ( | QPointer< DSettingsGroup > | parentGroup | ) |
Change the direct parentGroup of this group.
设置当前组的父组为 parentGroup 。