![]() |
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) |
Public Member Functions inherited from QGraphicsSceneEvent | |
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) |
Public Member Functions inherited from QEvent | |
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 101 of file qgraphicssceneevent.h.
Constructs a QGraphicsSceneWheelEvent of type type, which is always QEvent::GraphicsSceneWheel.
Definition at line 699 of file qgraphicssceneevent.cpp.
QGraphicsSceneWheelEvent::~QGraphicsSceneWheelEvent | ( | ) |
Destroys the QGraphicsSceneWheelEvent.
Definition at line 707 of file qgraphicssceneevent.cpp.
Qt::MouseButtons QGraphicsSceneWheelEvent::buttons | ( | ) | const |
Returns the mouse buttons that were pressed when the wheel event occurred.
Definition at line 779 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 824 of file qgraphicssceneevent.cpp.
bool QGraphicsSceneWheelEvent::isInverted | ( | ) | const |
Returns whether the delta values delivered with the event are inverted.
Definition at line 909 of file qgraphicssceneevent.cpp.
Qt::KeyboardModifiers QGraphicsSceneWheelEvent::modifiers | ( | ) | const |
Returns the keyboard modifiers that were active when the wheel event occurred.
Definition at line 800 of file qgraphicssceneevent.cpp.
Qt::Orientation QGraphicsSceneWheelEvent::orientation | ( | ) | const |
Returns the wheel orientation.
Definition at line 842 of file qgraphicssceneevent.cpp.
Qt::ScrollPhase QGraphicsSceneWheelEvent::phase | ( | ) | const |
Returns the scrolling phase of this wheel event.
Definition at line 864 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 889 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 717 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 738 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 759 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setButtons | ( | Qt::MouseButtons | buttons | ) |
Definition at line 788 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setDelta | ( | int | delta | ) |
Definition at line 833 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setInverted | ( | bool | inverted | ) |
Definition at line 918 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setModifiers | ( | Qt::KeyboardModifiers | modifiers | ) |
Definition at line 809 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setOrientation | ( | Qt::Orientation | orientation | ) |
Definition at line 851 of file qgraphicssceneevent.cpp.
void QGraphicsSceneWheelEvent::setPhase | ( | Qt::ScrollPhase | scrollPhase | ) |
Definition at line 873 of file qgraphicssceneevent.cpp.
Definition at line 898 of file qgraphicssceneevent.cpp.
Definition at line 726 of file qgraphicssceneevent.cpp.
Definition at line 747 of file qgraphicssceneevent.cpp.
Definition at line 768 of file qgraphicssceneevent.cpp.