QWaylandPointer Class

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 ()

靜態公共成員

const QMetaObject staticMetaObject

額外繼承成員

詳細描述

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.

特性文檔編製

isButtonPressed : const bool

訪問函數:

bool isButtonPressed () const

通知程序信號:

void buttonPressedChanged ()

成員函數文檔編製

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

構造 QWaylandPointer 為給定 seat 和采用給定 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

Returns a Wayland resource for this QWaylandPointer .

This API doesn't actually make sense, since there may be many pointer resources per client It's here for compatibility reasons.

bool QWaylandPointer:: isButtonPressed () const

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

注意: getter 函數對於特性 isButtonPressed .

QWaylandView *QWaylandPointer:: mouseFocus () const

Returns the view that currently holds mouse focus.

QWaylandOutput *QWaylandPointer:: output () const

Returns the output for this QWaylandPointer .

另請參閱 setOutput ().

[signal] void QWaylandPointer:: outputChanged ()

QWaylandSeat *QWaylandPointer:: seat () const

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.

void QWaylandPointer:: setOutput ( QWaylandOutput * output )

Sets the output for this QWaylandPointer to output .

另請參閱 output ().