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

Records the creation of a SWMM link (conduit/pump/orifice/weir/outlet). More...

#include <mapundostack.h>

Inheritance diagram for AddLinkCommand:
Collaboration diagram for AddLinkCommand:

Public Member Functions

 AddLinkCommand (SWMMModelLayer *layer, QString name, int linkType, QString fromNode, QString toNode, QVector< QPointF > interiorVertices, MapCanvas *canvas, double offsetUp=0.0, double offsetDn=0.0, QUndoCommand *parent=nullptr)
 Creates an add-link command.
 
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 the creation of a SWMM link (conduit/pump/orifice/weir/outlet).

redo() calls SWMMModelLayer::applyLinkAdd; undo() calls rollbackTailLinkAdd — only valid while the link is still the tail.

Constructor & Destructor Documentation

◆ AddLinkCommand()

AddLinkCommand::AddLinkCommand ( SWMMModelLayer layer,
QString  name,
int  linkType,
QString  fromNode,
QString  toNode,
QVector< QPointF >  interiorVertices,
MapCanvas canvas,
double  offsetUp = 0.0,
double  offsetDn = 0.0,
QUndoCommand *  parent = nullptr 
)

Creates an add-link command.

Parameters
offsetUpUpstream invert offset (m or ft). Written via swmm_link_set_offset_up after the link is created. 0.0 = no override.
offsetDnDownstream invert offset. 0.0 = no override.

Member Function Documentation

◆ id()

int AddLinkCommand::id ( ) const
inlineoverride

◆ redo()

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

◆ undo()

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

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