QML equivalent for QPointingDevice . 更多...
import 语句: | import QtQuick |
实例化: | QPointingDevice |
PointerDevice is the QML name of the QPointingDevice class. It has the same properties and enums as QPointingDevice .
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:
常量 | 描述 |
---|---|
PointerDevice.Unknown
|
The device cannot be identified. |
PointerDevice.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. |
另请参阅 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:
常量 | 描述 |
---|---|
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. |
另请参阅 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.
另请参阅 eventPoint and QEventPoint::uniqueId ().
grabChanged ( QtObject grabber , enumeration transition , PointerEvent event , eventPoint point ) |
此信号被发射当
grabber
object gains or loses an exclusive or passive grab of
point
during delivery of
event
。
transition
tells what happened, from the perspective of the
grabber
object, which may be either an
Item
或
Input Handler
.
Valid values for transition 是:
常量 | 描述 |
---|---|
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.
注意:
相应处理程序是
onGrabChanged
.
另请参阅 QPointerEvent::setExclusiveGrabber (), QPointerEvent::addPassiveGrabber (),和 QPointerEvent::removePassiveGrabber ().