fix circular deps
This commit is contained in:
parent
915814fc2a
commit
3eeb062d2e
@ -2,6 +2,7 @@
|
||||
#include "DoricContextManager.h"
|
||||
#include "DoricNativeDriver.h"
|
||||
|
||||
#include "shader/DoricRootNode.h"
|
||||
#include "utils/DoricConstant.h"
|
||||
#include "utils/DoricContextHolder.h"
|
||||
|
||||
|
@ -4,7 +4,8 @@
|
||||
#include <QVariant>
|
||||
|
||||
#include "DoricInterfaceDriver.h"
|
||||
#include "shader/DoricRootNode.h"
|
||||
|
||||
class DoricRootNode;
|
||||
|
||||
class DoricContext {
|
||||
private:
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "DoricPanel.h"
|
||||
#include "shader/DoricRootNode.h"
|
||||
|
||||
DoricPanel::DoricPanel() {}
|
||||
|
||||
@ -9,5 +10,6 @@ void DoricPanel::config(QString script, QString alias, QString extra) {
|
||||
|
||||
void DoricPanel::config(DoricContext *context) {
|
||||
this->mContext = context;
|
||||
this->mContext->getRootNode()->setRootView();
|
||||
this->mContext->build(960, 720);
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include <QDebug>
|
||||
#include <QQuickItem>
|
||||
#include <QQuickView>
|
||||
|
||||
#include "DoricDemoBridge.h"
|
||||
#include "DoricPanel.h"
|
||||
@ -12,8 +14,17 @@ void DoricDemoBridge::navigate(QVariant route) {
|
||||
QString name = "Snake.es5.js";
|
||||
QString script = DoricUtils::readAssetFile("/doric/bundles", name);
|
||||
|
||||
DoricPanel panel;
|
||||
panel.config(script, name, NULL);
|
||||
QQuickView *view = new QQuickView();
|
||||
view->setWidth(960);
|
||||
view->setHeight(720);
|
||||
QColor color("blue");
|
||||
view->setColor(color);
|
||||
view->show();
|
||||
|
||||
view->rootObject();
|
||||
|
||||
DoricPanel *panel = new DoricPanel();
|
||||
panel->config(script, name, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "DoricRootNode.h"
|
||||
|
||||
DoricRootNode::DoricRootNode() {}
|
||||
void DoricRootNode::setRootView() {}
|
||||
|
@ -1,9 +1,13 @@
|
||||
#ifndef ROOTNODE_H
|
||||
#define ROOTNODE_H
|
||||
|
||||
class DoricRootNode {
|
||||
#include "DoricStackNode.h"
|
||||
|
||||
class DoricRootNode : public DoricStackNode {
|
||||
public:
|
||||
DoricRootNode();
|
||||
using DoricStackNode::DoricStackNode;
|
||||
|
||||
void setRootView();
|
||||
};
|
||||
|
||||
#endif // ROOTNODE_H
|
||||
|
Reference in New Issue
Block a user