![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include "map/tools/maptoolfeaturedraw.h"#include "feature/featuregeometry.h"#include "feature/featuretypes.h"#include <QPointF>#include <QPointer>Go to the source code of this file.
Classes | |
| struct | FeatureVertexRef |
| Addresses one vertex inside a FeatureGeometry. More... | |
| class | OpenSWMMVisMapToolAddHole |
| Draw a ring inside the selected polygon; it becomes an interior ring. More... | |
| class | OpenSWMMVisMapToolAddPart |
| Draw an additional part for the selected multi-part feature. More... | |
| class | OpenSWMMVisMapToolEditFeatureVertex |
| Move, insert and delete vertices of the selected feature. More... | |
| class | OpenSWMMVisMapToolMoveFeature |
| Drag the whole selected feature. More... | |
Editing tools for an existing FeatureLayer feature (workplans/MESH_DIALOG_TABS_AND_FEATURE_LAYERS_PLAN_2026-09-07.md §3.3): add a hole, add a part, edit vertices, move a whole feature.
Vertex editing follows OpenSWMMVisMapToolEditVertex's contract (maptooleditvertex.h:29-39) — drag a handle to move it, right-click a segment to insert, right-click a handle to delete, Escape to cancel — but generalised: a FeatureLayer geometry has parts and interior rings, so a handle is addressed by (part, ring, vertex) rather than by a bare index. Handles are painted on the overlay, not added as scene items, exactly as the SWMM vertex editor does.
Every committed change goes through EditFeatureGeometryCommand. A drag emits one mergeable command per motion so the whole drag collapses into a single undo step (the MoveNodeCommand::mergeWith idiom); discrete edits (insert, delete, add hole, add part) are pushed non-mergeable so they stand alone.