refactor doric layouts
This commit is contained in:
parent
4377c29951
commit
dca581d641
@ -47,17 +47,17 @@ void DoricViewNode::blendLayoutConfig(QJsonValue jsValue) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DoricViewNode::createLayouts(QQuickItem *view) {
|
void DoricViewNode::createLayouts(QQuickItem *view) {
|
||||||
if (mLayouts == nullptr) {
|
if (mDoricLayouts == nullptr) {
|
||||||
mLayouts = new DoricLayouts();
|
mDoricLayouts = new DoricLayouts();
|
||||||
mLayouts->setWidth(view->width());
|
mDoricLayouts->setWidth(view->width());
|
||||||
mLayouts->setHeight(view->height());
|
mDoricLayouts->setHeight(view->height());
|
||||||
mLayouts->setView(view);
|
mDoricLayouts->setView(view);
|
||||||
|
|
||||||
view->setProperty("doricLayout", QString::number((qint64)mLayouts));
|
view->setProperty("doricLayout", QString::number((qint64)mDoricLayouts));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DoricLayouts *DoricViewNode::getLayouts() { return mLayouts; }
|
DoricLayouts *DoricViewNode::getLayouts() { return mDoricLayouts; }
|
||||||
|
|
||||||
void DoricViewNode::setLayoutConfig(QJsonValue layoutConfig) {
|
void DoricViewNode::setLayoutConfig(QJsonValue layoutConfig) {
|
||||||
if (mSuperNode != nullptr) {
|
if (mSuperNode != nullptr) {
|
||||||
|
@ -17,7 +17,7 @@ class DORIC_EXPORT DoricViewNode : public DoricContextHolder {
|
|||||||
protected:
|
protected:
|
||||||
QQuickItem *mView;
|
QQuickItem *mView;
|
||||||
|
|
||||||
DoricLayouts *mLayouts = nullptr;
|
DoricLayouts *mDoricLayouts = nullptr;
|
||||||
|
|
||||||
virtual QQuickItem *build() = 0;
|
virtual QQuickItem *build() = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user