🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::UiAttributeTreeItem类 参考

#include <UiAttributeTreeItem.hpp>

+ 类 ast::UiAttributeTreeItem 继承关系图:

Public 成员函数

 UiAttributeTreeItem (Object *obj, Property *prop)
 
Attributeattribute ()
 
const Attributeattribute () const
 
const std::string & propertyName () const
 
const std::string & propertyDesc () const
 
void refreshDisplay ()
 
void buildChildren (int maxDepth=20)
 
UiAttributeTreeItemclone () const override
 

静态 Public 成员函数

static QList< QTreeWidgetItem * > CreateTreeItems (Object *object, int maxDepth=20)
 

详细描述

属性树控件项,封装一个 Attribute(对象-属性绑定),显示属性名和当前值

对于对象类型(eObject)的属性,可通过 buildChildren() 展开子属性节点

成员函数说明

◆ buildChildren()

void ast::UiAttributeTreeItem::buildChildren ( int maxDepth = 20)

递归构建子属性节点(仅对 eObject 类型属性有效)

参数
maxDepth最大递归深度,防止循环引用导致无限递归

◆ CreateTreeItems()

QList< QTreeWidgetItem * > ast::UiAttributeTreeItem::CreateTreeItems ( Object * object,
int maxDepth = 20 )
static

创建属性树项,递归处理对象类型的属性,返回树项列表

参数
object要处理的对象,可能包含子对象
返回
包含所有属性树项的列表

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