Undo/Redo for moving components. More...
#include <MoveCommand.h>
Public Member Functions | |
MoveCommand (QGraphicsItem *item, const QPointF oldPos, QUndoCommand *parent=0) | |
Constructor. More... | |
MoveCommand (std::map< QGraphicsItem *, QPointF > items, QUndoCommand *parent=0) | |
Constructor. More... | |
virtual void | redo () |
Reimplemented from QUndoCommand. More... | |
virtual void | undo () |
Reimplemented from QUndoCommand. More... | |
virtual | ~MoveCommand () |
Destructor. More... | |
Protected Member Functions | |
virtual QString | createCommandString (QGraphicsItem *item, const QPointF &pos) |
Protected Attributes | |
QGraphicsItem * | m_item |
QList< QPointF > | m_itemsPoints |
std::map< QGraphicsItem *, QPointF > | m_moveItems |
QPointF | m_newPos |
QPointF | m_oldPos |
Undo/Redo for moving components.
Definition at line 54 of file MoveCommand.h.
te::layout::MoveCommand::MoveCommand | ( | QGraphicsItem * | item, |
const QPointF | oldPos, | ||
QUndoCommand * | parent = 0 |
||
) |
te::layout::MoveCommand::MoveCommand | ( | std::map< QGraphicsItem *, QPointF > | items, |
QUndoCommand * | parent = 0 |
||
) |
Constructor.
items | |
parent |
Definition at line 48 of file MoveCommand.cpp.
References m_itemsPoints, and m_moveItems.
|
virtual |
Destructor.
Definition at line 63 of file MoveCommand.cpp.
|
protectedvirtual |
Definition at line 150 of file MoveCommand.cpp.
References te::layout::ItemObserver::getModel(), te::layout::EnumType::getName(), and te::layout::Observable::getType().
|
virtual |
Reimplemented from QUndoCommand.
Definition at line 96 of file MoveCommand.cpp.
References te::common::Singleton< Context >::getInstance(), te::layout::Context::getScene(), and te::layout::Scene::getUndoStack().
|
virtual |
Reimplemented from QUndoCommand.
Definition at line 68 of file MoveCommand.cpp.
References te::common::Singleton< Context >::getInstance(), and te::layout::Context::getScene().
|
protected |
Definition at line 95 of file MoveCommand.h.
Referenced by MoveCommand().
|
protected |
Definition at line 99 of file MoveCommand.h.
Referenced by MoveCommand().
|
protected |
Definition at line 98 of file MoveCommand.h.
Referenced by MoveCommand().
|
protected |
Definition at line 97 of file MoveCommand.h.
Referenced by MoveCommand().
|
protected |
Definition at line 96 of file MoveCommand.h.
Referenced by MoveCommand().