diff options
Diffstat (limited to 'qkineticscroller_p.h')
-rw-r--r-- | qkineticscroller_p.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/qkineticscroller_p.h b/qkineticscroller_p.h index cb06feb..1f5a564 100644 --- a/qkineticscroller_p.h +++ b/qkineticscroller_p.h @@ -79,14 +79,16 @@ public: bool pressWhileScrolling(QKineticScroller::Input input, const QPointF &position, qint64 timestamp); void timerEvent(QTimerEvent *); - void timerEventWhileDragging(qint64 deltaTime); - void timerEventWhileScrolling(qint64 deltaTime); + void timerEventWhileDragging(); + void timerEventWhileScrolling(); void handleDrag(const QPointF &position, qint64 timestamp); void updateVelocity(const QPointF &deltaPixel, qint64 deltaTime); - void setContentPositionHelper(const QPointF &position); - qreal decelerate(qreal v, qreal expDecel, qreal linDecel); + qreal decelerate(qreal v, qreal t); + QPointF calculateVelocity(qreal time); + void setContentPositionHelper(const QPointF &deltaPos); + static const char *stateName(QKineticScroller::State state); static const char *inputName(QKineticScroller::Input input); @@ -96,7 +98,7 @@ public: qreal dragVelocitySmoothingFactor; qreal linearDecelerationFactor; qreal exponentialDecelerationBase; - qreal overshootSpringConstant; + qreal overshootSpringConstantRoot; qreal overshootDragResistanceFactor; QPointF overshootMaximumDistance; qreal overshootMaximumVelocity; @@ -126,16 +128,22 @@ public: qint64 lastTimestamp; QPointF dragDistance; - QPointF overshootDistance; QPointF scrollToPosition; bool scrollToX; bool scrollToY; + bool overshootX; + bool overshootY; + qreal pixelPerMeter; - QElapsedTimer dragTimer; - QElapsedTimer scrollTimer; + QElapsedTimer scrollRelativeTimer; + QElapsedTimer scrollAbsoluteTimer; + QPointF releaseVelocity; + QPointF overshootVelocity; + qreal overshootStartTimeX; + qreal overshootStartTimeY; int timerId; QKineticScroller *q_ptr; |