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

One renderer construction path, archetype-seeded (gap A1.3). More...

#include "render/iattributeprovider.h"
#include "render/sublayers/feature/featuresublayer.h"
#include "render/symbolstyle.h"
#include <QString>
#include <QVector>
#include <memory>
Include dependency graph for rendererfactory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  OpenSWMM
 
namespace  OpenSWMM::Render
 
namespace  OpenSWMM::Render::RendererFactory
 

Functions

SymbolStyle OpenSWMM::Render::RendererFactory::defaultSymbolForArchetype (FeatureSublayer::Archetype archetype)
 
FeatureSublayer::Archetype OpenSWMM::Render::RendererFactory::archetypeFromSymbol (const SymbolStyle &style, FeatureSublayer::Archetype fallback=FeatureSublayer::Archetype::Point)
 
SymbolStyle OpenSWMM::Render::RendererFactory::baseSymbolOf (const IFeatureRenderer *renderer)
 
std::unique_ptr< IFeatureRendererOpenSWMM::Render::RendererFactory::makeRenderer (const QString &rendererId, FeatureSublayer::Archetype archetype, const IFeatureRenderer *previous=nullptr, const QVector< AttributeField > *fields=nullptr)
 Create a renderer of rendererId with a seeded base symbol.
 

Detailed Description

One renderer construction path, archetype-seeded (gap A1.3).

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
    Historically four call sites constructed renderers when the
    user (or a default) picked a renderer class — SymbologyTab's
    installRendererClassIfChanged, KindRendererPanel::onModeChanged,
    Rule::setRendererById and SWMMResultsLayer's
    makeDefaultKindRenderer — and only one of them seeded the new
    renderer's base symbol. A default-constructed renderer carries
    an EMPTY base symbol; overrideColorInPlace only writes into
    colour slots that already exist, so symbolFor() returned a
    colour-less style and paint silently fell back to the legacy
    ramp. This factory is the single construction path: every
    renderer leaves it with an archetype-appropriate, fully-keyed
    base/fallback symbol and (when resolvable) a seeded classify
    attribute.