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/DoricPanel.cpp

16 lines
503 B
C++
Raw Normal View History

2021-02-04 16:59:58 +08:00
#include "DoricPanel.h"
2021-02-09 17:42:11 +08:00
#include "shader/DoricRootNode.h"
2021-02-04 16:59:58 +08:00
2021-02-19 19:01:31 +08:00
DoricPanel::DoricPanel(QQuickItem *quickItem) { mQuickItem = quickItem; }
2021-02-04 16:59:58 +08:00
void DoricPanel::config(QString script, QString alias, QString extra) {
DoricContext *context = DoricContext::create(script, alias, extra);
config(context);
}
void DoricPanel::config(DoricContext *context) {
this->mContext = context;
2021-02-19 19:01:31 +08:00
this->mContext->getRootNode()->setRootView(mQuickItem);
this->mContext->build(mQuickItem->width(), mQuickItem->height());
2021-02-04 16:59:58 +08:00
}