Qt 4.8
|
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework. More...
#include <qgraphicssceneevent.h>
Public Functions | |
Qt::MouseButtons | buttons () const |
Returns the mouse buttons that were pressed when the wheel event occurred. More... | |
int | delta () const |
Returns the distance that the wheel is rotated, in eighths (1/8s) of a degree. More... | |
Qt::KeyboardModifiers | modifiers () const |
Returns the keyboard modifiers that were active when the wheel event occurred. More... | |
Qt::Orientation | orientation () const |
Returns the wheel orientation. More... | |
QPointF | pos () const |
Returns the position of the cursor in item coordinates when the wheel event occurred. More... | |
QGraphicsSceneWheelEvent (Type type=None) | |
Constructs a QGraphicsSceneWheelEvent of type type, which is always QEvent::GraphicsSceneWheel. More... | |
QPointF | scenePos () const |
Returns the position of the cursor in scene coordinates when the wheel event occurred. More... | |
QPoint | screenPos () const |
Returns the position of the cursor in screen coordinates when the wheel event occurred. More... | |
void | setButtons (Qt::MouseButtons buttons) |
void | setDelta (int delta) |
void | setModifiers (Qt::KeyboardModifiers modifiers) |
void | setOrientation (Qt::Orientation orientation) |
void | setPos (const QPointF &pos) |
void | setScenePos (const QPointF &pos) |
void | setScreenPos (const QPoint &pos) |
~QGraphicsSceneWheelEvent () | |
Destroys the QGraphicsSceneWheelEvent. More... | |
Public Functions inherited from QGraphicsSceneEvent | |
QGraphicsSceneEvent (Type type) | |
Constructs a generic graphics scene event of the specified type. More... | |
void | setWidget (QWidget *widget) |
Sets the widget related to this event. More... | |
QWidget * | widget () const |
Returns the widget where the event originated, or 0 if the event originates from another application. More... | |
~QGraphicsSceneEvent () | |
Destroys the event. More... | |
Public Functions inherited from QEvent | |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). More... | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). More... | |
bool | isAccepted () const |
QEvent (Type type) | |
Contructs an event object of type type. More... | |
void | setAccepted (bool accepted) |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false. More... | |
Type | type () const |
Returns the event type. More... | |
virtual | ~QEvent () |
Destroys the event. More... | |
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()).
Definition at line 133 of file qgraphicssceneevent.h.
Constructs a QGraphicsSceneWheelEvent of type type, which is always QEvent::GraphicsSceneWheel.
Definition at line 696 of file qgraphicssceneevent.cpp.
QGraphicsSceneWheelEvent::~QGraphicsSceneWheelEvent | ( | ) |
Destroys the QGraphicsSceneWheelEvent.
Definition at line 704 of file qgraphicssceneevent.cpp.
Qt::MouseButtons QGraphicsSceneWheelEvent::buttons | ( | ) | const |
Returns the mouse buttons that were pressed when the wheel event occurred.
Definition at line 776 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and setButtons().
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).
Definition at line 821 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), setDelta(), and QDeclarativeFlickable::wheelEvent().
Qt::KeyboardModifiers QGraphicsSceneWheelEvent::modifiers | ( | ) | const |
Returns the keyboard modifiers that were active when the wheel event occurred.
Definition at line 797 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and setModifiers().
Qt::Orientation QGraphicsSceneWheelEvent::orientation | ( | ) | const |
Returns the wheel orientation.
Definition at line 839 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), setOrientation(), and QDeclarativeFlickable::wheelEvent().
QPointF QGraphicsSceneWheelEvent::pos | ( | ) | const |
Returns the position of the cursor in item coordinates when the wheel event occurred.
Definition at line 714 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), QGraphicsItemPrivate::remapItemPos(), setPos(), setScenePos(), and setScreenPos().
QPointF QGraphicsSceneWheelEvent::scenePos | ( | ) | const |
Returns the position of the cursor in scene coordinates when the wheel event occurred.
Definition at line 735 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and QGraphicsScene::wheelEvent().
QPoint QGraphicsSceneWheelEvent::screenPos | ( | ) | const |
Returns the position of the cursor in screen coordinates when the wheel event occurred.
Definition at line 756 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and QGraphicsScene::wheelEvent().
void QGraphicsSceneWheelEvent::setButtons | ( | Qt::MouseButtons | buttons | ) |
Definition at line 785 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and QGraphicsView::wheelEvent().
void QGraphicsSceneWheelEvent::setDelta | ( | int | delta | ) |
Definition at line 830 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and QGraphicsView::wheelEvent().
void QGraphicsSceneWheelEvent::setModifiers | ( | Qt::KeyboardModifiers | modifiers | ) |
Definition at line 806 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and QGraphicsView::wheelEvent().
void QGraphicsSceneWheelEvent::setOrientation | ( | Qt::Orientation | orientation | ) |
Definition at line 848 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and QGraphicsView::wheelEvent().
void QGraphicsSceneWheelEvent::setPos | ( | const QPointF & | pos | ) |
Definition at line 723 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), QGraphicsItemPrivate::remapItemPos(), and QGraphicsScene::wheelEvent().
void QGraphicsSceneWheelEvent::setScenePos | ( | const QPointF & | pos | ) |
Definition at line 744 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and QGraphicsView::wheelEvent().
void QGraphicsSceneWheelEvent::setScreenPos | ( | const QPoint & | pos | ) |
Definition at line 765 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent(), and QGraphicsView::wheelEvent().