QWaylandPointer Class

The QWaylandPointer class represents a pointer device. More...

Header: #include <QWaylandPointer>
qmake: QT += waylandcompositor
Inherits: QWaylandObject

This class is under development and is subject to change.


  • 1 property inherited from QObject

Public Functions

QWaylandPointer(QWaylandInputDevice *inputDevice, QObject *parent = nullptr)
QWaylandCompositor *compositor() const
QPointF currentLocalPosition() const
QPointF currentSpacePosition() const
wl_resource *focusResource() const
QWaylandInputDevice *inputDevice() const
bool isButtonPressed() const
QWaylandView *mouseFocus() const
QWaylandOutput *output() const
virtual void sendMouseMoveEvent(QWaylandView *view, const QPointF &localPos, const QPointF &outputSpacePos)
virtual void sendMousePressEvent(Qt::MouseButton button)
virtual void sendMouseReleaseEvent(Qt::MouseButton button)
virtual void sendMouseWheelEvent(Qt::Orientation orientation, int delta)
void setOutput(QWaylandOutput *output)


Additional Inherited Members

  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QWaylandPointer class represents a pointer device.

This class provides access to the pointer device in a QWaylandInputDevice. It corresponds to the Wayland interface wl_pointer.

Property Documentation

isButtonPressed : const bool

Access functions:

bool isButtonPressed() const

Notifier signal:

void buttonPressedChanged()

Member Function Documentation

QWaylandPointer::QWaylandPointer(QWaylandInputDevice *inputDevice, QObject *parent = nullptr)

Constructs a QWaylandPointer for the given inputDevice and with the given parent.

QWaylandCompositor *QWaylandPointer::compositor() const

Returns the compositor for this QWaylandPointer.

QPointF QWaylandPointer::currentLocalPosition() const

Returns the current local position of the QWaylandPointer.

QPointF QWaylandPointer::currentSpacePosition() const

Returns the current output space position of the QWaylandPointer.

wl_resource *QWaylandPointer::focusResource() const

QWaylandInputDevice *QWaylandPointer::inputDevice() const

Returns the input device for this QWaylandPointer.

bool QWaylandPointer::isButtonPressed() const

Returns true if any button is currently pressed. Otherwise returns false.

Note: Getter function for property isButtonPressed.

QWaylandView *QWaylandPointer::mouseFocus() const

Returns the view that currently holds mouse focus.

QWaylandOutput *QWaylandPointer::output() const

Returns the output for this QWaylandPointer.

See also setOutput().

[signal] void QWaylandPointer::outputChanged()

[virtual] void QWaylandPointer::sendMouseMoveEvent(QWaylandView *view, const QPointF &localPos, const QPointF &outputSpacePos)

Sets the current mouse focus to view and sends a mouse move event to it with the local position localPos and output space position outputSpacePos.

[virtual] void QWaylandPointer::sendMousePressEvent(Qt::MouseButton button)

Sends a mouse press event for button to the view currently holding mouse focus.

[virtual] void QWaylandPointer::sendMouseReleaseEvent(Qt::MouseButton button)

Sends a mouse release event for button to the view currently holding mouse focus.

[virtual] void QWaylandPointer::sendMouseWheelEvent(Qt::Orientation orientation, int delta)

Sends a mouse wheel event with the given orientation and delta to the view that currently holds mouse focus.

void QWaylandPointer::setOutput(QWaylandOutput *output)

Sets the output for this QWaylandPointer to output.

See also output().

© 2016 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.