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

QPointingDeviceUniqueId Class

QPointingDeviceUniqueId identifies a unique object, such as a tagged token or stylus, which is used with a pointing device.

This class was introduced in Qt 5.8.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QPointingDeviceUniqueId Class

  • Header: QPointingDeviceUniqueId

  • Since: Qt 5.8

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Gui)

    target_link_libraries(mytarget PRIVATE Qt6::Gui)

  • qmake: QT += gui

  • Group: QPointingDeviceUniqueId is part of events

Detailed Description

QPointingDeviceUniqueIds can be compared for equality, and can be used as keys in a QHash. You get access to the numerical ID via numericId(), if the device supports such IDs. For future extensions, though, you should not use that function, but compare objects of this type using the equality operator.

This class is a thin wrapper around an integer ID. You pass it into and out of functions by value.

See Also

See also QEventPoint

Property Documentation

 

[read-only] numericId : const qint64

This property holds the numeric unique ID of the token represented by a touchpoint

If the device provides a numeric ID, isValid() returns true, and this property provides the numeric ID; otherwise it is -1.

You should not use the value of this property in portable code, but instead rely on equality to identify pointers.

Access functions:

  • qint64 numericId() const

See Also

See also isValid()

Member Function Documentation

 

QPointingDeviceUniqueId::QPointingDeviceUniqueId()

Constructs an invalid unique pointer ID.

[static] QPointingDeviceUniqueId QPointingDeviceUniqueId::fromNumericId(qint64 id)

Constructs a unique pointer ID from numeric ID id.

bool QPointingDeviceUniqueId::isValid() const

Returns whether this unique pointer ID is valid, that is, it represents an actual pointer.

Related Non-Members

 

[since 5.8] size_t qHash(QPointingDeviceUniqueId key, size_t seed = 0)

Returns the hash value for key, using seed to seed the calculation.

This function was introduced in Qt 5.8.

[since 5.8] bool operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)

Returns whether the two unique pointer IDs lhs and rhs identify different pointers (true) or not (false).

This function was introduced in Qt 5.8.

[since 5.8] bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)

Returns whether the two unique pointer IDs lhs and rhs identify the same pointer (true) or not (false).

This function was introduced in Qt 5.8.

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