aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2023-02-08 17:10:37 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2023-04-14 07:32:30 +0200
commitc9e8ad032054174889163ab6d0e65bc719365175 (patch)
tree574a55bd9f3efc3a9908a5fff52304d211f83a2a /src/quick/handlers
parent430d62c28a0654300c9ba4b3692fe54556535c1d (diff)
Use correct names for QEventPoint::State, PointerDevice::GrabTransition
Qt::TouchPointState is not the actual type here, and we should not encourage e.g. making a comparison between eventPoint.state and Qt.TouchPointMoved in an onGrabChanged handler. The equivalence is an internal detail; and eventPoint can come from any pointing device, not only from a touchscreen. QEventPoint is a Q_GADGET; we keep the registration to expose it as a value type (eventPoint). But such types cannot be created in QML, and we also need to give it an uppercase name to scope the enum values that it declares: that's a new foreign namespace called EventPoint. So it's possible to compare an eventPoint instance's state property against EventPoint.Pressed, and so on. Also show complete QML syntax in the \value tables where PointerDevice::GrabTransition is emitted to QML, namely PointerDevice::grabChanged and PointerHandler::grabChanged. Amends b43a873264d012dc0a0e574ea53335a40af8aa38 Task-number: QTBUG-102160 Change-Id: If1a97f21d8e005e3692298b8512f7f8b56a92c97 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/quick/handlers')
-rw-r--r--src/quick/handlers/qquickpointerhandler.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickpointerhandler.cpp b/src/quick/handlers/qquickpointerhandler.cpp
index 1de0a02055..608dd669c3 100644
--- a/src/quick/handlers/qquickpointerhandler.cpp
+++ b/src/quick/handlers/qquickpointerhandler.cpp
@@ -733,6 +733,21 @@ void QQuickPointerHandler::handlePointerEventImpl(QPointerEvent *)
The \a transition (verb) tells what happened.
The \a point (object) is the point that was grabbed or ungrabbed.
+
+ Valid values for \a transition are:
+
+ \value PointerDevice.GrabExclusive
+ This handler has taken primary responsibility for handling the \a point.
+ \value PointerDevice.UngrabExclusive
+ This handler has given up its previous exclusive grab.
+ \value PointerDevice.CancelGrabExclusive
+ This handler's exclusive grab has been taken over or cancelled.
+ \value PointerDevice.GrabPassive
+ This handler has acquired a passive grab, to monitor the \a point.
+ \value PointerDevice.UngrabPassive
+ This handler has given up its previous passive grab.
+ \value PointerDevice.CancelGrabPassive
+ This handler's previous passive grab has terminated abnormally.
*/
/*!