QSinglePointEvent Class
マウス・イベントのような、1点を含むポインタ・イベントの基底クラス。詳細...
ヘッダ | #include <QSinglePointEvent> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
以来: | Qt 6.0 |
を継承する: | QPointerEvent |
によって継承されています: | QEnterEvent QHoverEvent, , , , およびQMouseEvent QNativeGestureEvent QTabletEvent QWheelEvent |
プロパティ
- exclusivePointGrabber : QObject*
パブリック関数
Qt::MouseButton | button() const |
Qt::MouseButtons | buttons() const |
QObject * | exclusivePointGrabber() const |
QPointF | globalPosition() const |
QPointF | position() const |
QPointF | scenePosition() const |
void | setExclusivePointGrabber(QObject *exclusiveGrabber) |
再実装パブリック関数
virtual bool | isBeginEvent() const override |
virtual bool | isEndEvent() const override |
virtual bool | isUpdateEvent() const override |
プロパティ・ドキュメンテーション
exclusivePointGrabber : QObject*
このプロパティは、将来の更新を受け取るオブジェクトを保持します。
排他的グラバーは、将来のすべての更新イベントと、このイベントが運ぶのと同じポイントを含むリリースイベントを受け取ることを選択したオブジェクトです。
exclusivePointGrabber プロパティを設定することは、便宜的に等価です:
setExclusiveGrabber(points().first(), exclusiveGrabber);
アクセス関数:
QObject * | exclusivePointGrabber() const |
void | setExclusivePointGrabber(QObject *exclusiveGrabber) |
メンバ関数ドキュメント
Qt::MouseButton QSinglePointEvent::button() const
イベントを発生させたボタンを返す。
返される値は、TabletMove 、TabletEnterProximity 、TabletLeaveProximity イベントと同様に、マウス移動イベントの場合は常にQt::NoButton です。
buttons()も参照してください 。
Qt::MouseButtons QSinglePointEvent::buttons() const
イベントが発生したときのボタンの状態を返す。
ボタンの状態は、Qt::LeftButton 、Qt::RightButton 、Qt::MiddleButton を OR 演算子で組み合わせたものである。
マウスの移動またはTabletMove イベントでは、これは押下されたすべてのボタンです。
マウスプレス、ダブルクリック、TabletPress イベントでは、イベントを発生させたボタンが含まれる。
マウスリリースまたはTabletRelease イベントでは、イベントを発生させたボタンは除外される。
button()も参照のこと 。
QPointF QSinglePointEvent::globalPosition() const
画面または仮想デスクトップ上の、このイベントのポイントの位置を返します。
注意: マウス・ポインタのグローバル位置は、イベント発生時に記録されます。これは、X11のような非同期ウィンドウ・システムでは重要である。マウス・イベントに応じてウィジェットを移動させるたびに、globalPosition()は、QCursor::pos()によって返される現在のカーソル位置と大きく異なることがある。
position()も参照 。
[override virtual]
bool QSinglePointEvent::isBeginEvent() const
このイベントがbutton が押されたことを表す場合、true
を返す。
[override virtual]
bool QSinglePointEvent::isEndEvent() const
このイベントがbutton の解放を表す場合、true
を返す。
[override virtual]
bool QSinglePointEvent::isUpdateEvent() const
このイベントにbutton state の変更が含まれていない場合、true
を返す。
QPointF QSinglePointEvent::position() const
このイベントのポイントの位置を、イベントを受け取ったウィジェットまたはアイテムからの相対位置で返します。
マウス・イベントに応じてウィジェットを移動させる場合は、代わりにglobalPosition() を使用してください。
globalPosition()も参照してください 。
QPointF QSinglePointEvent::scenePosition() const
ウィンドウまたはシーンからの相対的な、このイベントの点の位置を返す。
QEventPoint::scenePositionも参照してください 。
© 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.