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
iattributeprovider.h File Reference

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>
Include dependency graph for iattributeprovider.h:
This graph shows which files directly or indirectly include this file:

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
 

Detailed Description

Layer-side seam for "what attributes can I theme by?" — Slice DM.1.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later
    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.