|
wiRedPanda
Logic Circuit Simulator
|
Undo command for embedded IC blob changes that may alter port counts. More...
#include <Commands.h>
Classes | |
| struct | ConnectionInfo |
Public Member Functions | |
| void | redo () override |
| void | setBlobName (const QString &name) |
| Overrides the blob name (needed when elements are already file-backed at construction time). | |
| void | setOldBlob (const QByteArray &blob) |
| Sets the old blob data for registry swap on undo. | |
| void | undo () override |
| UpdateBlobCommand (const QList< GraphicElement * > &elements, const QByteArray &oldData, const QList< ConnectionInfo > &connections, Scene *scene, QUndoCommand *parent=nullptr) | |
Static Public Member Functions | |
| static QList< ConnectionInfo > | captureConnections (const QList< GraphicElement * > &targets) |
| Captures connection topology for all target elements before a blob operation. | |
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 embedded IC blob changes that may alter port counts.
Captures connection topology before the change so connections to removed ports can be restored on undo. Swaps blob registry entries on undo/redo.
Definition at line 520 of file Commands.h.
|
explicit |
Definition at line 1185 of file Commands.cpp.
References ElementsCommand::elements(), ElementsCommand::ElementsCommand(), InMemorySnapshot, ElementsCommand::m_scene, and Serialization::writePandaHeader().
|
static |
Captures connection topology for all target elements before a blob operation.
Definition at line 1092 of file Commands.cpp.
References Port::graphicElement(), ItemWithId::id(), and Port::index().
Referenced by ICRegistry::embedICsByFile(), ICRegistry::extractToFile(), and WorkSpace::onChildICBlobSaved().
|
override |
Definition at line 1206 of file Commands.cpp.
References ElementsCommand::m_scene, and qCDebug.
|
inline |
Overrides the blob name (needed when elements are already file-backed at construction time).
Definition at line 544 of file Commands.h.
|
inline |
Sets the old blob data for registry swap on undo.
Definition at line 541 of file Commands.h.
|
override |
Definition at line 1224 of file Commands.cpp.
References ElementsCommand::m_scene, and qCDebug.