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
SetInletUsageCommand Class Reference

Records a change to one inlet-usage row (conduit host or inlet junction host — the same command serves both, per §2.4/§3.4 of workplans/INLET_EDITOR_AND_INLET_JUNCTION_GUI_PLAN_2026-09-05.md). More...

#include <mapundostack.h>

Inheritance diagram for SetInletUsageCommand:
Collaboration diagram for SetInletUsageCommand:

Public Member Functions

 SetInletUsageCommand (SWMMModelLayer *layer, const SWMM_InletUsage &newUsage, bool removing, 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

Records a change to one inlet-usage row (conduit host or inlet junction host — the same command serves both, per §2.4/§3.4 of workplans/INLET_EDITOR_AND_INLET_JUNCTION_GUI_PLAN_2026-09-05.md).

The constructor snapshots the host's PRIOR row (or its absence), so undo restores the previous design / capture node / counts, or removes the row again when there was none. redo() applies the new row; passing an "absent" new state makes this a removal command.

Constructor & Destructor Documentation

◆ SetInletUsageCommand()

SetInletUsageCommand::SetInletUsageCommand ( SWMMModelLayer layer,
const SWMM_InletUsage &  newUsage,
bool  removing,
MapCanvas canvas,
QUndoCommand *  parent = nullptr 
)
Parameters
newUsageRow to install on redo.
removingtrue to REMOVE the host's row instead of setting it (only newUsage.host_kind / host_idx are then read).
Here is the call graph for this function:

Member Function Documentation

◆ id()

int SetInletUsageCommand::id ( ) const
inlineoverride

◆ redo()

void SetInletUsageCommand::redo ( )
override
Here is the call graph for this function:

◆ undo()

void SetInletUsageCommand::undo ( )
override
Here is the call graph for this function:

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