Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

QGraphicsSceneWheelEvent Class Reference
[QtGui module]

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

 #include <QGraphicsSceneWheelEvent>

Inherits QGraphicsSceneEvent.

This class was introduced in Qt 4.2.

Public Functions

Additional Inherited Members


Detailed Description

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

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

See also QGraphicsSceneMouseEvent, QGraphicsSceneContextMenuEvent, QGraphicsSceneHoverEvent, and QWheelEvent.


Member Function Documentation

QGraphicsSceneWheelEvent::~QGraphicsSceneWheelEvent ()

Destroys the QGraphicsSceneWheelEvent.

Qt::MouseButtons QGraphicsSceneWheelEvent::buttons () const

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

See also setButtons() and 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).

See also setDelta().

Qt::KeyboardModifiers QGraphicsSceneWheelEvent::modifiers () const

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

See also setModifiers() and buttons().

QPointF QGraphicsSceneWheelEvent::pos () const

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

See also setPos(), scenePos(), and screenPos().

QPointF QGraphicsSceneWheelEvent::scenePos () const

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

See also setScenePos(), pos(), and screenPos().

QPoint QGraphicsSceneWheelEvent::screenPos () const

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

See also setScreenPos(), pos(), and scenePos().


Copyright © 2007 Trolltech Trademarks
Qt 4.2.3