diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-05-04 17:53:51 +1000 |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-05-04 17:54:21 +1000 |
commit | 1b7c1b6ef86d3d56ff01b2eab118062a229b0d19 (patch) | |
tree | b85271416c0a6731b3a09bf6800c19bf574daeb1 /src/declarative/items/qsgflickable_p_p.h | |
parent | ff62dede7b8f4d211ad1de922ccb901ab9ae055c (diff) |
Update SG items with GV item changes.
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 2861bfd5b3..9f212ee038 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 setRoundedViewportX(qreal x); void setRoundedViewportY(qreal y); - qreal overShootDistance(qreal velocity, qreal size); + qreal overShootDistance(qreal size); void itemGeometryChanged(QSGItem *, const QRectF &, const QRectF &); |