diff options
Diffstat (limited to 'src/declarative/items/qsgflickable_p_p.h')
-rw-r--r-- | src/declarative/items/qsgflickable_p_p.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/declarative/items/qsgflickable_p_p.h b/src/declarative/items/qsgflickable_p_p.h index fec78c081b..114db53668 100644 --- a/src/declarative/items/qsgflickable_p_p.h +++ b/src/declarative/items/qsgflickable_p_p.h @@ -1,4 +1,4 @@ -// Commit: cb0a6844705802564c81b581f24a76c5d5adf6d1 +// Commit: 160f1867868cdea916923652b00484ed11f90aaa /**************************************************************************** ** ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). @@ -96,9 +96,19 @@ public: struct AxisData { AxisData(QSGFlickablePrivate *fp, void (QSGFlickablePrivate::*func)(qreal)) : move(fp, func), viewSize(-1), smoothVelocity(fp), atEnd(false), atBeginning(true) - , fixingUp(false) + , fixingUp(false), inOvershoot(false) {} + void reset() { + velocityBuffer.clear(); + dragStartOffset = 0; + fixingUp = false; + inOvershoot = false; + } + + void addVelocitySample(qreal v, qreal maxVelocity); + void updateVelocity(); + QDeclarativeTimeLineValueProxy<QSGFlickablePrivate> move; qreal viewSize; qreal pressPos; @@ -108,9 +118,11 @@ public: qreal velocity; qreal flickTarget; QSGFlickablePrivate::Velocity smoothVelocity; + QPODVector<qreal,10> velocityBuffer; bool atEnd : 1; bool atBeginning : 1; bool fixingUp : 1; + bool inOvershoot : 1; }; void flickX(qreal velocity); @@ -131,7 +143,7 @@ public: void setViewportX(qreal x); void setViewportY(qreal y); - qreal overShootDistance(qreal velocity, qreal size); + qreal overShootDistance(qreal size); void itemGeometryChanged(QSGItem *, const QRectF &, const QRectF &); |