|
DAWorkbench 0.0.1
DAWorkbench API
|
DAGraphicsItem的工厂类,工厂类负责DAGraphicsItem的反射工作 更多...
#include <DAGraphicsItemFactory.h>
Public 类型 | |
| using | FpItemCreate = std::function< QGraphicsItem *() > |
静态 Public 成员函数 | |
| static void | initialization () |
| static void | registItem (const QString &className, FpItemCreate fp) |
| 向工厂注册 | |
| static QGraphicsItem * | createItem (const QString &className) |
| static QGraphicsItem * | createItem (int itemType) |
| static void | destoryItem (DAGraphicsItem *i) |
| static uint64_t | generateID (uint32_t rand) |
| 生成一个id | |
DAGraphicsItem的工厂类,工厂类负责DAGraphicsItem的反射工作
所有自定义的item需要向工厂注册才可以实现加载
|
static |
生成一个id
|
static |
向工厂注册
| className | |
| fp |