The QWaylandPointer class represents a pointer device. 更多...
| 头: | #include <QWaylandPointer> |
| qmake: | QT += waylandcompositor |
| Since: | Qt 5.8 |
| 继承: | QWaylandObject |
| 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 ) |
| void | buttonPressedChanged () |
| void | outputChanged () |
The QWaylandPointer class represents a pointer device.
This class provides access to the pointer device in a QWaylandSeat . It corresponds to the Wayland interface wl_pointer.
访问函数:
| bool | isButtonPressed () const |
通知程序信号:
| void | buttonPressedChanged () |
构造 QWaylandPointer 为给定 seat and with the given parent .
Returns the compositor for this QWaylandPointer .
Returns the current local position of the QWaylandPointer .
Returns the current output space position of the QWaylandPointer .
Returns true if any button is currently pressed. Otherwise returns false.
注意: Getter 函数对于特性 isButtonPressed .
Returns the view that currently holds mouse focus.
Returns the output for this QWaylandPointer .
另请参阅 setOutput ().
[signal]
void
QWaylandPointer::
outputChanged
()
Returns the input device for this QWaylandPointer .
[虚拟]
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 .
[虚拟]
uint
QWaylandPointer::
sendMousePressEvent
(
Qt::MouseButton
button
)
Sends a mouse press event for button to the view currently holding mouse focus.
Returns the serial number of the press event.
[虚拟]
uint
QWaylandPointer::
sendMouseReleaseEvent
(
Qt::MouseButton
button
)
Sends a mouse release event for button to the view currently holding mouse focus.
Returns the serial number of the release event.
[虚拟]
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.
Sets the output for this QWaylandPointer to output .
另请参阅 output ().