SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmmvis::ui::RendererPanelRegistry Class Reference

#include <irendererpanel.h>

Collaboration diagram for openswmmvis::ui::RendererPanelRegistry:

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 Entryfind (const QString &rendererId) const
 

Static Public Member Functions

static RendererPanelRegistryinstance ()
 

Detailed Description

Picks the matching panel for a (rendererId, context) pair.

Member Typedef Documentation

◆ Applicable

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.

◆ Factory

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.

Member Function Documentation

◆ entries()

const std::vector< Entry > & openswmmvis::ui::RendererPanelRegistry::entries ( ) const
inline

All registered renderer IDs in registration order — the SymbologyTab walks this to populate the dropdown.

Here is the caller graph for this function:

◆ find()

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.

◆ instance()

RendererPanelRegistry & openswmmvis::ui::RendererPanelRegistry::instance ( )
static
Here is the caller graph for this function:

◆ registerRenderer()

void openswmmvis::ui::RendererPanelRegistry::registerRenderer ( QString  rendererId,
QString  displayName,
RendererPanelRegistry::Factory  factory,
RendererPanelRegistry::Applicable  applicable = {},
QString  disabledReason = QString() 
)

The documentation for this class was generated from the following files: