summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qgesture_p.h
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@nokia.com>2010-09-10 09:04:06 (GMT)
committerZeno Albisser <zeno.albisser@nokia.com>2010-09-13 14:42:41 (GMT)
commitd65259a3444a08919f1f19b9d2dcbe9b182752aa (patch)
tree18d13f117e1abba4725abc8a421e97857bdd1a03 /src/gui/kernel/qgesture_p.h
parentdc343981c65af9d279a08ae4a664ec664dbb3cea (diff)
downloadQt-d65259a3444a08919f1f19b9d2dcbe9b182752aa.zip
Qt-d65259a3444a08919f1f19b9d2dcbe9b182752aa.tar.gz
Qt-d65259a3444a08919f1f19b9d2dcbe9b182752aa.tar.bz2
Added velocity property to the QPanGesture.
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'src/gui/kernel/qgesture_p.h')
-rw-r--r--src/gui/kernel/qgesture_p.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/kernel/qgesture_p.h b/src/gui/kernel/qgesture_p.h
index 7d6ea87..baf0d33 100644
--- a/src/gui/kernel/qgesture_p.h
+++ b/src/gui/kernel/qgesture_p.h
@@ -88,14 +88,21 @@ class QPanGesturePrivate : public QGesturePrivate
public:
QPanGesturePrivate()
- : acceleration(0)
+ : acceleration(0), xVelocity(0), yVelocity(0)
{
}
+ qreal horizontalVelocity() const { return xVelocity; }
+ void setHorizontalVelocity(qreal value) { xVelocity = value; }
+ qreal verticalVelocity() const { return yVelocity; }
+ void setVerticalVelocity(qreal value) { yVelocity = value; }
+
QPointF lastOffset;
QPointF offset;
QPoint startPosition;
qreal acceleration;
+ qreal xVelocity;
+ qreal yVelocity;
};
class QPinchGesturePrivate : public QGesturePrivate