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

Snapshot/restore of a rain gage's data-source configuration. More...

#include <mapundostack.h>

Inheritance diagram for ConfigureGageCommand:
Collaboration diagram for ConfigureGageCommand:

Classes

struct  Config
 The subset of gage state this command owns. More...
 

Public Member Functions

 ConfigureGageCommand (SWMMModelLayer *layer, QString gageName, Config newConfig, Config oldConfig, 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
 

Static Public Member Functions

static Config capture (SWMMModelLayer *layer, const QString &gageName, bool *ok=nullptr)
 Read a gage's current configuration; ok reports success.
 

Additional Inherited Members

- Protected Attributes inherited from MapCommand
MapCanvasm_canvas
 

Detailed Description

Snapshot/restore of a rain gage's data-source configuration.

AddGageCommand only lays down ObjectDefaultsApplier defaults, so a generated gage still needs its series, rain type, interval and factors set. This also covers the reverse direction: DeleteObject- Command::restoreGage brings a gage back with only its name and coordinates, dropping exactly these fields, so pushing this command before a delete lets undo put the configuration back.

Constructor & Destructor Documentation

◆ ConfigureGageCommand()

ConfigureGageCommand::ConfigureGageCommand ( SWMMModelLayer layer,
QString  gageName,
Config  newConfig,
Config  oldConfig,
MapCanvas canvas,
QUndoCommand *  parent = nullptr 
)

Member Function Documentation

◆ capture()

ConfigureGageCommand::Config ConfigureGageCommand::capture ( SWMMModelLayer layer,
const QString &  gageName,
bool *  ok = nullptr 
)
static

Read a gage's current configuration; ok reports success.

Here is the call graph for this function:

◆ id()

int ConfigureGageCommand::id ( ) const
inlineoverride

◆ redo()

void ConfigureGageCommand::redo ( )
override

◆ undo()

void ConfigureGageCommand::undo ( )
override

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