QtBase
v6.3.1
|
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework. More...
#include <qgraphicssceneevent.h>
Public Member Functions | |
QGraphicsSceneMoveEvent () | |
~QGraphicsSceneMoveEvent () | |
QPointF | oldPos () const |
void | setOldPos (const QPointF &pos) |
QPointF | newPos () const |
void | setNewPos (const QPointF &pos) |
Public Member Functions inherited from QGraphicsSceneEvent | |
QGraphicsSceneEvent (Type type) | |
~QGraphicsSceneEvent () | |
QWidget * | widget () const |
void | setWidget (QWidget *widget) |
quint64 | timestamp () const |
void | setTimestamp (quint64 ts) |
Public Member Functions inherited from QEvent | |
QEvent (Type type) | |
virtual | ~QEvent () |
Type | type () const |
bool | spontaneous () const |
virtual void | setAccepted (bool accepted) |
bool | isAccepted () const |
void | accept () |
void | ignore () |
bool | isInputEvent () const noexcept |
bool | isPointerEvent () const noexcept |
bool | isSinglePointEvent () const noexcept |
virtual QEvent * | clone () const |
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 317 of file qgraphicssceneevent.h.
QGraphicsSceneMoveEvent::QGraphicsSceneMoveEvent | ( | ) |
Constructs a QGraphicsSceneMoveEvent.
Definition at line 1767 of file qgraphicssceneevent.cpp.
QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent | ( | ) |
Destroys the QGraphicsSceneMoveEvent.
Definition at line 1775 of file qgraphicssceneevent.cpp.
QPointF QGraphicsSceneMoveEvent::newPos | ( | ) | const |
Returns the new position (i.e., the current position).
Definition at line 1805 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 1785 of file qgraphicssceneevent.cpp.
Definition at line 1814 of file qgraphicssceneevent.cpp.
Definition at line 1794 of file qgraphicssceneevent.cpp.