QGraphicsSceneWheelEvent Class
QGraphicsSceneWheelEvent クラスは、グラフィックスビューフレームワークにおいてホイールイベントを提供します。詳細...
| ヘッダー: | #include <QGraphicsSceneWheelEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake: | QT += widgets |
| 継承元: | QGraphicsSceneEvent |
パブリック関数
| virtual | ~QGraphicsSceneWheelEvent() |
| Qt::MouseButtons | buttons() const |
| int | delta() const |
(since 6.2) bool | isInverted() const |
| Qt::KeyboardModifiers | modifiers() const |
| Qt::Orientation | orientation() const |
(since 6.2) Qt::ScrollPhase | phase() const |
(since 6.2) QPoint | pixelDelta() const |
| QPointF | pos() const |
| QPointF | scenePos() const |
| QPoint | screenPos() const |
詳細な説明
QWheelEvent QGraphicsView が受け取るイベントは QGraphicsSceneWheelEvents に変換されます。また、QWheelEvent::globalPos() をアイテム座標、シーン座標、スクリーン座標に変換します ( ()、 ()、および ())。pos scenePos screenPos
QGraphicsSceneMouseEvent 、QGraphicsSceneContextMenuEvent 、QGraphicsSceneHoverEvent 、およびQWheelEventも参照してください 。
メンバ関数のドキュメント
[virtual noexcept] QGraphicsSceneWheelEvent::~QGraphicsSceneWheelEvent()
QGraphicsSceneWheelEvent を削除します。
Qt::MouseButtons QGraphicsSceneWheelEvent::buttons() const
ホイールイベントが発生した際に押されていたマウスボタンを返します。
modifiers()も参照してください 。
int QGraphicsSceneWheelEvent::delta() const
ホイールが回転した距離を、1度の8分の1(1/8度)単位で返します。正の値は、ホイールがユーザーから離れる方向に前方に回転したことを示し、負の値は、ホイールがユーザーに向かって後方に回転したことを示します。
ほとんどのマウスでは15度刻みで動作するため、その場合はデルタ値は120の倍数(== 15 × 8)となります。
[since 6.2] bool QGraphicsSceneWheelEvent::isInverted() const
イベントとともに渡されたデルタ値が反転しているかどうかを返します。
この関数は Qt 6.2 で導入されました。
Qt::KeyboardModifiers QGraphicsSceneWheelEvent::modifiers() const
ホイールイベントが発生した時点で有効だったキーボード修飾キーを返します。
buttons()も参照してください 。
Qt::Orientation QGraphicsSceneWheelEvent::orientation() const
ホイールの向きを返します。
[since 6.2] Qt::ScrollPhase QGraphicsSceneWheelEvent::phase() const
このホイールイベントのスクロールフェーズを返します。
この関数は Qt 6.2 で導入されました。
QWheelEvent::phaseも参照してください 。
[since 6.2] QPoint QGraphicsSceneWheelEvent::pixelDelta() const
画面上のスクロール距離をピクセル単位で返します。この値は、macOS など、高解像度のピクセル単位のデルタ値をサポートするプラットフォームで提供されます。この値は、画面上のコンテンツをスクロールさせるために直接使用する必要があります。
この関数は Qt 6.2 で導入されました。
QWheelEvent::pixelDeltaも参照してください 。
QPointF QGraphicsSceneWheelEvent::pos() const
ホイールイベントが発生した時点での、アイテム座標におけるカーソルの位置を返します。
scenePos() およびscreenPos()も参照してください 。
QPointF QGraphicsSceneWheelEvent::scenePos() const
ホイールイベントが発生した時点での、シーン座標系におけるカーソルの位置を返します。
pos() およびscreenPos()も参照してください 。
QPoint QGraphicsSceneWheelEvent::screenPos() const
ホイールイベントが発生した時点での、画面座標におけるカーソルの位置を返します。
© 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.