add flex node & demo
This commit is contained in:
33
doric-Qt/example/doric/shader/DoricFlexNode.cpp
Normal file
33
doric-Qt/example/doric/shader/DoricFlexNode.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "DoricFlexNode.h"
|
||||
|
||||
QQuickItem *DoricFlexNode::build() {
|
||||
QQmlComponent component(getContext()->getQmlEngine());
|
||||
|
||||
const QUrl url(QStringLiteral("qrc:/doric/qml/flex.qml"));
|
||||
component.loadUrl(url);
|
||||
|
||||
if (component.isError()) {
|
||||
qCritical() << component.errorString();
|
||||
}
|
||||
|
||||
QQuickItem *item = qobject_cast<QQuickItem *>(component.create());
|
||||
this->createLayouts(item);
|
||||
|
||||
item->setProperty("wrapper", QString::number((qint64)this));
|
||||
return item;
|
||||
}
|
||||
|
||||
void DoricFlexNode::blend(QQuickItem *view, QString name, QJsonValue prop) {
|
||||
if (name == "flexConfig") {
|
||||
|
||||
} else {
|
||||
DoricGroupNode::blend(view, name, prop);
|
||||
}
|
||||
}
|
||||
|
||||
void DoricFlexNode::blendSubNode(DoricViewNode *subNode,
|
||||
QJsonValue flexConfig) {}
|
||||
|
||||
void DoricFlexNode::blendYoga(YGLayout *yoga, QJsonValue flexConfig) {}
|
||||
|
||||
void DoricFlexNode::blendYoga(YGLayout *yoga, QString name, QJsonValue prop) {}
|
Reference in New Issue
Block a user