![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include <irendererpanel.h>
Classes | |
| struct | Entry |
Public Types | |
| using | Factory = std::function< IRendererPanel *(const RendererPanelContext &ctx, QWidget *parent)> |
| using | Applicable = std::function< bool(const RendererPanelContext &ctx)> |
Public Member Functions | |
| void | registerRenderer (QString rendererId, QString displayName, Factory factory, Applicable applicable={}, QString disabledReason=QString()) |
| const std::vector< Entry > & | entries () const |
| const Entry * | find (const QString &rendererId) const |
Static Public Member Functions | |
| static RendererPanelRegistry & | instance () |
Picks the matching panel for a (rendererId, context) pair.
| using openswmmvis::ui::RendererPanelRegistry::Applicable = std::function<bool(const RendererPanelContext &ctx)> |
Gap A4.2 — declarative applicability: returns true when the renderer class makes sense for the resolved context (e.g. Graduated needs at least one numeric attribute). Null predicate = always applicable.
| using openswmmvis::ui::RendererPanelRegistry::Factory = std::function<IRendererPanel *(const RendererPanelContext &ctx, QWidget *parent)> |
Factory: (context) → IRendererPanel. The factory installs the matching renderer-class on the host before returning so the current panel always reflects the live renderer state.
|
inline |
All registered renderer IDs in registration order — the SymbologyTab walks this to populate the dropdown.
| const RendererPanelRegistry::Entry * openswmmvis::ui::RendererPanelRegistry::find | ( | const QString & | rendererId | ) | const |
Resolve a registered factory by rendererId. Returns nullptr when the id has no factory yet — caller falls back to the dropdown's first entry.
|
static |
| void openswmmvis::ui::RendererPanelRegistry::registerRenderer | ( | QString | rendererId, |
| QString | displayName, | ||
| RendererPanelRegistry::Factory | factory, | ||
| RendererPanelRegistry::Applicable | applicable = {}, |
||
| QString | disabledReason = QString() |
||
| ) |