![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Embeddable widget containing the layer tree. More...
#include <layertreepanel.h>
Public Slots | |
| void | setActiveResultsLayer (SWMMResultsLayer *layer) |
| Cache the project window's active 1D / 2D results layers so the context-menu "Set as Active Results Layer" entry can render a check-mark on the active one. Wired from the project window's activeResultsLayerChanged / active2DResultsLayerChanged signals. | |
| void | setActive2DResultsLayer (SWMM2DResultsLayer *layer) |
Signals | |
| void | layerSelected (OpenSWMMVisLayer *layer) |
| Emitted when the user selects a layer in the tree. | |
| void | kindSelected (OpenSWMMVisLayer *layer, int kindOrdinal) |
Emitted when the user selects a SWMM kind sub-row (e.g. "Storage"). kindOrdinal matches the SWMMModelLayer::Category enum value. Fires in addition to layerSelected (which collapses kind rows to their parent layer). SWMMVis listens and focuses the matching category in the Object Browser. | |
| void | layerPropertiesRequested (OpenSWMMVisLayer *layer, const QString &routingId=QString()) |
Emitted when the user requests to view properties for a layer. routingId is empty for plain "Properties…"; the sentinel "symbology" (from "Styles ▸ Edit Symbology…") asks the dialog to open on the Symbology tab. | |
| void | attributeTableRequested (OpenSWMMVisLayer *layer) |
Emitted when the user picks "Open Attribute Table" on a layer's context menu. SWMMVis raises the Attribute Table dock and switches its source to layer. | |
| void | layerStyleRequested (OpenSWMMVisLayer *layer) |
| Emitted when the user picks "Set Style…" on a layer's context menu. SWMMVis listens and opens the SymbologyDialog — same path as the animation-toolbar's Set Style action. | |
| void | layerKindStyleRequested (OpenSWMMVisLayer *layer, int kindOrdinal, const QString &rendererId) |
Slice BI-MK.LT — emitted when the user picks a Style option from a kind sub-row's right-click menu. kindOrdinal matches the SWMMModelLayer::Category enum value. rendererId is one of "single", "graduated", "categorized", "rule" (or empty meaning "open dialog without changing class"). SWMMVis listens and (a) swaps the kind's IFeatureRenderer to the matching class with sensible defaults, then (b) opens SymbologyDialog pre-scoped to that kind + tab when BI-MK.1 ships. | |
| void | plotKindObjectRequested (int kindOrdinal, const QString &objectName) |
| Slice PT.1 — emitted when the user picks "Plot timeseries…" on a kind sub-row's right-click menu and selects an object name. SWMMVis listens and routes to its existing AT.2 picker (openTimeSeriesPlotFor) which pops the variable picker and opens the Comparison Plot Dialog. | |
| void | plotTimeSeriesFromOutputLayerRequested (class SWMMResultsLayer *layer) |
Emitted when the user right-clicks a SWMM Output (.out) layer and picks "Plot Time Series…". The receiver pops an object picker (type + id read from the .out) and then the variable picker, plotting against layer specifically. Lets the user anchor the plot to the data layer rather than the model. | |
| void | setActiveResultsLayerRequested (class SWMMResultsLayer *layer) |
| Emitted when the user picks "Set as Active Results Layer" on a results layer's context menu. SWMMVis routes this to the project window's setActiveResultsLayer / setActive2DResultsLayer so the chosen layer becomes the target for all analysis tools. | |
| void | setActive2DResultsLayerRequested (class SWMM2DResultsLayer *layer) |
Public Member Functions | |
| LayerTreePanel (MapCanvas *canvas=nullptr, QWidget *parent=nullptr) | |
| ~LayerTreePanel () override | |
| OpenSWMMVisLayer * | selectedLayer () const |
| Returns the currently selected layer, or nullptr. | |
| void | setCanvas (MapCanvas *canvas) |
| Rebind the panel and its model to a different canvas. | |
| LayerTreeModel * | model () const |
Embeddable widget containing the layer tree.
The panel shows the LayerTreeModel in a QTreeView. Layer-adding actions live on the main application toolbar (actionAddVectorData, actionAddRasterData, actionAddWMSData, actionAddBasemap, actionAddSWMMOutput). Per-layer operations (Zoom To, Remove, Move Up/Down, Show/Hide, Properties) live on the right-click context menu over a tree row.
The canvas binding is mutable — call setCanvas() on MDI tab switch to re-point the tree at the active project's canvas.
|
explicit |
|
overridedefault |
|
signal |
Emitted when the user picks "Open Attribute Table" on a layer's context menu. SWMMVis raises the Attribute Table dock and switches its source to layer.
|
signal |
Emitted when the user selects a SWMM kind sub-row (e.g. "Storage"). kindOrdinal matches the SWMMModelLayer::Category enum value. Fires in addition to layerSelected (which collapses kind rows to their parent layer). SWMMVis listens and focuses the matching category in the Object Browser.
|
signal |
Slice BI-MK.LT — emitted when the user picks a Style option from a kind sub-row's right-click menu. kindOrdinal matches the SWMMModelLayer::Category enum value. rendererId is one of "single", "graduated", "categorized", "rule" (or empty meaning "open dialog without changing class"). SWMMVis listens and (a) swaps the kind's IFeatureRenderer to the matching class with sensible defaults, then (b) opens SymbologyDialog pre-scoped to that kind + tab when BI-MK.1 ships.
|
signal |
Emitted when the user requests to view properties for a layer. routingId is empty for plain "Properties…"; the sentinel "symbology" (from "Styles ▸ Edit Symbology…") asks the dialog to open on the Symbology tab.
|
signal |
Emitted when the user selects a layer in the tree.
|
signal |
Emitted when the user picks "Set Style…" on a layer's context menu. SWMMVis listens and opens the SymbologyDialog — same path as the animation-toolbar's Set Style action.
|
inline |
|
signal |
Slice PT.1 — emitted when the user picks "Plot timeseries…" on a kind sub-row's right-click menu and selects an object name. SWMMVis listens and routes to its existing AT.2 picker (openTimeSeriesPlotFor) which pops the variable picker and opens the Comparison Plot Dialog.
|
signal |
Emitted when the user right-clicks a SWMM Output (.out) layer and picks "Plot Time Series…". The receiver pops an object picker (type + id read from the .out) and then the variable picker, plotting against layer specifically. Lets the user anchor the plot to the data layer rather than the model.
| OpenSWMMVisLayer * LayerTreePanel::selectedLayer | ( | ) | const |
Returns the currently selected layer, or nullptr.
|
slot |
|
signal |
|
slot |
Cache the project window's active 1D / 2D results layers so the context-menu "Set as Active Results Layer" entry can render a check-mark on the active one. Wired from the project window's activeResultsLayerChanged / active2DResultsLayerChanged signals.
|
signal |
Emitted when the user picks "Set as Active Results Layer" on a results layer's context menu. SWMMVis routes this to the project window's setActiveResultsLayer / setActive2DResultsLayer so the chosen layer becomes the target for all analysis tools.
| void LayerTreePanel::setCanvas | ( | MapCanvas * | canvas | ) |
Rebind the panel and its model to a different canvas.