QGraphicsSceneMouseEvent Class

QGraphicsSceneMouseEvent クラスは、グラフィックスビューフレームワークのマウスイベントを提供します。詳細...

ヘッダ #include <QGraphicsSceneMouseEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
継承: QGraphicsSceneEvent

パブリック関数

virtual ~QGraphicsSceneMouseEvent()
Qt::MouseButton button() const
QPointF buttonDownPos(Qt::MouseButton button) const
QPointF buttonDownScenePos(Qt::MouseButton button) const
QPoint buttonDownScreenPos(Qt::MouseButton button) const
Qt::MouseButtons buttons() const
Qt::MouseEventFlags flags() const
QPointF lastPos() const
QPointF lastScenePos() const
QPoint lastScreenPos() const
Qt::KeyboardModifiers modifiers() const
QPointF pos() const
QPointF scenePos() const
QPoint screenPos() const
Qt::MouseEventSource source() const

詳細説明

QGraphicsViewQMouseEvent を受け取ると、それを QGraphicsSceneMouseEvent に変換します。このイベントは、ビューに関連付けられたQGraphicsScene に転送されます。イベントがシーンによって処理されない場合、ビューは、例えば、DragMode のために、それを使用することができる。

pos ()、scenePos ()、screenPos ()として)イベントのアイテム、シーン、スクリーン座標を含むことに加えて、マウスイベントはまた、ビューによって受信された前のマウスイベントの座標を含む。これらはlastPos(),lastScreenPos(),lastScenePos() で取得できます。

QGraphicsSceneContextMenuEventQGraphicsSceneHoverEventQGraphicsSceneWheelEventQMouseEventも参照

メンバ関数ドキュメント

[virtual noexcept] QGraphicsSceneMouseEvent::~QGraphicsSceneMouseEvent()

イベントを破壊する。

Qt::MouseButton QGraphicsSceneMouseEvent::button() const

イベントを発生させたマウスボタン(もしあれば)を返します。

buttons() およびmodifiers()も参照して ください。

QPointF QGraphicsSceneMouseEvent::buttonDownPos(Qt::MouseButton button) const

指定されたbutton がクリックされたアイテムの座標におけるマウスカーソルの位置を返す。

buttonDownScenePos(),buttonDownScreenPos(),pos()も参照

QPointF QGraphicsSceneMouseEvent::buttonDownScenePos(Qt::MouseButton button) const

指定されたbutton がクリックされたシーン座標におけるマウスカーソルの位置を返す。

buttonDownPos()、buttonDownScreenPos()、scenePos()も参照してください

QPoint QGraphicsSceneMouseEvent::buttonDownScreenPos(Qt::MouseButton button) const

指定されたbutton がクリックされた画面座標でのマウスカーソル位置を返す。

screenPos()、buttonDownPos()、buttonDownScenePos()も参照

Qt::MouseButtons QGraphicsSceneMouseEvent::buttons() const

イベント送信時に押されたマウスボタンの組み合わせを返す。

button() およびmodifiers()も参照

Qt::MouseEventFlags QGraphicsSceneMouseEvent::flags() const

マウスイベントフラグを返します。

マウス・イベント・フラグは、マウス・イベントに関する追加情報を提供する。

Qt::MouseEventFlag およびQMouseEvent::flags()も参照してください

QPointF QGraphicsSceneMouseEvent::lastPos() const

最後に記録されたマウスカーソルの位置をアイテム座標で返す。

lastScenePos(),lastScreenPos(),pos()も参照

QPointF QGraphicsSceneMouseEvent::lastScenePos() const

最後に記録されたマウスカーソルの位置をシーン座標で返す。最後に記録された位置は、イベントを作成したビューによって受信された前のマウスイベントの位置である。

lastPos(),lastScreenPos(),scenePos()も参照してください

QPoint QGraphicsSceneMouseEvent::lastScreenPos() const

最後に記録されたマウスカーソルの位置をスクリーン座標で返します。最後に記録された位置は、イベントを作成したビューによって受信された前のマウスイベントの位置です。

lastPos(),lastScenePos(),screenPos()も参照

Qt::KeyboardModifiers QGraphicsSceneMouseEvent::modifiers() const

イベントが送信された時点で使用されているキーボード修飾子を返す。

buttons() およびbutton()も参照

QPointF QGraphicsSceneMouseEvent::pos() const

マウスカーソルの位置をアイテム座標で返します。

scenePos(),screenPos(),lastPos()も参照

QPointF QGraphicsSceneMouseEvent::scenePos() const

マウスカーソルの位置をシーン座標で返す。

pos(),screenPos(),lastScenePos()も参照

QPoint QGraphicsSceneMouseEvent::screenPos() const

マウスカーソルの位置をスクリーン座標で返す。

pos()、scenePos() およびlastScreenPos()も参照

Qt::MouseEventSource QGraphicsSceneMouseEvent::source() const

マウス・イベント・ソースに関する情報を返します。

マウス・イベント・ソースは、本物のマウス・イベントと人工的なマウス・イベントを区別するために使用することができます。後者は、オペレーティングシステムやQt自身がタッチイベントから合成したイベントです。

Qt::MouseEventSource およびQMouseEvent::source()も参照してください

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