![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Undoable deletion of a node, link, rain gage, or subcatchment. More...
#include <mapundostack.h>
Public Types | |
| enum | TargetKind { DeleteNode , DeleteLink , DeleteGage , DeleteSubcatch } |
Public Member Functions | |
| DeleteObjectCommand (SWMMModelLayer *layer, const QString &name, TargetKind kind, MapCanvas *canvas, QUndoCommand *parent=nullptr) | |
| void | setEngineAppliedByBatch (bool b) |
| void | undo () override |
| void | redo () override |
| int | id () const override |
Public Member Functions inherited from MapCommand | |
| MapCommand (const QString &text, MapCanvas *canvas, QUndoCommand *parent=nullptr) | |
Constructs a map command with a human-readable text. | |
| MapCanvas * | canvas () const |
Additional Inherited Members | |
Protected Attributes inherited from MapCommand | |
| MapCanvas * | m_canvas |
Undoable deletion of a node, link, rain gage, or subcatchment.
The constructor snapshots the object's full property state (before redo() deletes it). undo() re-creates the object and restores all properties. For node deletion, cascade-deleted links are also re-created on undo.
| DeleteObjectCommand::DeleteObjectCommand | ( | SWMMModelLayer * | layer, |
| const QString & | name, | ||
| TargetKind | kind, | ||
| MapCanvas * | canvas, | ||
| QUndoCommand * | parent = nullptr |
||
| ) |
Constructor for node deletion. Snapshots the node + identifies cascade links.
|
inlineoverride |
|
override |
|
inline |
Batch mode (perf-plan Phase A2): the owning BatchDeleteCommand's one swmm_*_delete_many call performs the deletion, so this child keeps only its snapshot + undo role and redo() becomes a no-op.
|
override |