PointerDevice QML Type▲
-
Import Statement: import QtQuick
-
Instantiates:: QPointingDevice
I. Detailed Description▲
PointerDevice is the QML name of the QPointingDevice class. It has the same properties and enums as QPointingDevice.
II. Property Documentation▲
II-1. [read-only] buttonCount : int▲
II-2. deviceType : enumeration▲
This property tells the type of device that generated a PointerEvent.
Valid values are:
Constant |
Description |
---|---|
PointerDevice.Unknown |
The device cannot be identified. |
PointerDevice.Mouse |
A mouse. |
PointerDevice.TouchScreen |
A touchscreen. |
PointerDevice.TouchPad |
A touchpad or trackpad. |
PointerDevice.Stylus |
A stylus on a graphics tablet. |
PointerDevice.Airbrush |
An airbrush on a graphics tablet. |
PointerDevice.Puck |
A digitizer with crosshairs, on a graphics tablet. |
II-2-1. See Also▲
II-3. [read-only] maximumPoints : int▲
This property tells the maximum number of simultaneous touch points (fingers) that can be detected.
II-4. [read-only] pointerType : enumeration▲
This property tells what is interacting with the PointerDevice.
There is some redundancy between this property and deviceType. For example, if a touchscreen is used, then deviceType is TouchScreen and pointerType is 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. PointerDeviceHandler::acceptedDevices and PointerDeviceHandler::acceptedPointerTypes can be used in combination to filter the subset of events that a particular handler should react to.
Valid values are:
Constant |
Description |
---|---|
PointerDevice.Unknown |
The device cannot be identified. |
PointerDevice.Generic |
A mouse or a device that emulates a mouse. |
PointerDevice.Finger |
A finger on a touchscreen. |
PointerDevice.Pen |
A stylus on a graphics tablet. |
PointerDevice.Eraser |
An eraser on a graphics tablet. |
PointerDevice.Cursor |
A digitizer with crosshairs, on a graphics tablet. |
II-4-1. See Also▲
II-5. [read-only] uniqueId : pointingDeviceUniqueId▲
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.
II-5-1. See Also▲
See also eventPoint, QEventPoint::uniqueId()
III. Signal Documentation▲
III-1. grabChanged(QtObject grabber, enumeration transition, PointerEvent event, eventPoint point)▲
This signal is emitted when the grabber object gains or loses an exclusive or passive grab of point during delivery of event. The transition tells what happened, from the perspective of the grabber object, which may be either an Item or an Input Handler.
Valid values for transition are:
Constant |
Description |
---|---|
GrabExclusive |
The grabber has taken primary responsibility for handling the point. |
UngrabExclusive |
The grabber has given up its previous exclusive grab. |
CancelGrabExclusive |
The exclusive grab of grabber has been taken over or cancelled. |
GrabPassive |
The grabber has acquired a passive grab, to monitor the point. |
UngrabPassive |
The grabber has given up its previous passive grab. |
CancelGrabPassive |
The previous passive grab has terminated abnormally. |
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.
The corresponding handler is onGrabChanged.