|
wiRedPanda
Logic Circuit Simulator
|
Undo command that inserts a Node junction into an existing connection. More...
#include <Commands.h>
Public Member Functions | |
| void | redo () override |
| Inserts the node and splits the connection. | |
| SplitCommand (Connection *conn, QPointF mousePos, Scene *scene, QUndoCommand *parent=nullptr) | |
| Constructs the split command. | |
| void | undo () override |
| Removes the node and restores the original connection. | |
Undo command that inserts a Node junction into an existing connection.
Definition at line 249 of file Commands.h.
|
explicit |
Constructs the split command.
| conn | Connection to split. |
| mousePos | Scene position where the node will be inserted. |
| scene | Target scene. |
| parent | Optional parent undo command. |
Definition at line 551 of file Commands.cpp.
References Connection::angle(), ElementFactory::buildElement(), Connection::endPort(), Port::graphicElement(), Constants::gridSize, ItemWithId::id(), PANDACEPTION, and Connection::startPort().
|
override |
Inserts the node and splits the connection.
Definition at line 610 of file Commands.cpp.
References ElementFactory::buildElement(), CommandUtils::findConn(), CommandUtils::findElm(), PANDACEPTION, and qCDebug.
|
override |
Removes the node and restores the original connection.
Definition at line 663 of file Commands.cpp.
References CommandUtils::findConn(), CommandUtils::findElm(), PANDACEPTION, and qCDebug.