QWaylandPointer Class

QWaylandPointerクラスはポインターデバイスを表します。詳細...

ヘッダー #include <QWaylandPointer>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
継承: 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)

シグナル

詳細な説明

このクラスはQWaylandSeat のポインタデバイスへのアクセスを提供します。 Wayland インターフェース wl_pointer に対応します。

メンバー関数ドキュメント

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

QWaylandPointer を、 与えられたseat で、 与えられたparent で構築します。

QWaylandCompositor *QWaylandPointer::compositor() const

このQWaylandPointer のコンポジターを返します。

QPointF QWaylandPointer::currentLocalPosition() const

QWaylandPointer の現在のローカル位置をサーフェス座標で返す。

QPointF QWaylandPointer::currentSpacePosition() const

QWaylandPointer の現在の出力空間位置を返す。

wl_resource *QWaylandPointer::focusResource() const

このQWaylandPointer のWaylandリソースを返す。

クライアントごとに多くのポインタリソースが存在する可能性があるため、このAPIは実際には意味をなさない。

bool QWaylandPointer::isButtonPressed() const

いずれかのボタンが現在押されている場合はtrueを返す。そうでない場合は false を返します。

注: isButtonPressedプロパティのゲッター関数です。

QWaylandView *QWaylandPointer::mouseFocus() const

現在マウスフォーカスを保持しているビューを返します。

QWaylandOutput *QWaylandPointer::output() const

このQWaylandPointer の出力を返す。

setOutput()も参照のこと

QWaylandSeat *QWaylandPointer::seat() const

このQWaylandPointer の入力デバイスを返します。

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

現在のマウスフォーカスをview に設定し、表面座標のローカル位置localPos と出力空間の位置outputSpacePos を指定してマウス移動イベントを送信する。

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

現在マウスフォーカスを保持しているビューに、button のマウス押下イベントを送信します。

押下イベントのシリアル番号を返します。

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

現在マウスフォーカスを保持しているビューに、button のマウスリリースイベントを送信します。

リリースイベントのシリアル番号を返します。

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

現在マウスフォーカスを保持しているビューに、与えられたorientationdelta でマウスホイールイベントを送信します。

void QWaylandPointer::setOutput(QWaylandOutput *output)

このQWaylandPointer の出力をoutput に設定する。

output()も参照のこと

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