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
openswmmvis::ui::CursorWindowSlider Class Reference

#include <cursorwindowslider.h>

Inheritance diagram for openswmmvis::ui::CursorWindowSlider:
Collaboration diagram for openswmmvis::ui::CursorWindowSlider:

Public Slots

void setCursorNorm (qreal v)
 Set the cursor position (clamped to [0..1]). Emits cursorChanged only when the value actually moves. Callers updating the slider from controller state should wrap this in a QSignalBlocker (as the toolbar does) so the programmatic update does not echo back as a seek.
 
void setWindowNorm (qreal w)
 Set the look-back window width as a fraction of the full timeline (clamped to [0..1]). Repaints the band, drawn from max(0, cursor - windowNorm) to cursor. Emits windowNormChanged.
 

Signals

void cursorChanged (qreal cursorNorm)
 Emitted when the cursor moves (user drag / track click, or a programmatic setCursorNorm that actually changed the value).
 
void cursorReleased (qreal cursorNorm)
 2026-07-19 — emitted once when a scrub gesture ends (mouse release after a drag / click, or a keyboard nudge). Lets the host coalesce the per-pixel cursorChanged stream during the gesture and still land exactly on the final position: the toolbar restarts a short single-shot timer on every cursorChanged and seeks immediately (timer stopped) on cursorReleased.
 
void windowNormChanged (qreal windowNorm)
 Emitted when the window band width changes.
 

Public Member Functions

 CursorWindowSlider (QWidget *parent=nullptr)
 
qreal cursorNorm () const noexcept
 
qreal windowNorm () const noexcept
 
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 

Protected Member Functions

void paintEvent (QPaintEvent *e) override
 
void mousePressEvent (QMouseEvent *e) override
 
void mouseMoveEvent (QMouseEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 
void keyPressEvent (QKeyEvent *e) override
 

Properties

qreal cursorNorm
 
qreal windowNorm
 

Constructor & Destructor Documentation

◆ CursorWindowSlider()

openswmmvis::ui::CursorWindowSlider::CursorWindowSlider ( QWidget *  parent = nullptr)
explicit

Member Function Documentation

◆ cursorChanged

void openswmmvis::ui::CursorWindowSlider::cursorChanged ( qreal  cursorNorm)
signal

Emitted when the cursor moves (user drag / track click, or a programmatic setCursorNorm that actually changed the value).

Here is the caller graph for this function:

◆ cursorNorm()

qreal openswmmvis::ui::CursorWindowSlider::cursorNorm ( ) const
inlinenoexcept

◆ cursorReleased

void openswmmvis::ui::CursorWindowSlider::cursorReleased ( qreal  cursorNorm)
signal

2026-07-19 — emitted once when a scrub gesture ends (mouse release after a drag / click, or a keyboard nudge). Lets the host coalesce the per-pixel cursorChanged stream during the gesture and still land exactly on the final position: the toolbar restarts a short single-shot timer on every cursorChanged and seeks immediately (timer stopped) on cursorReleased.

Here is the caller graph for this function:

◆ keyPressEvent()

void openswmmvis::ui::CursorWindowSlider::keyPressEvent ( QKeyEvent *  e)
overrideprotected
Here is the call graph for this function:

◆ minimumSizeHint()

QSize openswmmvis::ui::CursorWindowSlider::minimumSizeHint ( ) const
inlineoverride

◆ mouseMoveEvent()

void openswmmvis::ui::CursorWindowSlider::mouseMoveEvent ( QMouseEvent *  e)
overrideprotected
Here is the call graph for this function:

◆ mousePressEvent()

void openswmmvis::ui::CursorWindowSlider::mousePressEvent ( QMouseEvent *  e)
overrideprotected
Here is the call graph for this function:

◆ mouseReleaseEvent()

void openswmmvis::ui::CursorWindowSlider::mouseReleaseEvent ( QMouseEvent *  e)
overrideprotected
Here is the call graph for this function:

◆ paintEvent()

void openswmmvis::ui::CursorWindowSlider::paintEvent ( QPaintEvent *  e)
overrideprotected

◆ setCursorNorm

void openswmmvis::ui::CursorWindowSlider::setCursorNorm ( qreal  v)
slot

Set the cursor position (clamped to [0..1]). Emits cursorChanged only when the value actually moves. Callers updating the slider from controller state should wrap this in a QSignalBlocker (as the toolbar does) so the programmatic update does not echo back as a seek.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWindowNorm

void openswmmvis::ui::CursorWindowSlider::setWindowNorm ( qreal  w)
slot

Set the look-back window width as a fraction of the full timeline (clamped to [0..1]). Repaints the band, drawn from max(0, cursor - windowNorm) to cursor. Emits windowNormChanged.

Here is the call graph for this function:

◆ sizeHint()

QSize openswmmvis::ui::CursorWindowSlider::sizeHint ( ) const
inlineoverride

◆ windowNorm()

qreal openswmmvis::ui::CursorWindowSlider::windowNorm ( ) const
inlinenoexcept

◆ windowNormChanged

void openswmmvis::ui::CursorWindowSlider::windowNormChanged ( qreal  windowNorm)
signal

Emitted when the window band width changes.

Here is the caller graph for this function:

Property Documentation

◆ cursorNorm

qreal openswmmvis::ui::CursorWindowSlider::cursorNorm
readwrite

◆ windowNorm

qreal openswmmvis::ui::CursorWindowSlider::windowNorm
readwrite

The documentation for this class was generated from the following files: