Nesta página

QWaylandTouch Class

A classe QWaylandTouch fornece acesso a um dispositivo sensível ao toque. Mais...

Cabeçalho: #include <QWaylandTouch>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
Herdado de: QWaylandObject

Funções públicas

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)

Descrição detalhada

Esta classe fornece acesso ao dispositivo de toque em um ` QWaylandSeat`. Ela corresponde à interface Wayland `wl_touch`.

Documentação das funções-membro

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

Cria um objeto `QWaylandTouch` para o ` seat ` e com o ` parent` fornecido.

QWaylandCompositor *QWaylandTouch::compositor() const

Retorna o compositor para este QWaylandTouch.

QWaylandSeat *QWaylandTouch::seat() const

Retorna o dispositivo de entrada para este ` QWaylandTouch`.

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

Envia um evento de cancelamento de toque ao dispositivo de toque de um ` client`.

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

Envia um evento de quadro de toque ao dispositivo de toque de um ` client`. Isso indica o fim de uma lista de pontos de contato.

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

Envia todos os pontos de toque em ` event ` para ` surface`, seguido por um evento de quadro de toque.

Veja também sendTouchPointEvent() e sendFrameEvent().

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

Envia um evento de ponto de toque ao dispositivo de toque de surface com os valores fornecidos para id, position e state.

Retorna o número de série do evento de pressão ou liberação, se enviado; caso contrário, retorna 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.