このページでは

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に対応しています。

プロパティのドキュメント

[read-only] isButtonPressed : bool

このプロパティは、現在いずれかのマウスボタンが押されているかどうかを表します。

少なくとも1つのマウスボタンが押されている場合は、値はtrue となり、そうでない場合はfalse となります。

アクセス関数:

bool isButtonPressed() const

Notifierシグナル:

void buttonPressedChanged()

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

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

指定されたseat およびparent に基づいて、QWaylandPointerを生成します。

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)

指定されたorientation およびdelta を含むマウスホイールイベントを、現在マウスのフォーカスが当たっているビューに送信します。

void QWaylandPointer::setOutput(QWaylandOutput *output)

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

output()も参照してください 。

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