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

Custom colour-ramp editor (redesigned 2026-08). More...

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

Go to the source code of this file.

Classes

class  openswmmvis::ui::ColorRampEditorDialog
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::ui
 

Detailed Description

Custom colour-ramp editor (redesigned 2026-08).

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

Authors a stand-alone RasterColorRamp for the user's custom-ramp library (PreferencesManager → Rendering/CustomRamps). Layout: ┌─ Name: [ ] (overwrite warning when it collides) ────┐ ├─ Preset ▾ (all builtins) Interpolation ▾ [Reverse] ─┤ ├─ [ live gradient preview — repaints on edit and resize ] ─┤ ├─ Stop table: Position | Colour (+ Add / Remove stop) ─┤ ├─ Saved custom ramps: ▾ [Load] [Delete] ─┤ └─ OK / Cancel (OK disabled until named and ≥ 2 stops) ─┘

Unlike the previous incarnation, stop POSITIONS are genuinely editable (the old dialog only recoloured evenly spaced samples), presets cover the full builtin catalogue via RasterColorRamp::builtinNames(), naming happens in-dialog (no follow-up QInputDialog), and custom ramps can be deleted (first caller of PreferencesManager::removeCustomColorRamp). The caller reads the result via ramp() / rampName() on accept and does its own saveCustomColorRamp — the dialog persists nothing on OK.