Embeddable object-navigation widget. Mirrors the legacy Delphi browser's per-type collapsible groups but sits on top of a virtualised QAbstractItemModel so millions of objects don't stall the UI.
More...
#include <objectbrowserpanel.h>
|
| void | plotTimeSeriesRequested (const SWMMObjectRef &object) |
| | Emitted when the user picks "Plot Time Series" from the right-click menu and exactly one results layer (.out) is loaded — the receiver picks that single layer implicitly.
|
| |
| void | plotTimeSeriesForLayerRequested (const SWMMObjectRef &object, SWMMResultsLayer *layer) |
| | Emitted when more than one .out is loaded and the user picks a specific results layer from the "Plot Time Series ▸" submenu. The receiver plots object against that exact layer (no auto-pick-first-found fallback).
|
| |
| void | rainfallVisualizationRequested (const SWMMObjectRef &object) |
| | Emitted when the user picks "Rainfall Visualization…" from a rain gage's right-click menu. The dialog shows every gage; object is carried for a future pre-highlight.
|
| |
Embeddable object-navigation widget. Mirrors the legacy Delphi browser's per-type collapsible groups but sits on top of a virtualised QAbstractItemModel so millions of objects don't stall the UI.
The panel is canvas-agnostic: it binds to a (SWMMModelLayer*, SelectionManager*) pair on every MDI tab switch via setProject(). Pass nulls to detach (empty tree, no signal traffic).
◆ ObjectBrowserPanel()
| ObjectBrowserPanel::ObjectBrowserPanel |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
◆ ~ObjectBrowserPanel()
| ObjectBrowserPanel::~ObjectBrowserPanel |
( |
| ) |
|
|
overridedefault |
◆ focusSearch()
| void ObjectBrowserPanel::focusSearch |
( |
| ) |
|
Show + focus the search box and select its text (toolbar Search).
◆ gapTooltipFor()
Slice BM.0-Add-New — tooltip text for the disabled Add-New action on gap categories. Hardcoded mapping of category → future slice ID
- editor name. Returns an empty string for categories where
hasComplexEditor is true.
◆ hasComplexEditor()
Slice BM.0-Add-New (2026-05-24) — does this data category have a complex MVC editor wired into Add-New today? Returns true only for DataTimeSeries + DataHydrographs. Each future editor slice (BO/BP/BQ/BR) adds one more true case as it ships.
◆ launchAddNewEditor()
Slice BM.0-Add-New — launch the per-category complex editor in create mode. Asserts in debug if called with a gap category (the context menu disables those, so this should be unreachable in production paths).
◆ launchBrowseEditor()
2026-08-31 — launch the per-category complex editor in review/browse mode: nothing is created, the user picks from the editor's own list (and can create via its Add/New button). Used by the Data menu and the ribbon's Data Objects buttons. No-op for gap categories.
◆ openComprehensiveEditorFor()
| void ObjectBrowserPanel::openComprehensiveEditorFor |
( |
SWMMModelLayer * |
layer, |
|
|
QUndoStack * |
undoStack, |
|
|
const SWMMObjectRef & |
ref, |
|
|
QWidget * |
parent |
|
) |
| |
|
static |
2026-05-29 — Open the comprehensive editor for an existing data object referenced by ref, with that object pre-selected for editing. Shared between three surfaces: the object-browser leaf double-click, the object-browser leaf right-click "Edit…" menu, and the attribute-panel header "Open in <Editor>…" button.
Static so the attribute panel can dispatch without needing an object-browser instance; the dialogs are reused across calls via file-scope QPointer statics inside the implementation, so a single editor window is shared no matter which surface launched it. No-op for non-data refs (Node/Link/Subcatchment/Unknown) and for data kinds whose editor hasn't shipped.
- Parameters
-
| layer | Active project's model layer; no-op when null. |
| undoStack | Canvas undo stack to feed dialogs that take one; null is acceptable (editors work without undo). |
| ref | Object to open. Must carry a non-empty name. |
| parent | QWidget parent for the spawned dialog. |
◆ plotTimeSeriesForLayerRequested
Emitted when more than one .out is loaded and the user picks a specific results layer from the "Plot Time Series ▸" submenu. The receiver plots object against that exact layer (no auto-pick-first-found fallback).
◆ plotTimeSeriesRequested
| void ObjectBrowserPanel::plotTimeSeriesRequested |
( |
const SWMMObjectRef & |
object | ) |
|
|
signal |
Emitted when the user picks "Plot Time Series" from the right-click menu and exactly one results layer (.out) is loaded — the receiver picks that single layer implicitly.
◆ rainfallVisualizationRequested
| void ObjectBrowserPanel::rainfallVisualizationRequested |
( |
const SWMMObjectRef & |
object | ) |
|
|
signal |
Emitted when the user picks "Rainfall Visualization…" from a rain gage's right-click menu. The dialog shows every gage; object is carried for a future pre-highlight.
◆ refresh()
| void ObjectBrowserPanel::refresh |
( |
| ) |
|
Rebuild the backing model from the bound layer. Call after SWMMModelLayer::modelLoaded fires, or after bulk add/remove changes the per-category counts.
◆ selectCategory()
Select + scroll to the category header for c (e.g. the "Storage" row when the user clicks the matching kind sub-row in the Layers panel). No-op when the category is empty/hidden. Runs under the applying-from-bus guard: a category header carries no object refs, so without the guard the tree-selection handler would push an empty Replace onto the SelectionManager and wipe the user's map selection.
◆ setProject()
Bind the panel to a project's model layer + selection bus + canvas.
- Parameters
-
| layer | SWMM model layer for the active project (or nullptr). |
| selMgr | SelectionManager owned by the same project (or nullptr). |
| canvas | MapCanvas for zoom-to-object actions (or nullptr to disable them). |
The documentation for this class was generated from the following files: