![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Custom colour-ramp editor (redesigned 2026-08). More...
Go to the source code of this file.
Classes | |
| class | openswmmvis::ui::ColorRampEditorDialog |
Namespaces | |
| namespace | openswmmvis |
| namespace | openswmmvis::ui |
Custom colour-ramp editor (redesigned 2026-08).
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.