summaryrefslogtreecommitdiffstats
path: root/tests/manual/gestures
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-09-01 14:25:42 +0200
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-09-03 11:30:54 +0200
commit466bc1ed4bf0c466e54732b2f8f7a16a34b716a8 (patch)
treed84578adfd77b2dd72f16277db3e0c3f1339528e /tests/manual/gestures
parenta1a0ea71d8861e2b794f2f9b55447d50fc520de3 (diff)
Improved the gesture api.
Made properties in QPanGesture and QPinchGesture more consistent - all of them have value, lastValue and totalValue. Documented that totalValue means the value from the beginning of the gesture, while the 'value' - from the beginning of the current sequence. This is especially useful on Windows when you zoom with two fingers and then release one finger and touch again to continue zooming. Also added a workaround for native Rotate gesture on Windows which contain a 'bad' value in the first WM_GESTURE message in every gesture sequence. Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'tests/manual/gestures')
-rw-r--r--tests/manual/gestures/pinch/pinchwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/manual/gestures/pinch/pinchwidget.cpp b/tests/manual/gestures/pinch/pinchwidget.cpp
index aa11f8decf..cc1644316c 100644
--- a/tests/manual/gestures/pinch/pinchwidget.cpp
+++ b/tests/manual/gestures/pinch/pinchwidget.cpp
@@ -104,8 +104,8 @@ void PinchWidget::onPinchTriggered()
QPoint transformCenter = worldTransform.map(QPoint(width()/2, height()/2));
currentPinchTransform = QTransform()
.translate(transformCenter.x(), transformCenter.y())
- .scale(pinch->scaleFactor(), pinch->scaleFactor())
- .rotateRadians(pinch->rotationAngle())
+ .scale(pinch->totalScaleFactor(), pinch->totalScaleFactor())
+ .rotate(pinch->totalRotationAngle())
.translate(-transformCenter.x(), -transformCenter.y());
update();
}