PointerDevice QML Type
QML equivalent for QPointingDevice. More...
Import Statement: | import QtQuick |
Instantiates: | QPointingDevice |
Properties
- buttonCount : int
- deviceType : enumeration
- maximumPoints : int
- pointerType : enumeration
- uniqueId : pointingDeviceUniqueId
Signals
- grabChanged(QtObject grabber, enumeration transition, PointerEvent event, eventPoint point)
Detailed Description
PointerDevice is the QML name of the QPointingDevice class. It has the same properties and enums as QPointingDevice.
Property Documentation
buttonCount : int |
This property tells the maximum number of on-device buttons that can be detected.
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. |
See also QInputDevice::DeviceType and PointerDeviceHandler::acceptedDevices.
maximumPoints : int |
This property tells the maximum number of simultaneous touch points (fingers) that can be detected.
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. |
See also QPointingDevice::PointerType and PointerDeviceHandler::acceptedPointerTypes.
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.
See also eventPoint and QEventPoint::uniqueId().
Signal Documentation
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 |
---|---|
PointerDevice.GrabExclusive | The grabber has taken primary responsibility for handling the point. |
PointerDevice.UngrabExclusive | The grabber has given up its previous exclusive grab. |
PointerDevice.CancelGrabExclusive | The exclusive grab of grabber has been taken over or cancelled. |
PointerDevice.GrabPassive | The grabber has acquired a passive grab, to monitor the point. |
PointerDevice.UngrabPassive | The grabber has given up its previous passive grab. |
PointerDevice.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.
Note: The corresponding handler is onGrabChanged
.
See also QPointerEvent::setExclusiveGrabber(), QPointerEvent::addPassiveGrabber(), QPointerEvent::removePassiveGrabber(), and PointerHandler::grabChanged().