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

Abstract base for all undoable commands that affect the MapCanvas. More...

#include <mapundostack.h>

Inheritance diagram for MapCommand:
Collaboration diagram for MapCommand:

Public Member Functions

 MapCommand (const QString &text, MapCanvas *canvas, QUndoCommand *parent=nullptr)
 Constructs a map command with a human-readable text.
 
MapCanvascanvas () const
 

Protected Attributes

MapCanvasm_canvas
 

Detailed Description

Abstract base for all undoable commands that affect the MapCanvas.

Subclasses store the before/after state needed to redo/undo the operation. They receive a pointer to the MapCanvas so they can apply the change.

Constructor & Destructor Documentation

◆ MapCommand()

MapCommand::MapCommand ( const QString &  text,
MapCanvas canvas,
QUndoCommand *  parent = nullptr 
)
explicit

Constructs a map command with a human-readable text.

Parameters
canvasNon-owning pointer to the MapCanvas the command affects.
parentOptional parent QUndoCommand (for command merging).

Member Function Documentation

◆ canvas()

MapCanvas * MapCommand::canvas ( ) const

Member Data Documentation

◆ m_canvas

MapCanvas* MapCommand::m_canvas
protected

Non-owning pointer to the target canvas.


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