diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-01-17 11:36:23 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2018-01-17 14:22:24 +0000 |
commit | 8e52c65ac4c5d5140d5e1a6cdb18274f2c6b2108 (patch) | |
tree | 02322143ba4d6c0a8617273d25a351d17a0ce041 /src/quicktemplates2/qquicktumbler_p_p.h | |
parent | 6c831d8e8a5007e0309f81f6263562b078046607 (diff) |
Tumbler: reduce amount of signal-slot connections and change listeners
Instead of adding change listeners and signal-slot connections for each
attached object, add them once in QQuickTumbler and then notify each
attached object all in one go.
Change-Id: I6c5e76182c026b24922dcddaeb08ae4b1d4c4c38
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicktumbler_p_p.h')
-rw-r--r-- | src/quicktemplates2/qquicktumbler_p_p.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/quicktemplates2/qquicktumbler_p_p.h b/src/quicktemplates2/qquicktumbler_p_p.h index 38b0f60d..fc38dfcc 100644 --- a/src/quicktemplates2/qquicktumbler_p_p.h +++ b/src/quicktemplates2/qquicktumbler_p_p.h @@ -95,6 +95,7 @@ public: void _q_updateItemWidths(); void _q_onViewCurrentIndexChanged(); void _q_onViewCountChanged(); + void _q_calculateAttachedDisplacements(); void disconnectFromView(); void setupViewData(QQuickItem *newControlContentItem); @@ -119,15 +120,9 @@ public: void init(QQuickItem *delegateItem); - void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override; - void itemChildAdded(QQuickItem *, QQuickItem *) override; - void itemChildRemoved(QQuickItem *, QQuickItem *) override; - void _q_calculateDisplacement(); void emitIfDisplacementChanged(qreal oldDisplacement, qreal newDisplacement); - void viewDataSetUp(); - static QQuickTumblerAttachedPrivate *get(QQuickTumblerAttached *attached); // The Tumbler that contains the delegate. Required to calculated the displacement. |