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

Slice BB Phase 8.6.16 — QAbstractItemModel exposing a MapCanvas's layers as a two-level tree (Layer → LegendSymbolItem) for the LegendPropertiesDialog Layers tab. More...

#include <QAbstractItemModel>
#include <QColor>
#include <QList>
#include <QPointer>
#include <QString>
#include <QVector>
Include dependency graph for legendlayertreemodel.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmmvis::ui::LegendLayerTreeModel
 

Namespaces

namespace  OpenSWMM
 
namespace  OpenSWMM::Render
 
namespace  openswmmvis
 
namespace  openswmmvis::ui
 

Detailed Description

Slice BB Phase 8.6.16 — QAbstractItemModel exposing a MapCanvas's layers as a two-level tree (Layer → LegendSymbolItem) for the LegendPropertiesDialog Layers tab.

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

The model is a thin view over the canvas's live layer list + each layer's IFeatureRenderer::legendSymbolItems(). It does not own state; per-class colour edits write through to the renderer via SetRendererClassColorCommand on the canvas's MapUndoStack, and the model resets in response to the layer's repaintRequested signal so external edits show up live.

Columns: Col 0 — "Item" (layer name at level 0, item label at level 1) Col 1 — "Color" (swatch + opens QColorDialog when editable)

Layer-header rows are not editable. Item rows are editable in the Color column iff the parent layer's renderer reports supportsClassEdit(Color).