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::RendererPanelContext Struct Reference

Context passed to renderer-panel factories at construction time. More...

#include <irendererpanel.h>

Collaboration diagram for openswmmvis::ui::RendererPanelContext:

Public Member Functions

bool hasNumeric () const
 
bool hasString () const
 

Static Public Member Functions

static RendererPanelContext resolve (OpenSWMMVisLayer *layer, std::optional< OpenSWMMVis::SwmmCategory > category, OpenSWMM::Render::Rule *rule=nullptr)
 

Public Attributes

OpenSWMMVisLayerhostLayer = nullptr
 
std::optional< OpenSWMMVis::SwmmCategorycategory
 
OpenSWMM::Render::Rulerule = nullptr
 
QVector< OpenSWMM::Render::AttributeFieldfields
 
OpenSWMM::Render::FeatureSublayer::Archetype archetype
 
bool animated = false
 

Detailed Description

Context passed to renderer-panel factories at construction time.

   Three possible target shapes, in priority order:

     1. \c rule != nullptr — Slice Z.3b. The panel edits the
        Rule's owned renderer via `rule->renderer()` /
        `rule->setRenderer(...)`. \c hostLayer / \c category
        are ignored when \c rule is set. The Rule outlives the
        panel.
     2. \c hostLayer + \c category — the panel edits one of
        SWMMModelLayer / SWMMResultsLayer's per-kind renderer
        slots (the legacy multi-kind path).
     3. \c hostLayer only — the panel edits the layer's single
        layer-level renderer (the vector / raster case).

   Panel implementations check \c ctx.rule first; if null, they
   fall back to the layer + category path. Slice Z.3b only
   rewires the outer SymbologyTab's renderer-class picker (read
   + class-swap). The individual IRendererPanel implementations
   are migrated to consult \c ctx.rule in the named Z.3c
   follow-up.

Member Function Documentation

◆ hasNumeric()

bool openswmmvis::ui::RendererPanelContext::hasNumeric ( ) const
inline

◆ hasString()

bool openswmmvis::ui::RendererPanelContext::hasString ( ) const
inline

◆ resolve()

RendererPanelContext openswmmvis::ui::RendererPanelContext::resolve ( OpenSWMMVisLayer layer,
std::optional< OpenSWMMVis::SwmmCategory category,
OpenSWMM::Render::Rule rule = nullptr 
)
static

Build a context with the capability snapshot resolved: provider lookup (including the rule → RuleList → layer parent walk), archetype from the category, animated from the host layer type.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ animated

bool openswmmvis::ui::RendererPanelContext::animated = false

True when the host is an animated (results) layer — gates range-mode rows and per-frame rebin options.

◆ archetype

OpenSWMM::Render::FeatureSublayer::Archetype openswmmvis::ui::RendererPanelContext::archetype
Initial value:

Geometry archetype of the target kind (Point when unknown).

◆ category

std::optional<OpenSWMMVis::SwmmCategory> openswmmvis::ui::RendererPanelContext::category

◆ fields

QVector<OpenSWMM::Render::AttributeField> openswmmvis::ui::RendererPanelContext::fields

Attribute fields exposed by the host's IAttributeProvider for the target category (empty when no provider / no fields).

◆ hostLayer

OpenSWMMVisLayer* openswmmvis::ui::RendererPanelContext::hostLayer = nullptr

◆ rule

OpenSWMM::Render::Rule* openswmmvis::ui::RendererPanelContext::rule = nullptr

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