![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include "map/mapundostack.h"#include "feature/featuregeometry.h"#include "feature/featuretypes.h"#include "layers/featurelayer.h"#include <QPointer>#include <QString>#include <QVariantMap>#include <QVector>Go to the source code of this file.
Classes | |
| class | openswmmvis::map::FeatureCommandBase |
| Shared plumbing: a QPointer to the layer plus error reporting. More... | |
| class | openswmmvis::map::AddFeatureCommand |
| Insert one feature; undo removes it. More... | |
| class | openswmmvis::map::DeleteFeaturesCommand |
| Remove one or more features; undo restores them with their ids. More... | |
| class | openswmmvis::map::EditFeatureGeometryCommand |
| Replace one feature's geometry. More... | |
| class | openswmmvis::map::EditFeatureAttributesCommand |
| Replace one feature's attributes. More... | |
| class | openswmmvis::map::AddFieldCommand |
| Add a schema column; undo drops it. More... | |
| class | openswmmvis::map::RemoveFieldCommand |
| Drop a schema column, snapshotting its values so undo restores them. More... | |
| class | openswmmvis::map::ResampleZCommand |
| Re-sample Z for every feature (or a subset) as ONE undo step. More... | |
Namespaces | |
| namespace | openswmmvis |
| namespace | openswmmvis::map |
Enumerations | |
| enum | openswmmvis::map::FeatureCommandId { openswmmvis::map::FeatureEditGeometryId = 0x4645'0001 } |
Undoable edits to a FeatureLayer (workplans/MESH_DIALOG_TABS_AND_FEATURE_LAYERS_PLAN_2026-09-07.md §3.3).
Ownership follows AddAnnotationCommand (mapundostack.h:964-1000), the only existing precedent for a user-created object that a layer owns: the command holds a detached copy while the edit is undone, the layer owns it while the edit is applied, and THE FEATURE ID IS STABLE across redo/undo cycles so selections, property panels and later commands keep referring to the same thing. FeatureStore::addFeature's FID-reuse path exists solely to honour that contract.
Every tool and every view mutates a FeatureLayer through these commands and never through the layer's setters directly — that is the controller half of the MVC split CLAUDE.md §5.1 asks for, and it is what makes the same edit undoable whether it came from the map, the attribute table or the property panel.
Layer lifetime: commands hold a QPointer, so a command left on the stack after its layer is removed becomes a no-op rather than a crash. That mirrors how the SWMM commands survive a model close.