aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpathview_p_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_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_p.h')
-rw-r--r--src/quick/items/qquickpathview_p_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/items/qquickpathview_p_p.h b/src/quick/items/qquickpathview_p_p.h
index 2a547d9b47..46ad22f3f8 100644
--- a/src/quick/items/qquickpathview_p_p.h
+++ b/src/quick/items/qquickpathview_p_p.h
@@ -95,13 +95,14 @@ public:
}
}
- QQuickItem *getItem(int modelIndex, qreal z = 0, bool onPath=true);
+ QQuickItem *getItem(int modelIndex, qreal z = 0, bool async=false);
void releaseItem(QQuickItem *item);
QQuickPathViewAttached *attached(QQuickItem *item);
QQmlOpenMetaObjectType *attachedType();
void clear();
void updateMappedRange();
qreal positionOfIndex(qreal index) const;
+ bool isInBound(qreal position, qreal lower, qreal upper) const;
void createHighlight();
void updateHighlight();
void setHighlightPosition(qreal pos);
@@ -138,6 +139,7 @@ public:
qreal offset;
qreal offsetAdj;
qreal mappedRange;
+ qreal mappedCache;
bool stealMouse : 1;
bool ownModel : 1;
bool interactive : 1;
@@ -162,6 +164,7 @@ public:
int firstIndex;
int pathItems;
int requestedIndex;
+ int cacheSize;
qreal requestedZ;
QList<QQuickItem *> items;
QList<QQuickItem *> itemCache;