![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework. More...
#include <qgraphicssceneevent.h>
Public Member Functions | |
QGraphicsSceneHoverEvent (Type type=None) | |
~QGraphicsSceneHoverEvent () | |
Destroys the event. | |
QPointF | pos () const |
Returns the position of the mouse cursor in item coordinates at the moment the hover event was sent. | |
void | setPos (const QPointF &pos) |
QPointF | scenePos () const |
Returns the position of the mouse cursor in scene coordinates at the moment the hover event was sent. | |
void | setScenePos (const QPointF &pos) |
QPoint | screenPos () const |
Returns the position of the mouse cursor in screen coordinates at the moment the hover event was sent. | |
void | setScreenPos (const QPoint &pos) |
QPointF | lastPos () const |
void | setLastPos (const QPointF &pos) |
QPointF | lastScenePos () const |
void | setLastScenePos (const QPointF &pos) |
QPoint | lastScreenPos () const |
void | setLastScreenPos (const QPoint &pos) |
Qt::KeyboardModifiers | modifiers () const |
void | setModifiers (Qt::KeyboardModifiers modifiers) |
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 QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.
\inmodule QtWidgets
When a QGraphicsView receives a QHoverEvent event, it translates it into QGraphicsSceneHoverEvent. The event is then forwarded to the QGraphicsScene associated with the view.
Definition at line 172 of file qgraphicssceneevent.h.
Constructs a graphics scene hover event of the specified type.
Definition at line 1090 of file qgraphicssceneevent.cpp.
QGraphicsSceneHoverEvent::~QGraphicsSceneHoverEvent | ( | ) |
Destroys the event.
Definition at line 1098 of file qgraphicssceneevent.cpp.
QPointF QGraphicsSceneHoverEvent::lastPos | ( | ) | const |
Returns the last recorded mouse cursor position in item coordinates.
Definition at line 1184 of file qgraphicssceneevent.cpp.
QPointF QGraphicsSceneHoverEvent::lastScenePos | ( | ) | const |
Returns the last recorded, the scene coordinates of the previous mouse or hover event received by the view, that created the event mouse cursor position in scene coordinates.
Definition at line 1208 of file qgraphicssceneevent.cpp.
QPoint QGraphicsSceneHoverEvent::lastScreenPos | ( | ) | const |
Returns the last recorded mouse cursor position in screen coordinates. The last recorded position is the position of the previous mouse or hover event received by the view that created the event.
Definition at line 1232 of file qgraphicssceneevent.cpp.
Qt::KeyboardModifiers QGraphicsSceneHoverEvent::modifiers | ( | ) | const |
Returns the keyboard modifiers at the moment the hover event was sent.
Definition at line 1252 of file qgraphicssceneevent.cpp.
QPointF QGraphicsSceneHoverEvent::pos | ( | ) | const |
Returns the position of the mouse cursor in item coordinates at the moment the hover event was sent.
Definition at line 1108 of file qgraphicssceneevent.cpp.
QPointF QGraphicsSceneHoverEvent::scenePos | ( | ) | const |
Returns the position of the mouse cursor in scene coordinates at the moment the hover event was sent.
Definition at line 1133 of file qgraphicssceneevent.cpp.
QPoint QGraphicsSceneHoverEvent::screenPos | ( | ) | const |
Returns the position of the mouse cursor in screen coordinates at the moment the hover event was sent.
Definition at line 1158 of file qgraphicssceneevent.cpp.
Definition at line 1193 of file qgraphicssceneevent.cpp.
Definition at line 1217 of file qgraphicssceneevent.cpp.
Definition at line 1241 of file qgraphicssceneevent.cpp.
void QGraphicsSceneHoverEvent::setModifiers | ( | Qt::KeyboardModifiers | modifiers | ) |
Sets the modifiers for the current hover event to modifiers.
Definition at line 1264 of file qgraphicssceneevent.cpp.
Sets the position associated with the hover event to the given point in item coordinates.
Definition at line 1121 of file qgraphicssceneevent.cpp.
Sets the position associated with the hover event to the given point in scene coordinates.
Definition at line 1146 of file qgraphicssceneevent.cpp.
Sets the position associated with the hover event to the given point in screen coordinates.
Definition at line 1171 of file qgraphicssceneevent.cpp.