aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpathview_p_p.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-02-16 15:54:09 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-21 06:49:10 +0100
commitb672f1974d3291cd0ad56c3c54f5398accc392b8 (patch)
treee467665ec54d650d0b5edb4ad01043f46003cecb /src/quick/items/qquickpathview_p_p.h
parenta37f19fa6d19e43b3a64587f224658a9fd63631a (diff)
Flicking a pathview with large delegate spacing is inconsistent
The deceleration is inconsistent and dragging slowly is jerky. This was largely due to the poor resolution of the path points. pointAt() now interpolates, and the dragging logic is more accurate. Also removed the rounding of item positioning so that side-by-side items don't bounce around. Task-number: QTBUG-24312 Change-Id: I956aff0b83c3c1211d5657159c3de1e4ef0b5171 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/quick/items/qquickpathview_p_p.h')
-rw-r--r--src/quick/items/qquickpathview_p_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickpathview_p_p.h b/src/quick/items/qquickpathview_p_p.h
index 853851a9b3..b57aa13cbf 100644
--- a/src/quick/items/qquickpathview_p_p.h
+++ b/src/quick/items/qquickpathview_p_p.h
@@ -140,6 +140,8 @@ public:
void updateItem(QQuickItem *, qreal);
void snapToCurrent();
QPointF pointNear(const QPointF &point, qreal *nearPercent=0) const;
+ void addVelocitySample(qreal v);
+ qreal calcVelocity() const;
QDeclarativePath *path;
int currentIndex;
@@ -191,6 +193,7 @@ public:
QQuickPathView::HighlightRangeMode highlightRangeMode;
int highlightMoveDuration;
int modelCount;
+ QPODVector<qreal,10> velocityBuffer;
};
QT_END_NAMESPACE