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

Slice AT.3 — two-thumb horizontal range slider widget. More...

#include <QWidget>
Include dependency graph for rangeslider.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmmvis::ui::RangeSliderWidget
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::ui
 

Detailed Description

Slice AT.3 — two-thumb horizontal range slider widget.

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

Qt ships QSlider (single thumb) but no built-in two-thumb range slider. RangeSliderWidget fills the gap with a minimal QWidget that paints a track, a highlighted selected range, and two draggable thumbs. Values are normalised to [0..1]; the host (ComparisonPlotDialog) maps that to a QDateTime time range and applies it to row 0's xAxis (the existing linked-X-axis sync propagates to other rows).

Interaction:

  • Drag the lo thumb (left) → narrows the start of the range.
  • Drag the hi thumb (right) → narrows the end.
  • Drag inside the selected band → shift the whole range without changing its width (the "both thumbs together" gesture).

Constraint: lo ≤ hi is always preserved; thumbs can touch but cannot cross.