![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Layer-scope Rule — one styled aspect of a layer. More...
#include "render/ifeaturerenderer.h"#include <QJsonObject>#include <QObject>#include <QString>#include <memory>Go to the source code of this file.
Classes | |
| class | OpenSWMM::Render::Rule |
| One layer-scope styled aspect — name + renderer + filter + scale. More... | |
Namespaces | |
| namespace | OpenSWMM |
| namespace | OpenSWMM::Render |
Layer-scope Rule — one styled aspect of a layer.
A Rule is the user-facing styling unit introduced by Slice Z.1
(RENDERING_RULE_MODEL_PLAN.md §3.1). It wraps an IFeatureRenderer
plus a small set of layer-scope properties: name, visibility, an
optional filter expression, a scale-visibility window, and a
blend mode. A layer owns an ordered RuleList; the active Rule is
what the Symbology tab edits.
"Rule" follows QGIS's Rule-based renderer terminology — extended
one level up from sub-renderer scope to layer scope. See
RENDERING_RULE_MODEL_PLAN.md §2 for the vocabulary mapping and
§2.1 for the rationale.
JSON round-trip is mandatory: .swmm-rule.json export, .oswp
project persistence, and undo / map-preset snapshots all rely on
it. The renderer is serialised via its IFeatureRenderer::toJson
contract; the renderer id (`"single"` / `"graduated"` / ...) is
what fromJson dispatches on.