IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

eventPoint QML Type

Qml equivalent for QEventPoint.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

eventPoint QML Type

  • Import Statement: import QtQuick

  • Instantiates:: QEventPoint

Detailed Description

eventPoint is the Qml value type representation of QEventPoint. It has the same properties as QEventPoint.

The following properties are available:

State supports the following values:

Constant

Description

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

 
Sélectionnez
TapHandler {
    gesturePolicy: TapHandler.ReleaseWithinBounds // exclusive grab on press
    onGrabChanged:
        (transition, eventPoint) =&gt; {
            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
            }
        }
}

See Also

See also handlerPoint

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+