aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickmenubar_p_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2018-04-10 15:28:02 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2018-04-11 07:38:32 +0000
commit52990db1f07bdf8f236dcb9b2ac06480c39437f7 (patch)
treefc4f3946b4d39d4e7f828cdf76f1b7de04bb5ef0 /src/quicktemplates2/qquickmenubar_p_p.h
parentcea175fca9e07d4b8bbb47508c49a8dac554797b (diff)
QQuickMenuBar: refactor content size calculation
Align with the other containers to make it easier to eventually promote contentWidth and contentHeight to the base class, QQuickContainer. Change-Id: I45c28d6902ae3cdf36f25dae60272dbc47a04f16 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickmenubar_p_p.h')
-rw-r--r--src/quicktemplates2/qquickmenubar_p_p.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickmenubar_p_p.h b/src/quicktemplates2/qquickmenubar_p_p.h
index 77625257..409c7123 100644
--- a/src/quicktemplates2/qquickmenubar_p_p.h
+++ b/src/quicktemplates2/qquickmenubar_p_p.h
@@ -85,8 +85,15 @@ public:
void onItemTriggered();
void onMenuAboutToHide();
+ qreal getContentWidth() const;
+ qreal getContentHeight() const;
+
+ void updateContentWidth();
+ void updateContentHeight();
void updateContentSize();
- void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override;
+
+ void itemImplicitWidthChanged(QQuickItem *item) override;
+ void itemImplicitHeightChanged(QQuickItem *item) override;
static void contentData_append(QQmlListProperty<QObject> *prop, QObject *obj);