Qml equivalent for QEventPoint . 更多...
import 语句: | import QtQuick |
实例化: | QEventPoint |
eventPoint is the Qml value type representation of QEventPoint . It has the same properties as QEventPoint .
The following properties are available:
eventPoint.accepted
: see also
QEventPoint::accepted
eventPoint.device
: see also
QEventPoint::device
eventPoint.ellipseDiameters
: see also
QEventPoint::ellipseDiameters
eventPoint.globalGrabPosition
: see also
QEventPoint::globalGrabPosition
eventPoint.globalLastPosition
: see also
QEventPoint::globalLastPosition
eventPoint.globalPosition
: see also
QEventPoint::globalPosition
eventPoint.globalPressPosition
: see also
QEventPoint::globalPressPosition
eventPoint.grabPosition
: see also
QEventPoint::grabPosition
eventPoint.id
: see also
QEventPoint::id
eventPoint.lastPosition
: see also
QEventPoint::lastPosition
eventPoint.lastTimestamp
: see also
QEventPoint::lastTimestamp
eventPoint.position
: see also
QEventPoint::position
eventPoint.pressPosition
: see also
QEventPoint::pressPosition
eventPoint.pressTimestamp
: see also
QEventPoint::pressTimestamp
eventPoint.pressure
: see also
QEventPoint::pressure
eventPoint.rotation
: see also
QEventPoint::rotation
eventPoint.sceneGrabPosition
: see also
QEventPoint::sceneGrabPosition
eventPoint.sceneLastPosition
: see also
QEventPoint::sceneLastPosition
eventPoint.scenePosition
: see also
QEventPoint::scenePosition
eventPoint.pressTimestamp
: see also
QEventPoint::pressTimestamp
eventPoint.scenePressPosition
: see also
QEventPoint::scenePressPosition
eventPoint.state
: see also
QEventPoint::state
eventPoint.timeHeld
: see also
QEventPoint::timeHeld
eventPoint.timestamp
: see also
QEventPoint::timestamp
eventPoint.uniqueId
: see also
QEventPoint::uniqueId
eventPoint.velocity
: see also
QEventPoint::velocity
State supports the following values:
常量 | 描述 |
---|---|
EventPoint.Unknown
|
Unknown state; same as Qt.TouchPointUnknownState |
EventPoint.Stationary
|
The event point did not move; same as Qt.TouchPointStationary |
EventPoint.Pressed
|
The touch point or button is pressed; same as Qt.TouchPointPressed |
EventPoint.Updated
|
The event point was updated; same as Qt.TouchPointMoved |
EventPoint.Released
|
The touch point or button was released; same as Qt.TouchPointReleased |
The States type is a typedef for QFlags<State> . It stores an OR combination of State values. See also QEventPoint::States
TapHandler { gesturePolicy: TapHandler.ReleaseWithinBounds // exclusive grab on press onGrabChanged: (transition, eventPoint) => { switch (transition) { case PointerDevice.GrabExclusive: console.log("took exclusive grab of point", eventPoint.id, "on", eventPoint.device.name) break case PointerDevice.UngrabExclusive: console.log("gave up exclusive grab of point", eventPoint.id, "on", eventPoint.device.name) break case PointerDevice.CancelGrabExclusive: console.log("exclusive grab of point", eventPoint.id, "on", eventPoint.device.name, "has been cancelled") break } switch (eventPoint.state) { case EventPoint.Pressed: console.log("on press @", eventPoint.position); break case EventPoint.Updated: console.log("on update @", eventPoint.position); break case EventPoint.Released: console.log("on release @", eventPoint.position); break default: console.log(eventPoint.position, "state", eventPoint.state) break } } }
另请参阅 handlerPoint .