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

Ordered, stackable list of Rules owned by a layer (Slice Z.1). More...

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

Go to the source code of this file.

Classes

class  OpenSWMM::Render::RuleList
 Ordered owning container for Rules on one layer. More...
 

Namespaces

namespace  OpenSWMM
 
namespace  OpenSWMM::Render
 

Detailed Description

Ordered, stackable list of Rules owned by a layer (Slice Z.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
    A RuleList is the per-layer container introduced by
    RENDERING_RULE_MODEL_PLAN.md §3.2. It owns Rules in a fixed
    order; paint order = list order (top of the list paints last).
    Per-Rule visibility lets the user toggle individual paint
    passes without removing them.

    RuleList tracks an "active" index — the Rule currently focused
    in the Symbology tab's editor. This is purely an editor /
    selection concept; paint walks the whole list regardless.

    Signals fire at three granularities:
      - ruleListChanged()      — any structural change (add / remove / move / clear).
      - activeIndexChanged(i)  — selection moved (no structural change).
      - ruleChanged(i)         — Rule at index i emitted ruleChanged().

    JSON round-trip: toJson() yields a QJsonArray, fromJson() takes
    one and re-populates. loadLegacySublayersAsRules() migrates the
    older "sublayers" JSON array from shipped .oswp files
    (RENDERING_RULE_MODEL_PLAN.md §15).