![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Undoable deletion of a non-spatial data object (curve, time series, or transect) held in a SWMMModelLayer registry. More...
#include <mapundostack.h>
Public Member Functions | |
| DeleteDataObjectCommand (SWMMModelLayer *layer, const SWMMObjectRef &ref, 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. | |
| MapCanvas * | canvas () const |
Static Public Member Functions | |
| static bool | supports (SWMMObjectRef::ObjectType type) |
Additional Inherited Members | |
Protected Attributes inherited from MapCommand | |
| MapCanvas * | m_canvas |
Undoable deletion of a non-spatial data object (curve, time series, or transect) held in a SWMMModelLayer registry.
Data objects are owned by registries (CurveRegistry, TimeseriesRegistry, TransectRegistry) rather than the engine's spatial stores, so this command snapshots the provider's full state, calls registry->remove() on redo(), and re-creates + repopulates the provider on undo(). The registry is flushed to the engine (clear + re-add) after each mutation.
Only Curve, TimeSeries, and Transect are supported today — they have registry-backed CRUD plus engine table/transect delete. Patterns, pollutants, aquifers, snowpacks, LID controls, streets, inlets, land uses, hydrograph groups, and control rules need new engine delete APIs first (see workplans/GUI_DELETE_ALL_OBJECTS_PLAN_2026-07-22.md); supports() returns false for those so callers can grey the menu action.
| DeleteDataObjectCommand::DeleteDataObjectCommand | ( | SWMMModelLayer * | layer, |
| const SWMMObjectRef & | ref, | ||
| MapCanvas * | canvas, | ||
| QUndoCommand * | parent = nullptr |
||
| ) |
|
inlineoverride |
|
override |
|
static |
True when type currently has a registry-backed delete path.
|
override |