|
wiRedPanda
Logic Circuit Simulator
|
Undo command that rotates a list of elements by a fixed angle. More...
#include <Commands.h>
Public Member Functions | |
| void | redo () override |
| Applies the rotation. | |
| RotateCommand (const QList< GraphicElement * > &items, const int angle, Scene *scene, QUndoCommand *parent=nullptr) | |
| Constructs the command. | |
| void | undo () override |
| Reverses the rotation. | |
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 rotates a list of elements by a fixed angle.
Definition at line 128 of file Commands.h.
|
explicit |
Constructs the command.
| items | Elements to rotate. |
| angle | Clockwise rotation in degrees (e.g. 90 or -90). |
| scene | Target scene. |
| parent | Optional parent undo command. |
Definition at line 330 of file Commands.cpp.
References ElementsCommand::ElementsCommand().
|
override |
Applies the rotation.
Definition at line 359 of file Commands.cpp.
References ElementsCommand::elements(), and ElementsCommand::m_scene.
|
override |
Reverses the rotation.
Definition at line 344 of file Commands.cpp.
References ElementsCommand::elements(), and ElementsCommand::m_scene.