SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
AssignSubcatchGagesCommand Class Reference

Reassigns the rain gage of many subcatchments as ONE undo step. More...

#include <mapundostack.h>

Inheritance diagram for AssignSubcatchGagesCommand:
Collaboration diagram for AssignSubcatchGagesCommand:

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.
 
MapCanvascanvas () const
 

Additional Inherited Members

- Protected Attributes inherited from MapCommand
MapCanvasm_canvas
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AssignSubcatchGagesCommand()

AssignSubcatchGagesCommand::AssignSubcatchGagesCommand ( SWMMModelLayer layer,
QStringList  subcatchNames,
QStringList  newGages,
QStringList  oldGages,
const QString &  text,
MapCanvas canvas,
QUndoCommand *  parent = nullptr 
)

Member Function Documentation

◆ id()

int AssignSubcatchGagesCommand::id ( ) const
inlineoverride

◆ redo()

void AssignSubcatchGagesCommand::redo ( )
override

◆ undo()

void AssignSubcatchGagesCommand::undo ( )
override

The documentation for this class was generated from the following files: