|
wiRedPanda
Logic Circuit Simulator
|
Undo command that records a drag-move of a set of elements. More...
#include <Commands.h>
Public Member Functions | |
| MoveCommand (const QList< GraphicElement * > &list, const QList< QPointF > &oldPositions, Scene *scene, QUndoCommand *parent=nullptr) | |
| Constructs the command capturing old and new positions. | |
| void | redo () override |
| Moves elements to their new positions. | |
| void | undo () override |
| Restores elements to their old positions. | |
Additional Inherited Members | |
| Protected Member Functions inherited from ElementsCommand | |
| QList< GraphicElement * > | elements () const |
| Returns the live element pointers for this command's targets, looked up by stored ID. | |
| ElementsCommand (const QList< GraphicElement * > &elements, Scene *scene, QUndoCommand *parent=nullptr) | |
| Protected Attributes inherited from ElementsCommand | |
| QList< int > | m_ids |
| Scene * | m_scene |
Undo command that records a drag-move of a set of elements.
Definition at line 159 of file Commands.h.
|
explicit |
Constructs the command capturing old and new positions.
| list | Elements that were moved. |
| oldPositions | Positions before the move. |
| scene | Target scene. |
| parent | Optional parent undo command. |
Definition at line 392 of file Commands.cpp.
References ElementsCommand::ElementsCommand().
|
override |
Moves elements to their new positions.
Definition at line 416 of file Commands.cpp.
References ElementsCommand::elements(), and ElementsCommand::m_scene.
|
override |
Restores elements to their old positions.
Definition at line 405 of file Commands.cpp.
References ElementsCommand::elements(), and ElementsCommand::m_scene.