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

Slice BB Phase 8.6.11 / 8.6.16 — dockable legend / per-class style editor panel. More...

#include <QDockWidget>
#include <QPointer>
#include "map/mapcanvas.h"
Include dependency graph for legenddock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmmvis::ui::LegendDock
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::ui
 

Detailed Description

Slice BB Phase 8.6.11 / 8.6.16 — dockable legend / per-class style editor panel.

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

LegendDock hosts a QTreeView over LegendLayerTreeModel showing every visible layer's legend rows in a Layer → Item hierarchy. The Color column is click-to-edit via LegendColorDelegate; each edit pushes a SetRendererClassColorCommand onto the canvas's MapUndoStack so Ctrl+Z reverses uniformly across the dock, the on-canvas legend overlay, and the canvas itself.

The dock binds to a MapCanvas via setCanvas(); pass nullptr to unbind. It survives MDI tab switches the same way LegendOverlay::setCanvas does.