diff options
Diffstat (limited to 'src/quicktemplates2/qquicktumbler_p_p.h')
-rw-r--r-- | src/quicktemplates2/qquicktumbler_p_p.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquicktumbler_p_p.h b/src/quicktemplates2/qquicktumbler_p_p.h index 0dcae762..38b0f60d 100644 --- a/src/quicktemplates2/qquicktumbler_p_p.h +++ b/src/quicktemplates2/qquicktumbler_p_p.h @@ -64,6 +64,7 @@ public: ~QQuickTumblerPrivate(); enum ContentItemType { + NoContentItem, UnsupportedContentItemType, PathViewContentItem, ListViewContentItem @@ -109,6 +110,34 @@ public: void itemChildRemoved(QQuickItem *, QQuickItem *) override; }; +class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTumblerAttachedPrivate : public QObjectPrivate, public QQuickItemChangeListener +{ + Q_DECLARE_PUBLIC(QQuickTumblerAttached) + +public: + QQuickTumblerAttachedPrivate(); + + 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. + QPointer<QQuickTumbler> tumbler; + // The index of the delegate. Used to calculate the displacement. + int index; + // The displacement for our delegate. + qreal displacement; +}; + QT_END_NAMESPACE #endif // QQUICKTUMBLER_P_P_H |