Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework. More...
#include <qgraphicssceneevent.h>
Public Member Functions | |
QGraphicsSceneMoveEvent () | |
Constructs a QGraphicsSceneMoveEvent. | |
~QGraphicsSceneMoveEvent () | |
Destroys the QGraphicsSceneMoveEvent. | |
QPointF | oldPos () const |
Returns the old position (i.e., the position immediately before the widget was moved). | |
void | setOldPos (const QPointF &pos) |
QPointF | newPos () const |
Returns the new position (i.e., the current position). | |
void | setNewPos (const QPointF &pos) |
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 QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.
\inmodule QtWidgets
A QGraphicsWidget sends itself a QGraphicsSceneMoveEvent immediately when its local position changes. The delivery is implemented as part of QGraphicsItem::itemChange().
It's similar to QMoveEvent, but its positions, oldPos() and newPos(), use QPointF instead of QPoint.
Definition at line 281 of file qgraphicssceneevent.h.
QGraphicsSceneMoveEvent::QGraphicsSceneMoveEvent | ( | ) |
Constructs a QGraphicsSceneMoveEvent.
Definition at line 1731 of file qgraphicssceneevent.cpp.
QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent | ( | ) |
Destroys the QGraphicsSceneMoveEvent.
Definition at line 1739 of file qgraphicssceneevent.cpp.
QPointF QGraphicsSceneMoveEvent::newPos | ( | ) | const |
Returns the new position (i.e., the current position).
Definition at line 1769 of file qgraphicssceneevent.cpp.
QPointF QGraphicsSceneMoveEvent::oldPos | ( | ) | const |
Returns the old position (i.e., the position immediately before the widget was moved).
Definition at line 1749 of file qgraphicssceneevent.cpp.
Definition at line 1778 of file qgraphicssceneevent.cpp.
Definition at line 1758 of file qgraphicssceneevent.cpp.