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

One row in a layer's legend — label + swatch symbol + optional range. More...

#include "render/symbolstyle.h"
#include <QJsonObject>
#include <QPair>
#include <QString>
#include <QtNumeric>
Include dependency graph for legendsymbolitem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  OpenSWMM::Render::LegendSymbolItem
 One row in a layer's legend. More...
 

Namespaces

namespace  OpenSWMM
 
namespace  OpenSWMM::Render
 

Detailed Description

One row in a layer's legend — label + swatch symbol + optional range.

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
    A LegendSymbolItem is what IFeatureRenderer::legendSymbolItems()
    returns — one entry per visible row of the legend. The legend
    renderer (LegendRenderer, Slice BB Phase 8.6.12) paints each
    item as a (swatch, label) pair using `symbol` for the swatch.

    range is meaningful only for graduated renderers (numeric bins);
    categorized / single-symbol renderers leave it as the default
    (NaN, NaN) sentinel.

    userLabel / visible / sortIndex are the per-item overrides
    introduced in Slice BB Phase 8.6.10 — they let users rename,
    hide, or reorder legend rows without touching the renderer
    itself. Persisted in `.oswp` under `"legendOverrides"`.

    The legend-from-renderer rule (§J.5): legend widgets must walk
    this list rather than maintain a parallel copy of "what symbols
    exist for this layer". That guarantees no drift between the map
    and the legend.

    Cross-slice: Slice BB Phase 8.6 + Slice BI Phase 8.13.6 (see
    GUI_IMPLEMENTATION_PLAN.md §J.5). Sub-phase 8.13.6.1 —
    interface + types only.