2021-02-04 16:59:58 +08:00
|
|
|
#include "DoricRegistry.h"
|
2021-05-17 16:18:44 +08:00
|
|
|
#include "DoricLibrary.h"
|
2021-02-04 16:59:58 +08:00
|
|
|
|
2021-04-20 11:46:56 +08:00
|
|
|
#include "plugin/DoricModalPlugin.h"
|
2021-04-25 16:44:39 +08:00
|
|
|
#include "plugin/DoricNetworkPlugin.h"
|
2021-06-07 21:54:47 +08:00
|
|
|
#include "plugin/DoricNotificationPlugin.h"
|
2021-04-22 20:46:00 +08:00
|
|
|
#include "plugin/DoricPopoverPlugin.h"
|
2021-02-04 16:59:58 +08:00
|
|
|
#include "plugin/DoricShaderPlugin.h"
|
2021-05-06 10:01:56 +08:00
|
|
|
#include "plugin/DoricStoragePlugin.h"
|
2021-04-20 11:46:56 +08:00
|
|
|
|
2021-06-02 10:11:14 +08:00
|
|
|
#include "shader/DoricDraggableNode.h"
|
2021-06-02 16:34:38 +08:00
|
|
|
#include "shader/DoricFlexNode.h"
|
2021-02-25 19:04:14 +08:00
|
|
|
#include "shader/DoricHLayoutNode.h"
|
2021-04-23 17:56:08 +08:00
|
|
|
#include "shader/DoricImageNode.h"
|
2021-05-25 16:51:39 +08:00
|
|
|
#include "shader/DoricInputNode.h"
|
2021-02-22 16:42:19 +08:00
|
|
|
#include "shader/DoricRootNode.h"
|
2021-04-08 19:50:39 +08:00
|
|
|
#include "shader/DoricScrollerNode.h"
|
2021-02-22 16:42:19 +08:00
|
|
|
#include "shader/DoricStackNode.h"
|
2021-05-27 16:56:57 +08:00
|
|
|
#include "shader/DoricSwitchNode.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-05-10 16:09:29 +08:00
|
|
|
#include "shader/slider/DoricSlideItemNode.h"
|
|
|
|
#include "shader/slider/DoricSliderNode.h"
|
2021-02-04 16:59:58 +08:00
|
|
|
|
|
|
|
DoricRegistry::DoricRegistry() {
|
2021-06-07 18:12:31 +08:00
|
|
|
qDebug() << "DoricRegistry constructor";
|
|
|
|
|
2021-02-04 16:59:58 +08:00
|
|
|
registerNativePlugin<DoricShaderPlugin>("shader");
|
2021-04-20 11:46:56 +08:00
|
|
|
registerNativePlugin<DoricModalPlugin>("modal");
|
2021-04-22 20:46:00 +08:00
|
|
|
registerNativePlugin<DoricPopoverPlugin>("popover");
|
2021-04-25 16:44:39 +08:00
|
|
|
registerNativePlugin<DoricNetworkPlugin>("network");
|
2021-05-06 10:01:56 +08:00
|
|
|
registerNativePlugin<DoricStoragePlugin>("storage");
|
2021-06-07 21:54:47 +08:00
|
|
|
registerNativePlugin<DoricNotificationPlugin>("notification");
|
2021-02-22 16:42:19 +08:00
|
|
|
|
|
|
|
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-04-08 19:50:39 +08:00
|
|
|
registerViewNode<DoricScrollerNode>("Scroller");
|
2021-04-23 17:56:08 +08:00
|
|
|
registerViewNode<DoricImageNode>("Image");
|
2021-05-10 16:09:29 +08:00
|
|
|
registerViewNode<DoricSliderNode>("Slider");
|
|
|
|
registerViewNode<DoricSlideItemNode>("SlideItem");
|
2021-05-25 16:51:39 +08:00
|
|
|
registerViewNode<DoricInputNode>("Input");
|
2021-05-27 16:56:57 +08:00
|
|
|
registerViewNode<DoricSwitchNode>("Switch");
|
2021-06-02 10:11:14 +08:00
|
|
|
registerViewNode<DoricDraggableNode>("Draggable");
|
2021-06-02 16:34:38 +08:00
|
|
|
registerViewNode<DoricFlexNode>("FlexLayout");
|
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
|
|
|
}
|
2021-02-22 16:42:19 +08:00
|
|
|
|
|
|
|
bool DoricRegistry::acquireNodeInfo(QString name) {
|
|
|
|
return nodes.acquireClass(name);
|
|
|
|
}
|
2021-05-17 16:18:44 +08:00
|
|
|
|
|
|
|
void DoricRegistry::registerLibrary(DoricLibrary *doricLibrary) {
|
|
|
|
doricLibraries.insert(doricLibrary);
|
|
|
|
doricLibrary->load(this);
|
|
|
|
}
|