aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpathview_p.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-03-21 13:18:05 +1000
committerQt by Nokia <qt-info@nokia.com>2012-04-04 06:00:40 +0200
commit912c25633ede945fb9b64e09ecd9309e7cc2ac3c (patch)
tree35ef57607d3e586828bffaaff2f3300ebe4aabf9 /src/quick/items/qquickpathview_p.h
parent2e35d1c47b3a4ddadfda16e3337d4d8ef91b4ce3 (diff)
Support snapMode in PathView
PathView missed out on snapMode, which is especially useful for its SnapOneItem mode. Change-Id: I0e9b080ef72d9bc1e305445cd8dfde8e21e4e3da Reviewed-by: Bea Lam <bea.lam@nokia.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 8b15e85b8a..2c0c106113 100644
--- a/src/quick/items/qquickpathview_p.h
+++ b/src/quick/items/qquickpathview_p.h
@@ -83,8 +83,10 @@ class Q_AUTOTEST_EXPORT QQuickPathView : public QQuickItem
Q_PROPERTY(int count READ count NOTIFY countChanged)
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount NOTIFY pathItemCountChanged)
+ Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged)
Q_ENUMS(HighlightRangeMode)
+ Q_ENUMS(SnapMode)
public:
QQuickPathView(QQuickItem *parent=0);
@@ -144,6 +146,10 @@ public:
int pathItemCount() const;
void setPathItemCount(int);
+ enum SnapMode { NoSnap, SnapToItem, SnapOneItem };
+ SnapMode snapMode() const;
+ void setSnapMode(SnapMode mode);
+
static QQuickPathViewAttached *qmlAttachedProperties(QObject *);
public Q_SLOTS:
@@ -176,6 +182,7 @@ Q_SIGNALS:
void movementEnded();
void flickStarted();
void flickEnded();
+ void snapModeChanged();
protected:
virtual void updatePolish();