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

Slice BB-α — QComboBox that previews built-in + custom colour ramps as horizontal gradient swatches in the dropdown. More...

#include "render/colorramp.h"
#include <QComboBox>
Include dependency graph for colorrampcombobox.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ColorRampComboBox
 

Detailed Description

Slice BB-α — QComboBox that previews built-in + custom colour ramps as horizontal gradient swatches in the dropdown.

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

Mirrors the QGIS / ArcGIS Pro idiom: each row shows the actual gradient (not just a name) so the user picks visually. The trailing "Edit Custom Ramp…" row opens the existing ColorRampEditorDialog (WIP carved 2026-05-22) to author a new ramp; on OK the ramp is appended to the user's custom-ramp library (PreferencesManager → Rendering/CustomRamps) and selected.

Consumers wire it like any QComboBox: connect(combo, &ColorRampComboBox::rampChanged, layer, [](const RasterColorRamp &r){ layer->setColorRamp(r); });

Cross-slice: GUI_IMPLEMENTATION_PLAN.md §L.BB-α Phase BB-α.2.