🛰️航天仿真算法库 SpaceAST
0.0.1
载入中...
搜索中...
未找到
UiAttributeTree.hpp
浏览该文件的文档.
1
19
20
#pragma once
21
22
#include "AstGlobal.h"
23
#include "AstUtil/Object.hpp"
24
#include "AstUtil/Attribute.hpp"
25
#include <QTreeWidget>
26
27
AST_NAMESPACE_BEGIN
28
29
class
UiAttributeTreeItem;
30
32
class
AST_GUI_API
UiAttributeTree
:
public
QTreeWidget
33
{
34
Q_OBJECT
35
36
public
:
37
explicit
UiAttributeTree
(QWidget* parent =
nullptr
);
38
40
void
setObject(
Object
*
object
);
41
43
Object
* object()
const
;
44
46
void
refresh();
47
49
Attribute
selectedAttribute()
const
;
50
51
signals:
53
void
attributeSelected
(
const
Attribute
& attr);
54
55
private
:
57
void
collectProperties(
Class
* type, std::vector<Property*>& out)
const
;
58
59
WeakPtr<Object>
rootObject_;
60
};
61
62
AST_NAMESPACE_END
ast::AttributeBasic< Object, Property >
ast::Class
类元信息
定义
Class.hpp:40
ast::Object
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义
Object.hpp:95
ast::UiAttributeTree
属性树控件,显示一个 AST 对象的所有反射属性(遍历继承链)
定义
UiAttributeTree.hpp:33
ast::UiAttributeTree::attributeSelected
void attributeSelected(const Attribute &attr)
当用户在树中选中属性时发出
ast::WeakPtr
弱引用指针
定义
WeakPtr.hpp:35
src
AstGUI
Attribute
AttributeTree
UiAttributeTree.hpp
制作者
1.12.0