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