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

TouchPoint QML Type

Describes a touch point in a MultiPointTouchArea.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

TouchPoint QML Type

  • Import Statement: import QtQuick

  • Group: TouchPoint is part of qtquick-input-events

Detailed Description

The TouchPoint type contains information about a touch point, such as the current position, pressure, and area.

Image non disponible

Property Documentation

 

[read-only] x : real

[read-only] y : real

These properties hold the current position of the touch point.

[read-only] pressure : real

[read-only] velocity : vector2d

These properties hold additional information about the current state of the touch point.

  • pressure is a value in the range of 0.0 to 1.0.

  • velocity is a vector with magnitude reported in pixels per second.

Not all touch devices support velocity. If velocity is not supported, it will be reported as 0,0.

[read-only] startX : real

[read-only] startY : real

These properties hold the starting position of the touch point.

[read-only] previousX : real

[read-only] previousY : real

These properties hold the previous position of the touch point.

[read-only] sceneX : real

[read-only] sceneY : real

These properties hold the current position of the touch point in scene coordinates.

[read-only, since 5.9] ellipseDiameters : size

This property holds the major and minor axes of the ellipse representing the covered area of the touch point.

This property was introduced in Qt 5.9.

[read-only] pointId : int

This property holds the point id of the touch point.

Each touch point within a MultiPointTouchArea will have a unique id.

[read-only] pressed : bool

This property holds whether the touch point is currently pressed.

[read-only, since 5.9] rotation : real

This property holds the angular orientation of this touch point. The return value is in degrees, where zero (the default) indicates the finger or token is pointing upwards, a negative angle means it's rotated to the left, and a positive angle means it's rotated to the right. Most touchscreens do not detect rotation, so zero is the most common value.

This property was introduced in Qt 5.9.

See Also

[read-only, since 5.9] uniqueId : pointingDeviceUniqueId

This property holds the unique ID of the touch point or token.

It is normally empty, because touchscreens cannot uniquely identify fingers. But when it is set, it is expected to uniquely identify a specific token (fiducial object).

Interpreting the contents of this ID requires knowledge of the hardware and drivers in use (e.g. various TUIO-based touch surfaces).

This property was introduced in Qt 5.9.

Obsolete Members for TouchPoint

The following members of QML type TouchPoint are deprecated. We strongly advise against using them in new code.

Obsolete Property Documentation

 
[read-only] area : rectangle

This property is deprecated. We strongly advise against using it in new code.

A rectangle covering the area of the touch point, centered on the current position of the touch point.

It is deprecated because a touch point is more correctly modeled as an ellipse, whereas this rectangle represents the outer bounds of the ellipse after rotation.

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