Sur cette page

QWaylandTouch Class

La classe QWaylandTouch permet d'accéder à un périphérique tactile. En savoir plus...

En-tête : #include <QWaylandTouch>
CMake : find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake : QT += waylandcompositor
Hérite de : QWaylandObject

Fonctions publiques

QWaylandTouch(QWaylandSeat *seat, QObject *parent = nullptr)
QWaylandCompositor *compositor() const
QWaylandSeat *seat() const
virtual void sendCancelEvent(QWaylandClient *client)
virtual void sendFrameEvent(QWaylandClient *client)
virtual void sendFullTouchEvent(QWaylandSurface *surface, QTouchEvent *event)
virtual uint sendTouchPointEvent(QWaylandSurface *surface, int id, const QPointF &position, Qt::TouchPointState state)

Description détaillée

Cette classe permet d'accéder au périphérique tactile dans un environnement « QWaylandSeat ». Elle correspond à l'interface Wayland wl_touch.

Documentation des fonctions membres

QWaylandTouch::QWaylandTouch(QWaylandSeat *seat, QObject *parent = nullptr)

Crée un objet `QWaylandTouch` pour l'seat, en utilisant l'parent` spécifié.

QWaylandCompositor *QWaylandTouch::compositor() const

Renvoie le compositeur associé à cette QWaylandTouch.

QWaylandSeat *QWaylandTouch::seat() const

Renvoie le périphérique d'entrée associé à cette instance de ` QWaylandTouch`.

[virtual] void QWaylandTouch::sendCancelEvent(QWaylandClient *client)

Envoie un événement « touch cancel » à l'appareil tactile d'un objet ` client`.

[virtual] void QWaylandTouch::sendFrameEvent(QWaylandClient *client)

Envoie un événement « touch frame » à l'appareil tactile d'un objet ` client`. Cela indique la fin d'une liste de points de contact.

[virtual] void QWaylandTouch::sendFullTouchEvent(QWaylandSurface *surface, QTouchEvent *event)

Envoie tous les points de contact de la fenêtre « event » vers l'adresse spécifiée surface, suivis d'un événement de cadre de contact.

Voir également sendTouchPointEvent() et sendFrameEvent().

[virtual] uint QWaylandTouch::sendTouchPointEvent(QWaylandSurface *surface, int id, const QPointF &position, Qt::TouchPointState state)

Envoie un événement de point de contact à l'appareil tactile de surface avec les paramètres id, position et state fournis.

Renvoie le numéro de série de l'événement « down » ou « up » s'il a été envoyé, sinon 0.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.