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

A group of DSettingsOption and DSettingsGroup. DSettingsGroup can contain a lost option and subgroup. 更多...

类 Dtk::Core::DSettingsGroup 继承关系图:

Public 成员函数

 DSettingsGroup (QObject *parent=Q_NULLPTR)
 
QPointer< DSettingsGroupparentGroup () 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< DSettingsGroupchildGroup (const QString &groupKey) const
 Get the child group of groupKey groupKey is child group key 更多...
 
QPointer< DSettingsOptionoption (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< DSettingsGroupfromJson (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选项的集合,也可以包含子组。

成员函数说明

◆ childGroup()

QPointer< DSettingsGroup > Dtk::Core::DSettingsGroup::childGroup ( const QString &  groupKey) const

Get the child group of groupKey groupKey is child group key

返回给定键在选项组中对应的子组。 groupKey 子组的键

返回
返回子组的指针.

◆ childGroups()

QList< QPointer< DSettingsGroup > > Dtk::Core::DSettingsGroup::childGroups ( ) const

Enum all direct child group of this group

列出组下面所有的直接子组。

返回
返回所有子组指针列表.

◆ childOptions()

QList< QPointer< DSettingsOption > > Dtk::Core::DSettingsGroup::childOptions ( ) const

Enum all direct child option with the raw order in json description file.

列出组下面所有的直接选项。

返回
返回所有子选项指针列表.

◆ fromJson()

QPointer< DSettingsGroup > Dtk::Core::DSettingsGroup::fromJson ( const QString &  prefixKey,
const QJsonObject &  group 
)
static

Convert QJsonObject to DSettingsGroup. prefixKey instead parse prefix key from parent. group is an QJsonObejct instance.

将json对象转化为DSettingsGroup prefixKey 组键值前缀 group 待反序列化的json对象

返回
返回解析json后的组指针.
参见
QPointer Dtk::Core::DSettingsOption

◆ isHidden()

bool Dtk::Core::DSettingsGroup::isHidden ( ) const

Check this group will show on DSettings dialog.

检查这个选项组是否会在界面上显示。

返回
true 表示则这个选项组会显示出来。

◆ key()

QString Dtk::Core::DSettingsGroup::key ( ) const

Return the full key of this group, include all parent.

返回
返回这个组的键,会包含全部的父组的键。

◆ name()

QString Dtk::Core::DSettingsGroup::name ( ) const

Get display name of this group, it may be translated.

返回
返回这个组名称。

◆ option()

QPointer< DSettingsOption > Dtk::Core::DSettingsGroup::option ( const QString &  key) const

Get the child option of key key is child option key

根据键值获取选项。 key 选项的完整键

返回
返回对应键值选项指针.

◆ options()

QList< QPointer< DSettingsOption > > Dtk::Core::DSettingsGroup::options ( ) const

Enum all direct child option of this group.

列出组下面所有的选项。

返回
返回所有选项指针列表.

◆ parentGroup()

QPointer< DSettingsGroup > Dtk::Core::DSettingsGroup::parentGroup ( ) const

Get direct parent group of this group.

获取当前组的父组。

返回

◆ setParentGroup()

void Dtk::Core::DSettingsGroup::setParentGroup ( QPointer< DSettingsGroup parentGroup)

Change the direct parentGroup of this group.

设置当前组的父组为 parentGroup


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