![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Tool that selects features in vector and SWMM model layers. More...
#include <maptoolselect.h>
Signals | |
| void | pixelToleranceChanged (int pixels) |
| void | rubberBandColorChanged (const QColor &color) |
| void | selectionChanged (OpenSWMMVisLayer *layer) |
| Emitted after the selection changes, carrying the names/IDs of selected elements. | |
| void | plotTimeSeriesRequested (const SWMMObjectRef &ref) |
| Emitted from the right-click context menu's "Plot Time Series…" action. Handled at the main-window level identically to the Object Browser's identically-named signal, so the chart dialog opens against the active project's results .out file. | |
| void | plotAttributeRequested (const SWMMObjectRef &ref, const openswmmvis::plot::ResultDescriptor &descriptor) |
Slice AT.2 — emitted when the user picks a specific attribute from the right-click attribute submenu on a map object. Carries PlotAttribute::Unknown for the "All attributes" entry. | |
| void | plotAttributeForLayerRequested (const SWMMObjectRef &ref, const openswmmvis::plot::ResultDescriptor &descriptor, class SWMMResultsLayer *layer) |
Variant of plotAttributeRequested that names a specific results layer. Emitted from the two-level "Plot Time Series ▸
<layer> ▸ <variable>" submenu shown when more than one SWMM Output (.out) layer is loaded on the canvas. The receiver plots against that exact layer (no auto-pick-first-found). | |
| void | plotSystemRequested (openswmmvis::plot::PlotAttribute attribute) |
| Slice AT.2 — emitted when the user picks a system-wide variable from the background right-click menu ("Plot System
Variable…" submenu). | |
| void | deleteFeaturesRequested (FeatureLayer *layer) |
The user chose "Delete selected feature(s)" from the background right-click menu, offered only while layer has an open edit session and a non-empty selection. The tool does not delete anything itself: the main window owns the undo stack and the error reporting, and this keeps map right-click, the Del key and the Features grid on one path. | |
| void | rainfallVisualizationRequested (const SWMMObjectRef &ref) |
| Emitted from the right-click menu's "Rainfall Visualization…" action on a rain gage hit. The main window opens the shared Rainfall Visualization dialog focused on that gage — the map twin of the Object Browser's identically-named signal. | |
Signals inherited from OpenSWMMVisMapTool | |
| void | cursorChanged (const QCursor &cursor) |
| void | activeChanged (bool active) |
| void | repaintRequested () |
| Emitted to instruct the canvas to repaint its overlay. | |
Public Member Functions | |
| OpenSWMMVisMapToolSelect (MapCanvas *canvas, QObject *parent=nullptr) | |
| QCursor | cursor () const override |
| Returns the mouse cursor to display while this tool is active. | |
| int | pixelTolerance () const |
| void | setPixelTolerance (int pixels) |
| QColor | rubberBandColor () const |
| void | setRubberBandColor (const QColor &color) |
| void | activate () override |
| Called by the canvas when this tool becomes the active tool. | |
| void | deactivate () override |
| Called by the canvas when another tool replaces this one. | |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| void | mouseDoubleClickEvent (QMouseEvent *event) override |
| void | keyPressEvent (QKeyEvent *event) override |
| void | paint (QPainter *painter, const MapExtent &canvasExtent, const SpatialReferenceSystem *canvasSRS) override |
| Called by the canvas in drawForeground() so the tool can draw transient overlay graphics (rubber-band, measure segments, etc.). | |
Public Member Functions inherited from OpenSWMMVisMapTool | |
| OpenSWMMVisMapTool (const QString &toolName, MapCanvas *canvas, QObject *parent=nullptr) | |
| virtual | ~OpenSWMMVisMapTool ()=default |
| QString | toolName () const |
| Returns the human-readable name of this tool. | |
| bool | isActive () const |
| Returns true when this tool is the active tool on its canvas. | |
| MapCanvas * | canvas () const |
| Returns the MapCanvas this tool is attached to. | |
| virtual void | wheelEvent (QWheelEvent *event) |
| virtual void | keyReleaseEvent (QKeyEvent *event) |
| QGraphicsScene * | scene () const |
| Returns the scene this tool's canvas is using. | |
| void | toMapCoords (int px, int py, double &mapX, double &mapY) const |
| Converts a widget pixel position to map coordinates. | |
| void | toPixelCoords (double mapX, double mapY, int &px, int &py) const |
| Converts map coordinates to widget pixel position. | |
Properties | |
| int | pixelTolerance |
| QColor | rubberBandColor |
Properties inherited from OpenSWMMVisMapTool | |
| QString | toolName |
| QCursor | cursor |
| bool | active |
Additional Inherited Members | |
Protected Attributes inherited from OpenSWMMVisMapTool | |
| QString | m_toolName |
| MapCanvas * | m_canvas = nullptr |
Tool that selects features in vector and SWMM model layers.
Single-click selects the nearest feature (within a configurable pixel tolerance). Click-and-drag draws a rubber-band rectangle and selects all features that intersect it.
Holding Shift adds to the current selection. Holding Ctrl subtracts from the current selection. Pressing Escape clears all selections across all selectable layers.
Each selection change pushes an undo command so it can be reversed.
|
explicit |
|
overridevirtual |
Called by the canvas when this tool becomes the active tool.
Reimplemented from OpenSWMMVisMapTool.
|
overridevirtual |
Returns the mouse cursor to display while this tool is active.
Reimplemented from OpenSWMMVisMapTool.
|
overridevirtual |
Called by the canvas when another tool replaces this one.
Reimplemented from OpenSWMMVisMapTool.
|
signal |
The user chose "Delete selected feature(s)" from the background right-click menu, offered only while layer has an open edit session and a non-empty selection. The tool does not delete anything itself: the main window owns the undo stack and the error reporting, and this keeps map right-click, the Del key and the Features grid on one path.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Called by the canvas in drawForeground() so the tool can draw transient overlay graphics (rubber-band, measure segments, etc.).
Override this to paint tool overlays directly via QPainter in view coordinates.
Reimplemented from OpenSWMMVisMapTool.
| int OpenSWMMVisMapToolSelect::pixelTolerance | ( | ) | const |
|
signal |
|
signal |
Variant of plotAttributeRequested that names a specific results layer. Emitted from the two-level "Plot Time Series ▸
<layer> ▸ <variable>" submenu shown when more than one SWMM Output (.out) layer is loaded on the canvas. The receiver plots against that exact layer (no auto-pick-first-found).
|
signal |
Slice AT.2 — emitted when the user picks a specific attribute from the right-click attribute submenu on a map object. Carries PlotAttribute::Unknown for the "All attributes" entry.
|
signal |
Slice AT.2 — emitted when the user picks a system-wide variable from the background right-click menu ("Plot System Variable…" submenu).
|
signal |
Emitted from the right-click context menu's "Plot Time Series…" action. Handled at the main-window level identically to the Object Browser's identically-named signal, so the chart dialog opens against the active project's results .out file.
|
signal |
Emitted from the right-click menu's "Rainfall Visualization…" action on a rain gage hit. The main window opens the shared Rainfall Visualization dialog focused on that gage — the map twin of the Object Browser's identically-named signal.
| QColor OpenSWMMVisMapToolSelect::rubberBandColor | ( | ) | const |
|
signal |
|
signal |
Emitted after the selection changes, carrying the names/IDs of selected elements.
| void OpenSWMMVisMapToolSelect::setPixelTolerance | ( | int | pixels | ) |
| void OpenSWMMVisMapToolSelect::setRubberBandColor | ( | const QColor & | color | ) |
|
readwrite |
|
readwrite |