![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Reassigns the rain gage of many subcatchments as ONE undo step. More...
#include <mapundostack.h>
Public Member Functions | |
| AssignSubcatchGagesCommand (SWMMModelLayer *layer, QStringList subcatchNames, QStringList newGages, QStringList oldGages, const QString &text, MapCanvas *canvas, QUndoCommand *parent=nullptr) | |
| 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 |
Reassigns the rain gage of many subcatchments as ONE undo step.
Carries parallel arrays rather than pushing a command per subcatchment, following the mesh::pushCellParamEdits idiom: a bulk spatial assignment is one user action and should cost one Ctrl+Z.
Rows already holding the target gage are filtered out by the factory below, so redo() only touches what actually changes.
Everything is keyed by NAME, never by index — gage or subcatchment deletion re-packs engine indices, and this command may be undone long after that has happened.
| AssignSubcatchGagesCommand::AssignSubcatchGagesCommand | ( | SWMMModelLayer * | layer, |
| QStringList | subcatchNames, | ||
| QStringList | newGages, | ||
| QStringList | oldGages, | ||
| const QString & | text, | ||
| MapCanvas * | canvas, | ||
| QUndoCommand * | parent = nullptr |
||
| ) |
|
inlineoverride |
|
override |
|
override |