This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/DoricRegistry.cpp

31 lines
912 B
C++
Raw Normal View History

2021-02-04 16:59:58 +08:00
#include "DoricRegistry.h"
#include "plugin/DoricShaderPlugin.h"
2021-02-25 19:04:14 +08:00
#include "shader/DoricHLayoutNode.h"
#include "shader/DoricRootNode.h"
#include "shader/DoricStackNode.h"
2021-02-25 19:04:14 +08:00
#include "shader/DoricTextNode.h"
2021-02-23 14:28:08 +08:00
#include "shader/DoricVLayoutNode.h"
2021-03-01 16:24:40 +08:00
#include "widget/flex/FlexLayoutService.h"
2021-02-04 16:59:58 +08:00
DoricRegistry::DoricRegistry() {
2021-03-01 16:24:40 +08:00
qmlRegisterType<FlexLayoutService>("pub.doric.widget", 1, 0,
"FlexLayoutService");
2021-02-04 16:59:58 +08:00
registerNativePlugin<DoricShaderPlugin>("shader");
registerViewNode<DoricRootNode>("Root");
registerViewNode<DoricStackNode>("Stack");
2021-02-23 14:28:08 +08:00
registerViewNode<DoricVLayoutNode>("VLayout");
2021-02-25 18:06:08 +08:00
registerViewNode<DoricHLayoutNode>("HLayout");
2021-02-25 19:04:14 +08:00
registerViewNode<DoricTextNode>("Text");
2021-02-04 16:59:58 +08:00
}
bool DoricRegistry::acquirePluginInfo(QString name) {
2021-02-20 16:20:18 +08:00
return plugins.acquireClass(name);
2021-02-04 16:59:58 +08:00
}
bool DoricRegistry::acquireNodeInfo(QString name) {
return nodes.acquireClass(name);
}