QWaylandPointer Class
Die Klasse „QWaylandPointer“ repräsentiert ein Zeigegerät. Mehr...
| Header: | #include <QWaylandPointer> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
| qmake: | QT += waylandcompositor |
| Erbt von: | QWaylandObject |
Eigenschaften
- isButtonPressed : bool
Öffentliche Funktionen
| QWaylandPointer(QWaylandSeat *seat, QObject *parent = nullptr) | |
| QWaylandCompositor * | compositor() const |
| QPointF | currentLocalPosition() const |
| QPointF | currentSpacePosition() const |
| wl_resource * | focusResource() const |
| bool | isButtonPressed() const |
| QWaylandView * | mouseFocus() const |
| QWaylandOutput * | output() const |
| QWaylandSeat * | seat() const |
| virtual void | sendMouseMoveEvent(QWaylandView *view, const QPointF &localPos, const QPointF &outputSpacePos) |
| virtual uint | sendMousePressEvent(Qt::MouseButton button) |
| virtual uint | sendMouseReleaseEvent(Qt::MouseButton button) |
| virtual void | sendMouseWheelEvent(Qt::Orientation orientation, int delta) |
| void | setOutput(QWaylandOutput *output) |
Signale
| void | buttonPressedChanged() |
Ausführliche Beschreibung
Diese Klasse ermöglicht den Zugriff auf das Zeiger-Gerät in einem „ QWaylandSeat “. Sie entspricht der Wayland-Schnittstelle „wl_pointer“.
Dokumentation der Eigenschaften
[read-only] isButtonPressed : bool
Diese Eigenschaft gibt an, ob derzeit eine Maustaste gedrückt ist.
Der Wert lautet „ true “, wenn mindestens eine Maustaste gedrückt ist; andernfalls „ false “.
Zugriffsfunktionen:
| bool | isButtonPressed() const |
Notifier-Signal:
| void | buttonPressedChanged() |
Dokumentation der Member-Funktionen
QWaylandPointer::QWaylandPointer(QWaylandSeat *seat, QObject *parent = nullptr)
Erstellt einen `QWaylandPointer` für die angegebene ` seat ` und mit der angegebenen ` parent`.
QWaylandCompositor *QWaylandPointer::compositor() const
Gibt den Compositor für diese „ QWaylandPointer “ zurück.
QPointF QWaylandPointer::currentLocalPosition() const
Gibt die aktuelle lokale Position des „ QWaylandPointer “ in Oberflächenkoordinaten zurück.
QPointF QWaylandPointer::currentSpacePosition() const
Gibt die aktuelle Position des „ QWaylandPointer “ im Ausgabebereich zurück.
wl_resource *QWaylandPointer::focusResource() const
Gibt eine Wayland-Ressource für diese QWaylandPointer zurück.
Diese API ist eigentlich nicht sinnvoll, da es pro Client viele Zeiger-Ressourcen geben kann. Sie ist aus Kompatibilitätsgründen vorhanden.
bool QWaylandPointer::isButtonPressed() const
Gibt „true“ zurück, wenn derzeit eine Taste gedrückt ist. Andernfalls wird „false“ zurückgegeben.
Hinweis: Getter -Funktion für die Eigenschaft „isButtonPressed“.
QWaylandView *QWaylandPointer::mouseFocus() const
Gibt die Ansicht zurück, auf der sich derzeit der Mausfokus befindet.
QWaylandOutput *QWaylandPointer::output() const
Gibt die Ausgabe für diese QWaylandPointer zurück.
Siehe auch setOutput().
QWaylandSeat *QWaylandPointer::seat() const
Gibt das Eingabegerät für diese „ QWaylandPointer “ zurück.
[virtual] void QWaylandPointer::sendMouseMoveEvent(QWaylandView *view, const QPointF &localPos, const QPointF &outputSpacePos)
Setzt den aktuellen Mausfokus auf „ view “ und sendet ein Mausbewegungsereignis an diese mit der lokalen Position localPos in Oberflächenkoordinaten und der Position im Ausgaberaum outputSpacePos.
[virtual] uint QWaylandPointer::sendMousePressEvent(Qt::MouseButton button)
Sendet ein Mausklick-Ereignis für „ button “ an die Ansicht, die derzeit den Mausfokus hat.
Gibt die Seriennummer des Klickereignisses zurück.
[virtual] uint QWaylandPointer::sendMouseReleaseEvent(Qt::MouseButton button)
Sendet ein Maus-Release-Ereignis für „ button “ an die Ansicht, auf der sich der Mausfokus gerade befindet.
Gibt die Seriennummer des Loslassereignisses zurück.
[virtual] void QWaylandPointer::sendMouseWheelEvent(Qt::Orientation orientation, int delta)
Sendet ein Mausrad-Ereignis mit den angegebenen Werten für „ orientation “ und „ delta “ an die Ansicht, die derzeit den Mausfokus hat.
void QWaylandPointer::setOutput(QWaylandOutput *output)
Legt die Ausgabe für diese „ QWaylandPointer “ auf „ output “ fest.
Siehe auch output().
© 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.