10#define MAPTOOLSELECT_H
53 [[nodiscard]] QCursor
cursor() const override;
74 void paint(QPainter *painter,
99 const
openswmmvis::plot::ResultDescriptor &descriptor);
107 const
openswmmvis::plot::ResultDescriptor &descriptor,
129 void selectAtPoint(const QPoint &pixel, Qt::KeyboardModifiers mods);
130 void selectInRect(const QRect &pixelRect, Qt::KeyboardModifiers mods);
133 void showContextMenu(const QPoint &pixel);
137 void deleteSelectedObjects();
146 enum class EditKind { None, Node, Gage, Link, Subcatch };
150 EditKind
kind,
int soaIndex);
152 void clearEditMode();
154 int hitTestEditHandle(
const QPoint &pixel)
const;
156 void selectHandlesInRect(
const QRect &pixelRect);
158 void applyGroupDragDelta(
double dx,
double dy);
160 void commitNodeDrag(
double newX,
double newY);
162 void commitGageDrag(
double newX,
double newY);
164 void commitLinkDrag(QVector<QPointF> newInterior);
166 void commitSubcatchDrag(QVector<QPointF> newVertices);
172 void deleteSelectedEditHandles();
174 EditKind m_editKind = EditKind::None;
177 int m_editSoaIdx = -1;
183 QVector<QPointF> m_editHandles;
184 QVector<QPointF> m_editSubcatchVerts;
185 bool m_editDragging =
false;
186 int m_editDragHandle = -1;
187 QPointF m_editDragOrigPt;
188 QPointF m_editCentroidPrev;
189 QPointF m_editGroupDragPrev;
190 double m_editNodeOrigX = 0.0;
191 double m_editNodeOrigY = 0.0;
194 QSet<int> m_editSelectedHandles;
195 bool m_editRubberbanding =
false;
196 bool m_editPressedEmpty =
false;
197 QPoint m_editRubberStart;
198 QPoint m_editRubberCurrent;
200 static constexpr int kEditHandlePx = 7;
201 static constexpr int kSnapRadiusPx = 15;
204 bool m_snapping =
false;
209 bool m_dragging =
false;
211 QPoint m_currentPixel;
227 int m_dragThreshPx = 15;
228 QColor m_rubberColor = QColor(0, 120, 255, 80);
An editable, GeoPackage-backed vector layer.
Definition featurelayer.h:127
The central map display widget — QGIS-style hybrid rendering.
Definition mapcanvas.h:63
An axis-aligned bounding box in the coordinate space of a given CRS.
Definition mapextent.h:26
Abstract base class for all layers displayed in the MapCanvas.
Definition openswmmvislayer.h:116
Renders the SWMM network elements (nodes, links, subcatchments, rain gages) for one OpenSWMMEngine mo...
Definition swmmmodellayer.h:133
Overlays time-stepped simulation results on the SWMM network geometry.
Definition swmmresultslayer.h:96
Represents a coordinate reference system backed by a GDAL OGRSpatialReference.
Definition spatialreferencesystem.h:28
std::vector< float > dx
Definition mesh2dresultsexport.cpp:611
std::vector< float > dy
Green–Gauss only, parallel to cell
Definition mesh2dresultsexport.cpp:611
Definition aquiferprovider.h:21
Slice BL — canonical enumeration of plottable result attributes.
EdgeRef ref
Definition pslgminsize.cpp:377
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
TokenKind kind
Definition queryparser.cpp:34
Y2b-1 (amendment D-Y4) — one plottable result, fixed or species.
QString name
Definition sectionmodelbuilders.cpp:474
Identifies a single SWMM object.
Definition selectionmanager.h:32