![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Layer-side seam for "what attributes can I theme by?" — Slice DM.1. More...
#include "layers/swmm_category.h"#include <QMetaType>#include <QString>#include <QVariant>#include <QVector>Go to the source code of this file.
Classes | |
| struct | OpenSWMM::Render::AttributeField |
| One themeable attribute on a layer. More... | |
| class | OpenSWMM::Render::IAttributeProvider |
| Interface every themeable layer implements so renderer panels can populate attribute combos without hardcoding the lists. More... | |
Namespaces | |
| namespace | OpenSWMM |
| namespace | OpenSWMM::Render |
Layer-side seam for "what attributes can I theme by?" — Slice DM.1.
The renderer panels (Graduated / Categorized / the AN.* raster
adapters' attribute slot) need to populate their attribute
combos. Before this interface they hardcoded per-category
suggestion lists (categorizedrendererpanel.cpp:114). With
IAttributeProvider, every themeable layer owns the source of
truth — `availableAttributes(category)` returns the canonical
names + display labels + dynamic-or-static flag + units.
Panels consume it via:
auto *p = qobject_cast<IAttributeProvider*>(ctx.hostLayer);
if (p) combo->populate(p->availableAttributes(*ctx.category));
No provider available (Rule-based path with no host, GIS-vector
layer that hasn't implemented it yet) — fall through to the
legacy free-text QLineEdit behaviour.
See docs/RENDERING_DIALOG_DEMO_PLAN.md §2.