aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickmultipointerhandler.cpp
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@qt.io>2016-12-13 11:38:23 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2016-12-27 11:54:46 +0000
commit3eeffae835b3474c8a3ca62125cb8ec24acdaa84 (patch)
tree9dc883768516931acb4f17d93b09bd09087c52a2 /src/quick/handlers/qquickmultipointerhandler.cpp
parent4f69895cf15b9ff76b9a4404709a28153d34de5e (diff)
Let pinchhandler operate on QQuickItem properties
This requires coordinate system mapping that varies with the transformOrigin. The properties exposed from PinchHandler (rotation, scale and translation) are currently relative to the point when the pinch became active. (Therefore, rotation, will reset back to 0 when a new pinch is activated). Its still unclear how the properties that limits the transform should influence. With this patch, they are like this: * {min,max}imumRotation applies to the actual rotation of the item. * {min,max}imumScale applies to the actual scale of the item. * {min,max}imum{X,Y} applies to the actual position of the item. (This has some unfortunate side-effects when the item is scaled or rotated, since the items actual position will change as it rotates) In addition, the behavior described above means that the limits won't have any effect if there is no target item. Change-Id: I279fb03667cd75324e8337039ae2594658265d13 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickmultipointerhandler.cpp')
-rw-r--r--src/quick/handlers/qquickmultipointerhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/handlers/qquickmultipointerhandler.cpp b/src/quick/handlers/qquickmultipointerhandler.cpp
index 746d33a12c..c2060ca3c5 100644
--- a/src/quick/handlers/qquickmultipointerhandler.cpp
+++ b/src/quick/handlers/qquickmultipointerhandler.cpp
@@ -167,7 +167,7 @@ QVector<QQuickMultiPointerHandler::PointData> QQuickMultiPointerHandler::angles(
angles.reserve(m_currentPoints.count());
for (QQuickEventPoint *point : qAsConst(m_currentPoints)) {
qreal angle = QLineF(ref, point->scenePos()).angle();
- angles.append(PointData(point->pointId(), angle));
+ angles.append(PointData(point->pointId(), -angle)); // convert to clockwise, to be consistent with QQuickItem::rotation
}
return angles;
}