aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpathview_p.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-08-21 14:47:48 +1000
committerQt by Nokia <qt-info@nokia.com>2012-08-28 04:32:48 +0200
commit4a4a08d61a9771b5f49d7377b48d821075df3d97 (patch)
treec21f3d242a4a1d69f104efa41d66622ea119309f /src/quick/items/qquickpathview_p.h
parenta47597ea986e76cb6deeaaa64b3714add4688a01 (diff)
Add cacheItemCount property to PathView
cacheItemCount specifies the number of items to cache off the path when pathItemCount is specified. This allows up to cacheItemCount items to be kept alive when they move off the path, and also to asynchronously create items off path in preparation for display when the path offset changes. This is the equivalent of cacheBuffer for other views. Task-number: QTBUG-23931 Change-Id: I03497537d3f929e5e3579536850dd43eb2724c38 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquickpathview_p.h b/src/quick/items/qquickpathview_p.h
index 7f7f344205..ce5d395ec7 100644
--- a/src/quick/items/qquickpathview_p.h
+++ b/src/quick/items/qquickpathview_p.h
@@ -86,6 +86,8 @@ class Q_AUTOTEST_EXPORT QQuickPathView : public QQuickItem
Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount RESET resetPathItemCount NOTIFY pathItemCountChanged)
Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged)
+ Q_PROPERTY(int cacheItemCount READ cacheItemCount WRITE setCacheItemCount NOTIFY cacheItemCountChanged)
+
Q_ENUMS(HighlightRangeMode)
Q_ENUMS(SnapMode)
Q_ENUMS(PositionMode)
@@ -150,6 +152,9 @@ public:
void setPathItemCount(int);
void resetPathItemCount();
+ int cacheItemCount() const;
+ void setCacheItemCount(int);
+
enum SnapMode { NoSnap, SnapToItem, SnapOneItem };
SnapMode snapMode() const;
void setSnapMode(SnapMode mode);
@@ -195,6 +200,7 @@ Q_SIGNALS:
void dragStarted();
void dragEnded();
void snapModeChanged();
+ void cacheItemCountChanged();
protected:
virtual void updatePolish();