QGraphicsSceneWheelEvent 类

QGraphicsSceneWheelEvent 类提供在图形视图框架中的滚轮事件。 更多...

头: #include <QGraphicsSceneWheelEvent>
qmake: QT += widgets
Since: Qt 4.2
继承: QGraphicsSceneEvent

该类在 Qt 4.2 引入。

公共函数

virtual ~QGraphicsSceneWheelEvent ()
Qt::MouseButtons buttons () const
int delta () const
Qt::KeyboardModifiers modifiers () const
Qt::Orientation orientation () const
QPointF pos () const
QPointF scenePos () const
QPoint screenPos () const

详细描述

QWheelEvent 接收通过 QGraphicsView are translated into QGraphicsSceneWheelEvents; it translates the QWheelEvent::globalPos() into item, scene, and screen coordinates ( pos (), scenePos (),和 screenPos ()).

另请参阅 QGraphicsSceneMouseEvent , QGraphicsSceneContextMenuEvent , QGraphicsSceneHoverEvent ,和 QWheelEvent .

成员函数文档编制

[虚拟] QGraphicsSceneWheelEvent:: ~QGraphicsSceneWheelEvent ()

销毁 QGraphicsSceneWheelEvent .

Qt::MouseButtons QGraphicsSceneWheelEvent:: buttons () const

Returns the mouse buttons that were pressed when the wheel event occurred.

另请参阅 modifiers ().

int QGraphicsSceneWheelEvent:: delta () const

Returns the distance that the wheel is rotated, in eighths (1/8s) of a degree. A positive value indicates that the wheel was rotated forwards away from the user; a negative value indicates that the wheel was rotated backwards toward the user.

Most mouse types work in steps of 15 degrees, in which case the delta value is a multiple of 120 (== 15 * 8).

Qt::KeyboardModifiers QGraphicsSceneWheelEvent:: modifiers () const

Returns the keyboard modifiers that were active when the wheel event occurred.

另请参阅 buttons ().

Qt::Orientation QGraphicsSceneWheelEvent:: orientation () const

返回滚轮取向。

QPointF QGraphicsSceneWheelEvent:: pos () const

Returns the position of the cursor in item coordinates when the wheel event occurred.

另请参阅 scenePos () 和 screenPos ().

QPointF QGraphicsSceneWheelEvent:: scenePos () const

Returns the position of the cursor in scene coordinates when the wheel event occurred.

另请参阅 pos () 和 screenPos ().

QPoint QGraphicsSceneWheelEvent:: screenPos () const

Returns the position of the cursor in screen coordinates when the wheel event occurred.

另请参阅 pos () 和 scenePos ().