From 086dc4316b1008453ac190bab414a1c46cde79ef Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 10 Apr 2018 15:52:01 +0200 Subject: Promote contentWidth and contentHeight to QQuickContainer Now we have contentWidth and contentHeight promoted/unified to QQuickPane and QQuickContainer, and all relevant types inherit the properties from there. The next step is to promote read-only versions all the way up to the QQuickControl base class. Change-Id: Ic6ed5d7b7852b0c7faaa59b9a261c360bc63fb6a Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickcontainer_p_p.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/quicktemplates2/qquickcontainer_p_p.h') diff --git a/src/quicktemplates2/qquickcontainer_p_p.h b/src/quicktemplates2/qquickcontainer_p_p.h index 7791b69c..9ec5b206 100644 --- a/src/quicktemplates2/qquickcontainer_p_p.h +++ b/src/quicktemplates2/qquickcontainer_p_p.h @@ -82,6 +82,8 @@ public: void itemSiblingOrderChanged(QQuickItem *item) override; void itemParentChanged(QQuickItem *item, QQuickItem *parent) override; void itemDestroyed(QQuickItem *item) override; + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; static void contentData_append(QQmlListProperty *prop, QObject *obj); static int contentData_count(QQmlListProperty *prop); @@ -93,6 +95,17 @@ public: static QQuickItem *contentChildren_at(QQmlListProperty *prop, int index); static void contentChildren_clear(QQmlListProperty *prop); + virtual qreal getContentWidth() const; + virtual qreal getContentHeight() const; + + void updateContentWidth(); + void updateContentHeight(); + void updateContentSize(); + + bool hasContentWidth; + bool hasContentHeight; + qreal contentWidth; + qreal contentHeight; QObjectList contentData; QQmlObjectModel *contentModel; int currentIndex; -- cgit v1.2.3