![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Go to the source code of this file.
Classes | |
| class | ComprehensiveEditorRegistry |
Singleton mapping SWMMModelLayer::DataCategory → comprehensive editor metadata + create-new dispatch. More... | |
| struct | ComprehensiveEditorRegistry::Entry |
Slice BM.0-Browse-Edit — Single source of truth mapping each non-spatial data category to its comprehensive MVC editor. Consumed by three surfaces that all need the same (has-editor? / gap-tooltip / open-create-new) answer:
ObjectBrowserPanel's category-header "Add New…" context-menu action.DataObjectPickerEditor's "…" browse button on attribute-panel rows.Replacing the duplicated switch statements in ObjectBrowserPanel and DataObjectPickerEditor with one registry lookup means each future editor slice (BO/BP/BQ/BR) lights up all three surfaces by adding a single registerEditor(...) call rather than touching N call sites.
Lifetime: the registry is a process-wide singleton. Editor entries are layer-agnostic — the OpenCreateFn receives a SWMMModelLayer* per invocation, never captures one. This survives project switches without re-registration.