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

Layer-scope Rule — one styled aspect of a layer. More...

#include "render/ifeaturerenderer.h"
#include <QJsonObject>
#include <QObject>
#include <QString>
#include <memory>
Include dependency graph for rule.h:
This graph shows which files directly or indirectly include this file:

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
 

Detailed Description

Layer-scope Rule — one styled aspect of a layer.

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 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.