aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpathview_p.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-07-23 11:08:06 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-23 06:38:18 +0200
commit2a4bb9608498876c3c2229eef91b8723a7fd8e47 (patch)
tree0c54b33736537633a5ab73cc4ee1a5777bf4323e /src/quick/items/qquickpathview_p.h
parent773d722ff2f503c3805e802022cbc487d5bb4126 (diff)
Add methods to PathView: positionViewAtIndex(), indexAt(), itemAt()
These methods are already present in ListView and GridView. Change-Id: I3777fccdecd77c8ab756a0062c71c6e1bfb749ef 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.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/quick/items/qquickpathview_p.h b/src/quick/items/qquickpathview_p.h
index ee2428263e..7f7f344205 100644
--- a/src/quick/items/qquickpathview_p.h
+++ b/src/quick/items/qquickpathview_p.h
@@ -83,11 +83,12 @@ 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(int pathItemCount READ pathItemCount WRITE setPathItemCount RESET resetPathItemCount NOTIFY pathItemCountChanged)
Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged)
Q_ENUMS(HighlightRangeMode)
Q_ENUMS(SnapMode)
+ Q_ENUMS(PositionMode)
public:
QQuickPathView(QQuickItem *parent=0);
@@ -147,11 +148,17 @@ public:
int pathItemCount() const;
void setPathItemCount(int);
+ void resetPathItemCount();
enum SnapMode { NoSnap, SnapToItem, SnapOneItem };
SnapMode snapMode() const;
void setSnapMode(SnapMode mode);
+ enum PositionMode { Beginning, Center, End, Contain=4, SnapPosition }; // 3 == Visible in other views
+ Q_INVOKABLE void positionViewAtIndex(int index, int mode);
+ Q_INVOKABLE int indexAt(qreal x, qreal y) const;
+ Q_INVOKABLE QQuickItem *itemAt(qreal x, qreal y) const;
+
static QQuickPathViewAttached *qmlAttachedProperties(QObject *);
public Q_SLOTS: