summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qstandardgestures.cpp
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@nokia.com>2010-09-10 08:20:55 (GMT)
committerZeno Albisser <zeno.albisser@nokia.com>2010-09-13 14:40:36 (GMT)
commitdc343981c65af9d279a08ae4a664ec664dbb3cea (patch)
tree1f6bff50f2f71e12497f56f09c9c1f24c2d4d911 /src/gui/kernel/qstandardgestures.cpp
parent7f96f211d15d7af28146682356ad1363c5d9f4a9 (diff)
downloadQt-dc343981c65af9d279a08ae4a664ec664dbb3cea.zip
Qt-dc343981c65af9d279a08ae4a664ec664dbb3cea.tar.gz
Qt-dc343981c65af9d279a08ae4a664ec664dbb3cea.tar.bz2
Changed the speed property on QSwipeGesture to velocity
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'src/gui/kernel/qstandardgestures.cpp')
-rw-r--r--src/gui/kernel/qstandardgestures.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index 127e150..503fa18 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -304,7 +304,7 @@ QGestureRecognizer::Result QSwipeGestureRecognizer::recognize(QGesture *state,
switch (event->type()) {
case QEvent::TouchBegin: {
- d->speed = 1;
+ d->velocityValue = 1;
d->time.start();
d->started = true;
result = QGestureRecognizer::MayBeGesture;
@@ -345,7 +345,7 @@ QGestureRecognizer::Result QSwipeGestureRecognizer::recognize(QGesture *state,
int elapsedTime = d->time.restart();
if (!elapsedTime)
elapsedTime = 1;
- d->speed = 0.9 * d->speed + distance / elapsedTime;
+ d->velocityValue = 0.9 * d->velocityValue + distance / elapsedTime;
d->swipeAngle = QLineF(p1.startScreenPos(), p1.screenPos()).angle();
static const int MoveThreshold = 50;
@@ -407,7 +407,7 @@ void QSwipeGestureRecognizer::reset(QGesture *state)
d->lastPositions[0] = d->lastPositions[1] = d->lastPositions[2] = QPoint();
d->started = false;
- d->speed = 0;
+ d->velocityValue = 0;
d->time.invalidate();
QGestureRecognizer::reset(state);