summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qstandardgestures.cpp
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-08-27 11:40:03 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-08-27 12:06:14 (GMT)
commit41631d2803c72565857d68817b4be55a9701e725 (patch)
tree1f9a7b1e716cd53e28fc4ffb2023caec00082337 /src/gui/kernel/qstandardgestures.cpp
parenta69f291170b38166acceef7c93f3b2d6d55c90d1 (diff)
downloadQt-41631d2803c72565857d68817b4be55a9701e725.zip
Qt-41631d2803c72565857d68817b4be55a9701e725.tar.gz
Qt-41631d2803c72565857d68817b4be55a9701e725.tar.bz2
Gestures: make all screen points float
This is more in accordance with touch points, and graphics view Rev-By: Discussed with Denis and Brad
Diffstat (limited to 'src/gui/kernel/qstandardgestures.cpp')
-rw-r--r--src/gui/kernel/qstandardgestures.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index 780c41f..0c4cadf 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -230,8 +230,8 @@ bool QPanGesture::filterEvent(QEvent *event)
// INVARIANT: The singleTouchTimer has still not fired.
// Lets check if the user moved his finger so much from
// the starting point that it makes sense to cancel:
- const QPoint startPos = ev->touchPoints().at(0).startPos().toPoint();
- const QPoint p = ev->touchPoints().at(0).pos().toPoint();
+ const QPointF startPos = ev->touchPoints().at(0).startPos().toPoint();
+ const QPointF p = ev->touchPoints().at(0).pos().toPoint();
if ((startPos - p).manhattanLength() > panBeginRadius)
reset();
else
@@ -367,7 +367,7 @@ bool QPinchGesture::eventFilter(QObject *receiver, QEvent *event)
d->state = Qt::NoGesture;
d->scaleFactor = d->lastScaleFactor = 1;
d->rotationAngle = d->lastRotationAngle = 0;
- d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPoint();
+ d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPointF();
#if defined(Q_WS_WIN)
d->initialDistance = 0;
#endif
@@ -433,7 +433,7 @@ void QPinchGesture::reset()
Q_D(QPinchGesture);
d->scaleFactor = d->lastScaleFactor = 0;
d->rotationAngle = d->lastRotationAngle = 0;
- d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPoint();
+ d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPointF();
QGesture::reset();
}
@@ -483,7 +483,7 @@ qreal QPinchGesture::lastRotationAngle() const
Specifies a center point of the gesture. The point can be used as a center
point that the object is rotated around.
*/
-QPoint QPinchGesture::centerPoint() const
+QPointF QPinchGesture::centerPoint() const
{
return d_func()->centerPoint;
}
@@ -493,7 +493,7 @@ QPoint QPinchGesture::centerPoint() const
Specifies a previous center point of the gesture.
*/
-QPoint QPinchGesture::lastCenterPoint() const
+QPointF QPinchGesture::lastCenterPoint() const
{
return d_func()->lastCenterPoint;
}
@@ -505,7 +505,7 @@ QPoint QPinchGesture::lastCenterPoint() const
startCenterPoint and the centerPoint is the distance at which pinching
fingers has shifted.
*/
-QPoint QPinchGesture::startCenterPoint() const
+QPointF QPinchGesture::startCenterPoint() const
{
return d_func()->startCenterPoint;
}