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

Records a rain-gage coordinate change for undo/redo — the [SYMBOLS] twin of MoveNodeCommand. More...

#include <mapundostack.h>

Inheritance diagram for MoveGageCommand:
Collaboration diagram for MoveGageCommand:

Public Member Functions

 MoveGageCommand (SWMMModelLayer *layer, int gageIdx, double oldX, double oldY, double newX, double newY, MapCanvas *canvas, QUndoCommand *parent=nullptr)
 
void undo () override
 
void redo () override
 
int id () const override
 
bool mergeWith (const QUndoCommand *other) 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 rain-gage coordinate change for undo/redo — the [SYMBOLS] twin of MoveNodeCommand.

Commits through SWMMModelLayer::applyGageMove so the engine value, cached scene point, spatial index and model extent move together. Gages have no attached links, so there is no auto-length leg. Consecutive commands moving the same gage merge into a single undoable step, like node moves.

Constructor & Destructor Documentation

◆ MoveGageCommand()

MoveGageCommand::MoveGageCommand ( SWMMModelLayer layer,
int  gageIdx,
double  oldX,
double  oldY,
double  newX,
double  newY,
MapCanvas canvas,
QUndoCommand *  parent = nullptr 
)

Member Function Documentation

◆ id()

int MoveGageCommand::id ( ) const
inlineoverride

◆ mergeWith()

bool MoveGageCommand::mergeWith ( const QUndoCommand *  other)
override

◆ redo()

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

◆ undo()

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

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