aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpathview_p.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-04-26 14:12:14 +0200
committerLiang Qi <liang.qi@qt.io>2016-05-02 13:14:39 +0000
commit5caa2d03c193f39f9094703d4277122f51a31345 (patch)
treec2d8a66771aa3d39537af5e2eb89cc638102fa11 /src/quick/items/qquickpathview_p.h
parent434750f1a6cd78b595933210f41e1bf3ab3bd51b (diff)
Quick: expose movementDirection of PathView
It is needed by the behavior of TabBar in universal style in QtQC2. [ChangeLog][QtQuick][PathView] Added movementDirection property Change-Id: Iedc214a12e7336e52125ec82b9ded45502905978 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquickpathview_p.h')
-rw-r--r--src/quick/items/qquickpathview_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/items/qquickpathview_p.h b/src/quick/items/qquickpathview_p.h
index 341af02013..daec965f02 100644
--- a/src/quick/items/qquickpathview_p.h
+++ b/src/quick/items/qquickpathview_p.h
@@ -92,6 +92,7 @@ class Q_AUTOTEST_EXPORT QQuickPathView : public QQuickItem
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount RESET resetPathItemCount NOTIFY pathItemCountChanged)
Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged)
+ Q_PROPERTY(MovementDirection movementDirection READ movementDirection WRITE setMovementDirection NOTIFY movementDirectionChanged REVISION 7)
Q_PROPERTY(int cacheItemCount READ cacheItemCount WRITE setCacheItemCount NOTIFY cacheItemCountChanged)
@@ -164,6 +165,11 @@ public:
SnapMode snapMode() const;
void setSnapMode(SnapMode mode);
+ enum MovementDirection { Shortest, Negative, Positive };
+ Q_ENUM(MovementDirection)
+ MovementDirection movementDirection() const;
+ void setMovementDirection(MovementDirection dir);
+
enum PositionMode { Beginning, Center, End, Contain=4, SnapPosition }; // 3 == Visible in other views
Q_ENUM(PositionMode)
Q_INVOKABLE void positionViewAtIndex(int index, int mode);
@@ -201,6 +207,7 @@ Q_SIGNALS:
void highlightMoveDurationChanged();
void movementStarted();
void movementEnded();
+ Q_REVISION(7) void movementDirectionChanged();
void flickStarted();
void flickEnded();
void dragStarted();