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
rulebasedrendererpanel.cpp File Reference

IRendererPanel implementation for the "Rule-based" renderer class. Slice X.13 — completes the rule-based leg that previously had no registered panel and fell through to the "no editor registered" placeholder. More...

#include "ui/dialogs/irendererpanel.h"
#include "layers/openswmmvislayer.h"
#include "layers/swmmmodellayer.h"
#include "layers/swmmresultslayer.h"
#include "render/ifeaturerenderer.h"
#include "render/renderers/rulebasedrenderer.h"
#include "render/rule.h"
#include "render/symbolstyle.h"
#include "ui/theme/iconfactory.h"
#include <QColor>
#include <QColorDialog>
#include <QEvent>
#include <QGroupBox>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QLabel>
#include <QPainter>
#include <QStandardItem>
#include <QStandardItemModel>
#include <QStyledItemDelegate>
#include <QTableView>
#include <QToolButton>
#include <QVBoxLayout>
Include dependency graph for rulebasedrendererpanel.cpp:

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::ui
 

Detailed Description

IRendererPanel implementation for the "Rule-based" renderer class. Slice X.13 — completes the rule-based leg that previously had no registered panel and fell through to the "no editor registered" placeholder.

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

Layout (QGIS-aligned):

  • Rules table : Expression | Label | Colour
  • Buttons : Add / Remove / Move up / Move down / Clear
  • Fallback : colour swatch + label for the no-match case

First-match order matters, hence the explicit Move up / Move down buttons. Expression eval is still gated behind Slice BI.2 (LabelExpression DSL) so a banner at the top of the panel calls that out — empty-expression rules already work today (they "match always") and are useful for static "default rule first" setups.