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
maptoolpick2dcells.h File Reference

Slice CF.3.3 — canvas map tool that selects 2D mesh cells via box or lasso, then emits the picked triangle index list. More...

#include "map/tools/maptool.h"
#include "plot/plotattribute.h"
#include <QPoint>
#include <QPolygon>
#include <QPolygonF>
#include <QPointer>
#include <QRectF>
#include <QVector>
Include dependency graph for maptoolpick2dcells.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MapToolPick2DCells
 

Detailed Description

Slice CF.3.3 — canvas map tool that selects 2D mesh cells via box or lasso, then emits the picked triangle index list.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Behaviour:

  • Box mode (default) — left-click and drag rubber-band; on release, calls SWMM2DResultsLayer::pickCellsInRect and emits the result. Mirrors the existing OpenSWMMVisMapToolSelect rubber-band logic.
  • Lasso mode — left-click adds polygon vertices, double-click closes, Escape cancels. Calls pickCellsInPolygon. Mirrors MapToolAddSubcatchment's polygon state machine.
  • Single click (no drag) — calls pickCellAt and emits a one-element list, falling back to box mode for selection.
  • B / L keys — swap modes while active.

The tool finds the first SWMM2DResultsLayer on the canvas at activate() time; selection is reported against that layer. The host wire is cellsPicked(layer, triIdxList) which SWMMVis::openComparisonPlotForCells consumes.