QGraphicsSceneWheelEvent Class

The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework. 更多...

头文件: #include <QGraphicsSceneWheelEvent>
qmake: QT += widgets
开始支持版本: Qt 4.2
基类: QGraphicsSceneEvent

公有函数

~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

其他继承的成员

  • 1 个属性继承自 QEvent
  • 1 个静态公有成员继承自 QEvent
  • 2 个受保护的变量继承自 QEvent

详细描述

The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.

The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.

QWheelEvents received by a QGraphicsView are translated into QGraphicsSceneWheelEvents; it translates the QWheelEvent::globalPos() into item, scene, and screen coordinates (pos(), scenePos(), and screenPos()).

参见 QGraphicsSceneMouseEvent, QGraphicsSceneContextMenuEvent, QGraphicsSceneHoverEvent, and QWheelEvent.

成员函数

QGraphicsSceneWheelEvent::~QGraphicsSceneWheelEvent()

Destroys the 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

Returns the wheel orientation.

QPointF QGraphicsSceneWheelEvent::pos() const

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

参见 scenePos() and screenPos().

QPointF QGraphicsSceneWheelEvent::scenePos() const

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

参见 pos() and screenPos().

QPoint QGraphicsSceneWheelEvent::screenPos() const

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

参见 pos() and scenePos().