|
wiRedPanda
Logic Circuit Simulator
|
Undo command that flips a selection of elements along a horizontal or vertical axis. More...
#include <Commands.h>
Public Member Functions | |
| FlipCommand (const QList< GraphicElement * > &items, const int axis, Scene *scene, QUndoCommand *parent=nullptr) | |
| Constructs the flip command. | |
| void | redo () override |
| Applies the flip transformation. | |
| void | undo () override |
| Reverses the flip transformation (involution: flip twice = identity). | |
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 flips a selection of elements along a horizontal or vertical axis.
Definition at line 384 of file Commands.h.
|
explicit |
Constructs the flip command.
| items | Elements to flip. |
| axis | 0 = horizontal flip (mirror left-right), 1 = vertical flip (mirror top-bottom). |
| scene | Target scene. |
| parent | Optional parent undo command. |
Definition at line 897 of file Commands.cpp.
References ElementsCommand::ElementsCommand().
|
override |
Applies the flip transformation.
Definition at line 935 of file Commands.cpp.
References ElementsCommand::elements(), and ElementsCommand::m_scene.
Referenced by undo().
|
override |
Reverses the flip transformation (involution: flip twice = identity).
Definition at line 927 of file Commands.cpp.