diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-02-08 22:13:35 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-03-15 20:51:00 +0100 |
commit | b357aca569028e46291d0c8f223c51333d1a2367 (patch) | |
tree | 5f04c95aebe89b088fd902de2a7ce5b8d9325a76 | |
parent | 9b821b49cef736e14722f8473bc23dda1e0d58e0 (diff) |
doc: Add qml PointerDevice, pointingDeviceUniqueId and PointerEvent
We need a link target for the GrabTransition enum argument in the
PointerHandler::grabChanged QML signal doc, and a few other places.
Fix warnings about failing to link in a couple of places.
Fixes: QTBUG-102160
Task-number: QTBUG-104761
Change-Id: I92a544d363a6ff9e990c7d56c110bc5db1202bb3
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
(cherry picked from commit e283c05af745210d4a1f6c0aa9c33bf4da23a1e0)
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r-- | src/quick/items/qquickitemsmodule.cpp | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp index 718e730a79..d569f201ce 100644 --- a/src/quick/items/qquickitemsmodule.cpp +++ b/src/quick/items/qquickitemsmodule.cpp @@ -196,4 +196,138 @@ void QQuickItemsModule::defineModule() qt_quickitems_defineModule(); } +/*! + \qmltype PointerEvent + \instantiates QPointerEvent + \inqmlmodule QtQuick + \brief QML equivalent for \l QPointerEvent. + + PointerEvent is the QML name of the QPointerEvent class. +*/ + +/*! + \qmltype PointerDevice + \instantiates QPointingDevice + \inqmlmodule QtQuick + \brief QML equivalent for \l QPointingDevice. + + PointerDevice is the QML name of the QPointingDevice class. + It has the same properties and enums as \l QPointingDevice. +*/ + +/*! + \qmlproperty enumeration PointerDevice::deviceType + + This property tells the type of device that generated a PointerEvent. + + Valid values are: + + \value PointerDevice.Unknown The device cannot be identified. + \value PointerDevice.Mouse A mouse. + \value PointerDevice.TouchScreen A touchscreen. + \value PointerDevice.TouchPad A touchpad or trackpad. + \value PointerDevice.Stylus A stylus on a graphics tablet. + \value PointerDevice.Airbrush An airbrush on a graphics tablet. + \value PointerDevice.Puck A digitizer with crosshairs, on a graphics tablet. + + \sa QInputDevice::DeviceType, PointerDeviceHandler::acceptedDevices +*/ + +/*! + \qmlproperty enumeration PointerDevice::pointerType + + This property tells what is interacting with the PointerDevice. + + There is some redundancy between this property and \l deviceType. + For example, if a touchscreen is used, then \c deviceType is + \c TouchScreen and \c pointerType is \c Finger. But on a graphics + tablet, it's often possible for both ends of the stylus to be used, + and programs need to distinguish them. + \l PointerDeviceHandler::acceptedDevices and + \l PointerDeviceHandler::acceptedPointerTypes can be used in combination + to filter the subset of events that a particular handler should react to. + + Valid values are: + + \value PointerDevice.Unknown The device cannot be identified. + \value PointerDevice.Generic A mouse or a device that emulates a mouse. + \value PointerDevice.Finger A finger on a touchscreen. + \value PointerDevice.Pen A stylus on a graphics tablet. + \value PointerDevice.Eraser An eraser on a graphics tablet. + \value PointerDevice.Cursor A digitizer with crosshairs, on a graphics tablet. + + \sa QPointingDevice::PointerType, PointerDeviceHandler::acceptedPointerTypes +*/ + +/*! + \qmlproperty int PointerDevice::maximumPoints + + This property tells the maximum number of simultaneous touch points + (fingers) that can be detected. +*/ + +/*! + \qmlproperty int PointerDevice::buttonCount + + This property tells the maximum number of on-device buttons that can be + detected. +*/ + +/*! + \qmltype pointingDeviceUniqueId + \instantiates QPointingDeviceUniqueId + \inqmlmodule QtQuick + \brief QML equivalent for \l QPointingDeviceUniqueId. + + pointingDeviceUniqueId is the QML name of the QPointingDeviceUniqueId class. +*/ + +/*! + \qmlproperty qint64 pointingDeviceUniqueId::numericId + + This property gives the numeric ID of the \l PointerDevice, if available; + otherwise it is \c -1. +*/ + +/*! + \qmlproperty pointingDeviceUniqueId PointerDevice::uniqueId + + This property may provide a unique ID for the device, if available. For + example, a graphics tablet stylus device may have a unique serial number. + + \sa eventPoint, QEventPoint::uniqueId() +*/ + +/*! + \qmlsignal PointerDevice::grabChanged(QtObject grabber, enumeration transition, PointerEvent event, eventPoint point) + + This signal is emitted when the \a grabber object gains or loses an + exclusive or passive grab of \a point during delivery of \a event. + The \a transition tells what happened, from the perspective of the + \c grabber object, which may be either an \l Item or an + \l {Qt Quick Input Handlers}{Input Handler}. + + Valid values for \a transition are: + + \value GrabExclusive + The \a grabber has taken primary responsibility for handling the \a point. + \value UngrabExclusive + The \a grabber has given up its previous exclusive grab. + \value CancelGrabExclusive + The exclusive grab of \a grabber has been taken over or cancelled. + \value GrabPassive + The \a grabber has acquired a passive grab, to monitor the \a point. + \value UngrabPassive + The \a grabber has given up its previous passive grab. + \value CancelGrabPassive + The previous passive grab has terminated abnormally. + + \note A grab transition from one object to another results in two signals, + to notify that one object has lost its grab, and to notify that there is + another grabber. In other cases, when transitioning to or from a non-grabbing + state, only one signal is emitted. + + \sa QPointerEvent::setExclusiveGrabber(), QPointerEvent::addPassiveGrabber(), QPointerEvent::removePassiveGrabber() +*/ + QT_END_NAMESPACE |