|
wiRedPanda
Logic Circuit Simulator
|
Undo command that adds a list of graphic elements to the scene. More...
#include <Commands.h>
Public Member Functions | |
| AddItemsCommand (const QList< QGraphicsItem * > &items, Scene *scene, QUndoCommand *parent=nullptr) | |
| Constructs the command for adding items. | |
| void | redo () override |
| Adds the items to the scene. | |
| void | undo () override |
| Removes the items from the scene. | |
Undo command that adds a list of graphic elements to the scene.
Definition at line 66 of file Commands.h.
|
explicit |
Constructs the command for adding items.
| items | List of GraphicElements (IO elements, gates, ICs) to add. |
| scene | Target scene. |
| parent | Optional parent undo command. |
Definition at line 270 of file Commands.cpp.
References CommandUtils::addItems(), and CommandUtils::loadList().
|
override |
Adds the items to the scene.
Definition at line 296 of file Commands.cpp.
References CommandUtils::loadItems(), and qCDebug.
|
override |
Removes the items from the scene.
Definition at line 286 of file Commands.cpp.
References CommandUtils::deleteItems(), CommandUtils::findItems(), qCDebug, and CommandUtils::saveItems().