![]() |
Qt 4.8
|
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework. More...
#include <qgraphicssceneevent.h>
Public Functions | |
| QPointF | newPos () const |
| Returns the new position (i.e., the current position). More... | |
| QPointF | oldPos () const |
| Returns the old position (i.e., the position immediately before the widget was moved). More... | |
| QGraphicsSceneMoveEvent () | |
| Constructs a QGraphicsSceneMoveEvent. More... | |
| void | setNewPos (const QPointF &pos) |
| void | setOldPos (const QPointF &pos) |
| ~QGraphicsSceneMoveEvent () | |
| Destroys the QGraphicsSceneMoveEvent. More... | |
Public Functions inherited from QGraphicsSceneEvent | |
| QGraphicsSceneEvent (Type type) | |
| Constructs a generic graphics scene event of the specified type. More... | |
| void | setWidget (QWidget *widget) |
| Sets the widget related to this event. More... | |
| QWidget * | widget () const |
| Returns the widget where the event originated, or 0 if the event originates from another application. More... | |
| ~QGraphicsSceneEvent () | |
| Destroys the event. More... | |
Public Functions inherited from QEvent | |
| void | accept () |
| Sets the accept flag of the event object, the equivalent of calling setAccepted(true). More... | |
| void | ignore () |
| Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). More... | |
| bool | isAccepted () const |
| QEvent (Type type) | |
| Contructs an event object of type type. More... | |
| void | setAccepted (bool accepted) |
| bool | spontaneous () const |
| Returns true if the event originated outside the application (a system event); otherwise returns false. More... | |
| Type | type () const |
| Returns the event type. More... | |
| virtual | ~QEvent () |
| Destroys the event. More... | |
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.
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 305 of file qgraphicssceneevent.h.
| QGraphicsSceneMoveEvent::QGraphicsSceneMoveEvent | ( | ) |
Constructs a QGraphicsSceneMoveEvent.
Definition at line 1747 of file qgraphicssceneevent.cpp.
| QGraphicsSceneMoveEvent::~QGraphicsSceneMoveEvent | ( | ) |
Destroys the QGraphicsSceneMoveEvent.
Definition at line 1755 of file qgraphicssceneevent.cpp.
| QPointF QGraphicsSceneMoveEvent::newPos | ( | ) | const |
Returns the new position (i.e., the current position).
Definition at line 1785 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent().
| QPointF QGraphicsSceneMoveEvent::oldPos | ( | ) | const |
Returns the old position (i.e., the position immediately before the widget was moved).
Definition at line 1765 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent().
| void QGraphicsSceneMoveEvent::setNewPos | ( | const QPointF & | pos | ) |
Definition at line 1794 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent().
| void QGraphicsSceneMoveEvent::setOldPos | ( | const QPointF & | pos | ) |
Definition at line 1774 of file qgraphicssceneevent.cpp.
Referenced by cloneEvent().