![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework. More...
#include <qgraphicssceneevent.h>
Public Member Functions | |
QGraphicsSceneWheelEvent (Type type=None) | |
~QGraphicsSceneWheelEvent () | |
Destroys the QGraphicsSceneWheelEvent. | |
QPointF | pos () const |
Returns the position of the cursor in item coordinates when the wheel event occurred. | |
void | setPos (const QPointF &pos) |
QPointF | scenePos () const |
Returns the position of the cursor in scene coordinates when the wheel event occurred. | |
void | setScenePos (const QPointF &pos) |
QPoint | screenPos () const |
Returns the position of the cursor in screen coordinates when the wheel event occurred. | |
void | setScreenPos (const QPoint &pos) |
Qt::MouseButtons | buttons () const |
Returns the mouse buttons that were pressed when the wheel event occurred. | |
void | setButtons (Qt::MouseButtons buttons) |
Qt::KeyboardModifiers | modifiers () const |
Returns the keyboard modifiers that were active when the wheel event occurred. | |
void | setModifiers (Qt::KeyboardModifiers modifiers) |
int | delta () const |
Returns the distance that the wheel is rotated, in eighths (1/8s) of a degree. | |
void | setDelta (int delta) |
Qt::Orientation | orientation () const |
Returns the wheel orientation. | |
void | setOrientation (Qt::Orientation orientation) |
Qt::ScrollPhase | phase () const |
void | setPhase (Qt::ScrollPhase scrollPhase) |
QPoint | pixelDelta () const |
void | setPixelDelta (QPoint delta) |
bool | isInverted () const |
Returns whether the delta values delivered with the event are inverted. | |
void | setInverted (bool inverted) |
![]() | |
QGraphicsSceneEvent (Type type) | |
~QGraphicsSceneEvent () | |
Destroys the event. | |
QWidget * | widget () const |
Returns the widget where the event originated, or \nullptr if the event originates from another application. | |
void | setWidget (QWidget *widget) |
quint64 | timestamp () const |
void | setTimestamp (quint64 ts) |
![]() | |
QEvent (Type type) | |
Constructs an event object of type type. | |
virtual | ~QEvent () |
Destroys the event. | |
Type | type () const |
Returns the event type. | |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false . | |
virtual void | setAccepted (bool accepted) |
bool | isAccepted () const |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). | |
bool | isInputEvent () const noexcept |
bool | isPointerEvent () const noexcept |
bool | isSinglePointEvent () const noexcept |
virtual QEvent * | clone () const |
Creates and returns an identical copy of this event. | |
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.
\inmodule QtWidgets
\l{QWheelEvent}{QWheelEvent}s 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 100 of file qgraphicssceneevent.h.
Constructs a QGraphicsSceneWheelEvent of type type, which is always QEvent::GraphicsSceneWheel.
Definition at line 698 of file qgraphicssceneevent.cpp.
QGraphicsSceneWheelEvent::~QGraphicsSceneWheelEvent | ( | ) |
Destroys the QGraphicsSceneWheelEvent.
Definition at line 706 of file qgraphicssceneevent.cpp.
Qt::MouseButtons QGraphicsSceneWheelEvent::buttons | ( | ) | const |
Returns the mouse buttons that were pressed when the wheel event occurred.
Definition at line 778 of file qgraphicssceneevent.cpp.
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 823 of file qgraphicssceneevent.cpp.
bool QGraphicsSceneWheelEvent::isInverted | ( | ) | const |
Returns whether the delta values delivered with the event are inverted.
Definition at line 908 of file qgraphicssceneevent.cpp.
Qt::KeyboardModifiers QGraphicsSceneWheelEvent::modifiers | ( | ) | const |
Returns the keyboard modifiers that were active when the wheel event occurred.
Definition at line 799 of file qgraphicssceneevent.cpp.
Qt::Orientation QGraphicsSceneWheelEvent::orientation | ( | ) | const |
Returns the wheel orientation.
Definition at line 841 of file qgraphicssceneevent.cpp.
Qt::ScrollPhase QGraphicsSceneWheelEvent::phase | ( | ) | const |
Returns the scrolling phase of this wheel event.
Definition at line 863 of file qgraphicssceneevent.cpp.
QPoint QGraphicsSceneWheelEvent::pixelDelta | ( | ) | const |
Returns the scrolling distance in pixels on screen. This value is provided on platforms that support high-resolution pixel-based delta values, such as \macos. The value should be used directly to scroll content on screen.
Definition at line 888 of file qgraphicssceneevent.cpp.
QPointF QGraphicsSceneWheelEvent::pos | ( | ) | const |
Returns the position of the cursor in item coordinates when the wheel event occurred.
Definition at line 716 of file qgraphicssceneevent.cpp.
QPointF QGraphicsSceneWheelEvent::scenePos | ( | ) | const |
Returns the position of the cursor in scene coordinates when the wheel event occurred.
Definition at line 737 of file qgraphicssceneevent.cpp.
QPoint QGraphicsSceneWheelEvent::screenPos | ( | ) | const |
Returns the position of the cursor in screen coordinates when the wheel event occurred.
Definition at line 758 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setButtons | ( | Qt::MouseButtons | buttons | ) |
Definition at line 787 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setDelta | ( | int | delta | ) |
Definition at line 832 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setInverted | ( | bool | inverted | ) |
Definition at line 917 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setModifiers | ( | Qt::KeyboardModifiers | modifiers | ) |
Definition at line 808 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setOrientation | ( | Qt::Orientation | orientation | ) |
Definition at line 850 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setPhase | ( | Qt::ScrollPhase | scrollPhase | ) |
Definition at line 872 of file qgraphicssceneevent.cpp.
Definition at line 897 of file qgraphicssceneevent.cpp.
Definition at line 725 of file qgraphicssceneevent.cpp.
Definition at line 746 of file qgraphicssceneevent.cpp.
Definition at line 767 of file qgraphicssceneevent.cpp.