diff options
author | Martin Jones <martin.jones@nokia.com> | 2012-08-21 14:47:48 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-28 04:32:48 +0200 |
commit | 4a4a08d61a9771b5f49d7377b48d821075df3d97 (patch) | |
tree | c21f3d242a4a1d69f104efa41d66622ea119309f /src/quick/items/qquickpathview_p.h | |
parent | a47597ea986e76cb6deeaaa64b3714add4688a01 (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.h | 6 |
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(); |