PointerDevice QML Type

Provides information about a pointing device. 更多...

import 语句: import QtQuick 2.12

特性

详细描述

A pointing device can be a mouse, a touchscreen, or a stylus on a graphics tablet.

另请参阅 PointerEvent and PointerHandler .

特性文档编制

[read-only] capabilities : enumeration

This property holds a bitwise combination of the capabilities of the pointing device. It tells you under which conditions events are sent, and which properties of PointerEvent are expected to be valid.

Valid values are:

常量 描述
CapabilityFlag.Position the position and scenePosition properties
CapabilityFlag.Area the ellipseDiameters property
CapabilityFlag.Pressure the pressure property
CapabilityFlag.Velocity the velocity property
CapabilityFlag.Scroll a 鼠标 has a wheel, or the operating system recognizes scroll gestures on a TouchPad
CapabilityFlag.Hover events are sent even when no button is pressed, or the finger or stylus is not in contact with the surface
CapabilityFlag.Rotation the rotation property
CapabilityFlag.XTilt horizontal angle between a stylus and the axis perpendicular to the surface
CapabilityFlag.YTilt vertical angle between a stylus and the axis perpendicular to the surface

另请参阅 QTouchDevice::capabilities .

[read-only] pointerType : enumeration

This property holds a value indicating what is interacting with the device. Think of the device as having a planar 2D surface, and the value of this property as identifying what interacts with the device.

There is some redundancy between this property and PointerDevice::type . If a tocuchscreen is used, then the device is TouchScreen and pointerType is Finger (always).

Valid values are:

常量 描述
PointerDevice.GenericPointer a mouse or something acting like a mouse (the core pointer on X11)
PointerDevice.Finger the user's finger
PointerDevice.Pen the drawing end of a stylus
PointerDevice.Eraser the other end of the stylus (if it has a virtual eraser on the other end)
PointerDevice.Cursor a cursor in the pre-computer sense of the word
PointerDevice.AllPointerTypes any of the above (used as a default value in constructors)

[read-only] type : enumeration

This property holds the type of the pointing device.

Valid values are:

常量 描述
DeviceType.UnknownDevice the device cannot be identified
DeviceType.Mouse a mouse
DeviceType.TouchScreen a touchscreen providing absolute coordinates
DeviceType.TouchPad a trackpad or touchpad providing relative coordinates
DeviceType.Stylus a pen-like device
DeviceType.Airbrush a stylus with a thumbwheel to adjust tangentialPressure
DeviceType.Puck a device that is similar to a flat mouse with a transparent circle with cross-hairs (same as Puck )
DeviceType.AllDevices any of the above; used as a default value for construction

另请参阅 QTouchDevice::DeviceType .