gldemo
Component Class Reference

组件的基类。里面的事件会由widget调用 More...

#include <Component.h>

Inheritance diagram for Component:
Renderer Trail LineRenderer PointCloudRenderer SkyboxRenderer

Public Member Functions

virtual QString name () const
 该类型的名称,应由子类重写
 
virtual void onUpdate ()
 每帧被调用一次
 
virtual void onPropertyChange (const QString &key, const QVariant &original)
 有属性被更改时被调用一次
 
QVariant getProp (const QString &key)
 获取属性的值
 
void setProp (const QString &key, const QVariant &value)
 改变属性的值
 
std::vector< QString > getPropKeys ()
 获取所有键
 

Public Attributes

HierarchyObjecthierarchyObject
 指向这个组件挂载的对象
 

Protected Member Functions

void defProp (const QString &key, const QVariant &init)
 定义属性,应当只在子类的构造函数中使用
 

Protected Attributes

std::map< QString, QVariant > properties
 所有非默认参数的键值对
 
std::vector< QString > propertyKeys
 所有非默认参数的键
 

Detailed Description

组件的基类。里面的事件会由widget调用

Note
继承Component类的组件可以被挂载到HierarchyObject上,由Widget调度

The documentation for this class was generated from the following files: