QWaylandSeat Class▲
-
Header: QWaylandSeat
-
Since: Qt 5.8
-
qmake: QT += waylandcompositor
-
Inherits: QWaylandObject
Detailed Description▲
The QWaylandSeat provides access to different types of user input and maintains a keyboard focus and a mouse pointer. It corresponds to the wl_seat interface in the Wayland protocol.
Member Type Documentation▲
enum QWaylandSeat::CapabilityFlag▲
flags QWaylandSeat::CapabilityFlags
This enum type describes the capabilities of a QWaylandSeat.
Constant |
Value |
Description |
---|---|---|
QWaylandSeat::Pointer |
0x01 |
The QWaylandSeat supports pointer input. |
QWaylandSeat::Keyboard |
0x02 |
The QWaylandSeat supports keyboard input. |
QWaylandSeat::Touch |
0x04 |
The QWaylandSeat supports touch input. |
QWaylandSeat::DefaultCapabilities |
Pointer | Keyboard | Touch |
The QWaylandSeat has the default capabilities. |
The CapabilityFlags type is a typedef for QFlags<CapabilityFlag>. It stores an OR combination of CapabilityFlag values.
Member Function Documentation▲
QWaylandSeat::QWaylandSeat(QWaylandCompositor *compositor, QWaylandSeat::CapabilityFlags capabilityFlags = DefaultCapabilities)▲
Constructs a QWaylandSeat for the given compositor and with the given capabilityFlags.
[override virtual] QWaylandSeat::~QWaylandSeat()▲
Destroys the QWaylandSeat
QWaylandSeat::CapabilityFlags QWaylandSeat::capabilities() const▲
Returns the capability flags for this QWaylandSeat.
QWaylandCompositor *QWaylandSeat::compositor() const▲
Returns the compositor for this QWaylandSeat.
QWaylandDrag *QWaylandSeat::drag() const▲
Returns the drag object for this QWaylandSeat.
Getter function for property drag.
[static] QWaylandSeat *QWaylandSeat::fromSeatResource(struct ::wl_resource *resource)▲
Returns the QWaylandSeat corresponding to the resource. The resource is expected to have the type wl_seat.
QWaylandKeyboard *QWaylandSeat::keyboard() const▲
Returns the keyboard for this input device.
QWaylandSurface *QWaylandSeat::keyboardFocus() const▲
QWaylandView *QWaylandSeat::mouseFocus() const▲
void QWaylandSeat::mouseFocusChanged(QWaylandView *newFocus, QWaylandView *oldFocus)▲
This signal is emitted when the mouse focus has changed from oldFocus to newFocus.
QWaylandPointer *QWaylandSeat::pointer() const▲
Returns the pointer device for this QWaylandSeat.
void QWaylandSeat::sendFullKeyEvent(QKeyEvent *event)▲
Sends the event to the keyboard device.
void QWaylandSeat::sendFullTouchEvent(QWaylandSurface *surface, QTouchEvent *event)▲
Sends the event to the specified surface on the touch device.
void QWaylandSeat::sendKeyPressEvent(uint code)▲
Sends a key press event with the key code to the keyboard device.
void QWaylandSeat::sendKeyReleaseEvent(uint code)▲
Sends a key release event with the key code to the keyboard device.
void QWaylandSeat::sendMouseMoveEvent(QWaylandView *view, const QPointF &localPos, const QPointF &outputSpacePos = QPointF())▲
Sets the mouse focus to view and sends a mouse move event to the pointer device with the local position localPos and output space position outputSpacePos.
void QWaylandSeat::sendMousePressEvent(Qt::MouseButton button)▲
Sends a mouse press event for button to the QWaylandSeat's pointer device.
void QWaylandSeat::sendMouseReleaseEvent(Qt::MouseButton button)▲
Sends a mouse release event for button to the QWaylandSeat's pointer device.
void QWaylandSeat::sendMouseWheelEvent(Qt::Orientation orientation, int delta)▲
Sends a mouse wheel event to the QWaylandSeat's pointer device with the given orientation and delta.
void QWaylandSeat::sendTouchCancelEvent(QWaylandClient *client)▲
Sends a cancel event to the touch device of a client.
void QWaylandSeat::sendTouchFrameEvent(QWaylandClient *client)▲
Sends a frame event to the touch device of a client to indicate the end of a series of touch up, down, and motion events.
uint QWaylandSeat::sendTouchPointEvent(QWaylandSurface *surface, int id, const QPointF &point, Qt::TouchPointState state)▲
Sends a touch point event to the surface on a touch device with the given id, point and state.
Returns the serial for the touch up or touch down event.
uint QWaylandSeat::sendTouchPointMoved(QWaylandSurface *surface, int id, const QPointF &position)▲
Sends a touch moved event for the touch point id on surface with position position.
You need to send a touch frame event when you are done sending touch events.
Returns the serial for the touch motion event.
uint QWaylandSeat::sendTouchPointPressed(QWaylandSurface *surface, int id, const QPointF &position)▲
Sends a touch pressed event for the touch point id on surface with position position.
You need to send a touch frame event when you are done sending touch events.
Returns the serial for the touch down event.
uint QWaylandSeat::sendTouchPointReleased(QWaylandSurface *surface, int id, const QPointF &position)▲
Sends a touch released event for the touch point id on surface with position position.
You need to send a touch frame event when you are done sending touch events.
Returns the serial for the touch up event.
bool QWaylandSeat::setKeyboardFocus(QWaylandSurface *surface)▲
Sets the current keyboard focus to surface. Returns a boolean indicating if the operation was successful.
See Also▲
See also keyboardFocus()
void QWaylandSeat::setMouseFocus(QWaylandView *view)▲
QWaylandTouch *QWaylandSeat::touch() const▲
Returns the touch device for this QWaylandSeat.