diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-08-21 17:52:41 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-08-22 11:51:01 +0000 |
commit | d83cb16d3cecad7ec2e9b45416620b87b52f2885 (patch) | |
tree | f0135fbd96a9514f7faac2b4b4f038bd35cd69a5 /src/quick/handlers/qquickmultipointhandler.cpp | |
parent | 8bda9227a227dafac93c574bdf1071277b7b6f90 (diff) |
Doc: clarify the type and meaning of QQuickMultiPointHandler::centroid
Amends 52d35526f256bf4c8155f5e660a214ab8a2efbdf : it's now a QQuickHandlerPoint
rather than QPointF, and is inherited from MultiPointHandler to DragHandler
and PinchHandler. So the docs can be inherited too, but in PinchHandler
it seems more appropriate to keep the overridden docs which explain that
transformation around the centroid depends on pinchOrigin.
Task-number: QTBUG-70074
Change-Id: I8875b38439fe80c311a685ab9e3dedc9357415e8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickmultipointhandler.cpp')
-rw-r--r-- | src/quick/handlers/qquickmultipointhandler.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickmultipointhandler.cpp b/src/quick/handlers/qquickmultipointhandler.cpp index 5606162f15..cb3becaa2d 100644 --- a/src/quick/handlers/qquickmultipointhandler.cpp +++ b/src/quick/handlers/qquickmultipointhandler.cpp @@ -329,4 +329,13 @@ void QQuickMultiPointHandler::moveTarget(QPointF pos) m_centroid.m_position = target()->mapFromScene(m_centroid.m_scenePosition); } +/*! + \readonly + \qmlproperty QQuickHandlerPoint QtQuick::MultiPointHandler::centroid + + A point exactly in the middle of the currently-pressed touch points. + If only one point is pressed, it's the same as that point. + A handler that has a \l target will normally transform it relative to this point. +*/ + QT_END_NAMESPACE |