![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
A dock widget that displays and edits object attributes using QPropertyModel. More...
#include <propertiespanel.h>
Public Slots | |
| void | onIdentifyResult (const QList< IdentifyResult > &results) |
| void | onObjectEditedExternally (const QString &name) |
| void | onOffsetModeChanged () |
Signals | |
| void | propertyChanged (QObject *object, const QString &propertyName, const QVariant &oldValue, const QVariant &newValue) |
| Emitted when the user changes a property value in the view. | |
| void | objectEdited (const QString &name) |
| void | rainfallPlotRequested (const QString &gageId) |
| The rain gage "Plot Rainfall…" button was clicked; the main window opens the shared Rainfall Visualization dialog focused on gageId (the bound gage — empty if no adapter is bound). | |
Public Member Functions | |
| PropertiesPanel (QWidget *parent=nullptr) | |
| ~PropertiesPanel () override | |
| void | showObject (QObject *object, const QString &title={}) |
Switches the panel to show the Q_PROPERTY attributes of object. | |
| void | showIdentifyResults (const QList< IdentifyResult > &results) |
| Shows the attribute results from an identify operation. | |
| void | showLayerProperties (OpenSWMMVisLayer *layer) |
| Shows the editable properties of the given layer. | |
| void | clear () |
| Clears the panel. | |
| void | setProject (SWMMModelLayer *layer) |
| void | setStatsRegistry (openswmmvis::OutputStatsRegistry *registry) |
| void | setActiveResultsLayer (SWMMResultsLayer *layer) |
| void | showDataObject (SWMMModelLayer *layer, int objectKind, const QString &name) |
A dock widget that displays and edits object attributes using QPropertyModel.
The panel shows:
It uses QPropertyModel / QPropertyItemDelegate so any Q_PROPERTY exposed by a QObject (layer, feature, SWMM element) is automatically displayed with the correct editor widget (check box, spin box, colour picker, …).
The panel has a layer drop-down so the user can switch between the properties of any of the layers that returned results in the last identify operation.
|
explicit |
|
override |
| void PropertiesPanel::clear | ( | ) |
Clears the panel.
|
signal |
Round-4 follow-up 2026-05-12 — emitted after a property- browser edit so the Attribute Table dock can mirror the change. Wired in SWMMVis. Suppressed when the adapter's changed() was triggered by onObjectEditedExternally.
|
slot |
|
slot |
Round-4 follow-up 2026-05-12 — refresh the bound adapter if its object name matches name, so a table-side edit is reflected in the Property Browser. No-op when no adapter is bound or the name doesn't match.
|
slot |
LINK_OFFSETS mode changed: a bound link's offset rows are labelled "Inlet/Outlet Offset" vs "… Elevation", and the label is captured when the adapter is bound, so replay the bind. No-op unless a link is shown.
|
signal |
Emitted when the user changes a property value in the view.
| object | The source QObject. |
| propertyName | Q_PROPERTY name. |
| oldValue | Previous value. |
| newValue | New value. |
|
signal |
The rain gage "Plot Rainfall…" button was clicked; the main window opens the shared Rainfall Visualization dialog focused on gageId (the bound gage — empty if no adapter is bound).
| void PropertiesPanel::setActiveResultsLayer | ( | SWMMResultsLayer * | layer | ) |
Bind the project's ACTIVE 1D results layer so the panel's post-run summary rows follow the active run the same way the Attribute Table's dynamics columns do (SWMMVis calls this on tab activation and on every activeResultsLayerChanged). Selects the layer's row in the Stats-source combo — the combo remains a manual override until the active layer next changes — and re-reads the stat rows whenever the bound layer's results are (re)opened or finalized, so a re-run into the same .out refreshes in place. Pass nullptr to fall back to the "(editing engine)" sentinel.
| void PropertiesPanel::setProject | ( | SWMMModelLayer * | layer | ) |
Slice Z.5.3 — bind to the active project's model layer so identify results that resolve to a SWMM node can be shown via a typed SWMMNodePropertyAdapter (editable via existing QPropertyModel auto-delegates). Pass nullptr to detach.
| void PropertiesPanel::setStatsRegistry | ( | openswmmvis::OutputStatsRegistry * | registry | ) |
Slice QA.2 — bind the per-project OutputStatsRegistry so the Stats-source combo above the property tree can populate from every loaded SWMMResultsLayer. Pass nullptr to hide the combo (matches today's behaviour for projects with no results loaded yet). Idempotent — repeated calls re-wire signals safely.
| void PropertiesPanel::showDataObject | ( | SWMMModelLayer * | layer, |
| int | objectKind, | ||
| const QString & | name | ||
| ) |
Slice DA.2 — show a non-spatial Data Object (curve, time series, pattern, LID control, pollutant, land use, aquifer, snowpack, control rule, transect, hydrograph group, street, inlet, or rain gage) using the typed property adapter for its kind.
Bypasses the identify-result flow; called directly when an Object Browser leaf is clicked. The kind value is an SWMMObjectRef::ObjectType (cast to int to keep the header forward-declaration-friendly).
| void PropertiesPanel::showIdentifyResults | ( | const QList< IdentifyResult > & | results | ) |
Shows the attribute results from an identify operation.
| results | One IdentifyResult per layer. |
| void PropertiesPanel::showLayerProperties | ( | OpenSWMMVisLayer * | layer | ) |
Shows the editable properties of the given layer.
| void PropertiesPanel::showObject | ( | QObject * | object, |
| const QString & | title = {} |
||
| ) |
Switches the panel to show the Q_PROPERTY attributes of object.
| object | Any QObject whose Q_PROPERTYs should be displayed. Pass nullptr to clear the panel. |
| title | Optional title shown in the tab or header. |