|
wiRedPanda
Logic Circuit Simulator
|
Undo command for property changes (label, color, frequency, appearance, etc.). More...
#include <Commands.h>
Public Member Functions | |
| void | redo () override |
| Applies the new property values. | |
| void | undo () override |
| Restores the old property values. | |
| UpdateCommand (const QList< GraphicElement * > &elements, const QByteArray &oldData, Scene *scene, QUndoCommand *parent=nullptr) | |
| Constructs the command. | |
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 for property changes (label, color, frequency, appearance, etc.).
Captures the pre-change state in oldData; the post-change state is serialized from the elements at construction time.
Definition at line 192 of file Commands.h.
|
explicit |
Constructs the command.
| elements | Elements whose properties changed. |
| oldData | Serialized state before the change. |
| scene | Target scene. |
| parent | Optional parent undo command. |
Definition at line 427 of file Commands.cpp.
References ElementsCommand::elements(), ElementsCommand::ElementsCommand(), InMemorySnapshot, ElementsCommand::m_scene, and Serialization::writePandaHeader().
|
override |
Applies the new property values.
Definition at line 471 of file Commands.cpp.
References ElementsCommand::m_scene, and qCDebug.
|
override |
Restores the old property values.
Definition at line 460 of file Commands.cpp.
References ElementsCommand::m_scene, and qCDebug.