aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicktumbler_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-04 17:48:29 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-10-05 12:07:24 +0000
commitae3e7f0799fcdd094e54d792e1a9b13c0e7730aa (patch)
tree17883a4bb4b164283d5678cb9024612548f6870d /src/quicktemplates2/qquicktumbler_p.h
parent19c3993abd691843194cce6c047773acc21c2523 (diff)
Add QQuickTumbler::moving
[ChangeLog][Controls][Tumbler] Added a moving-property that describes whether the tumbler is currently moving, due to the user either dragging or flicking the tumbler. Change-Id: Ic86d243cdbdfa8fcd7a7932264332c04a16e020a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicktumbler_p.h')
-rw-r--r--src/quicktemplates2/qquicktumbler_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquicktumbler_p.h b/src/quicktemplates2/qquicktumbler_p.h
index 1c8cfa18..3ec4044c 100644
--- a/src/quicktemplates2/qquicktumbler_p.h
+++ b/src/quicktemplates2/qquicktumbler_p.h
@@ -67,6 +67,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickTumbler : public QQuickControl
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
Q_PROPERTY(int visibleItemCount READ visibleItemCount WRITE setVisibleItemCount NOTIFY visibleItemCountChanged FINAL)
Q_PROPERTY(bool wrap READ wrap WRITE setWrap RESET resetWrap NOTIFY wrapChanged FINAL REVISION 1)
+ Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged FINAL REVISION 2)
public:
explicit QQuickTumbler(QQuickItem *parent = nullptr);
@@ -91,6 +92,8 @@ public:
void setWrap(bool wrap);
void resetWrap();
+ bool isMoving() const;
+
static QQuickTumblerAttached *qmlAttachedProperties(QObject *object);
Q_SIGNALS:
@@ -101,6 +104,7 @@ Q_SIGNALS:
void delegateChanged();
void visibleItemCountChanged();
Q_REVISION(1) void wrapChanged();
+ Q_REVISION(2) void movingChanged();
protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;