TimeRulerWidget – a thin horizontal time axis ruler for ChannelDataView.
More...
#include <timerulerwidget.h>
TimeRulerWidget – a thin horizontal time axis ruler for ChannelDataView.
Displays time ticks and labels beneath the signal viewport. Auto-computes a "nice" tick interval so approximately 7 major ticks are visible regardless of zoom level. Labels show elapsed seconds from the start of the file or, for longer ranges, a MM:SS clock format.
The ruler is driven by two Q_PROPERTY-compatible slots that mirror the ChannelRhiView properties:
Definition at line 95 of file timerulerwidget.h.
◆ TimeRulerWidget()
| TimeRulerWidget::TimeRulerWidget |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
◆ addReferenceMarkerRequested
| void DISPLIB::TimeRulerWidget::addReferenceMarkerRequested |
( |
int | sample | ) |
|
|
signal |
Emitted when the user requests a new sample marker from the ruler context menu.
◆ clearReferenceMarkersRequested
| void DISPLIB::TimeRulerWidget::clearReferenceMarkersRequested |
( |
| ) |
|
|
signal |
Emitted when the user requests that all sample markers be cleared.
◆ clockTimeFormat()
| bool DISPLIB::TimeRulerWidget::clockTimeFormat |
( |
| ) |
const |
|
inline |
◆ contextMenuEvent()
| void TimeRulerWidget::contextMenuEvent |
( |
QContextMenuEvent * | event | ) |
|
|
overrideprotected |
◆ minimumSizeHint()
| QSize DISPLIB::TimeRulerWidget::minimumSizeHint |
( |
| ) |
const |
|
inlineoverride |
◆ paintEvent()
| void TimeRulerWidget::paintEvent |
( |
QPaintEvent * | event | ) |
|
|
overrideprotected |
◆ removeReferenceMarkerRequested
| void DISPLIB::TimeRulerWidget::removeReferenceMarkerRequested |
( |
int | sample | ) |
|
|
signal |
Emitted when the user requests removal of the nearest sample marker from the ruler context menu.
◆ setClockTimeFormat()
| void TimeRulerWidget::setClockTimeFormat |
( |
bool | useClock | ) |
|
Set whether to use clock time (HH:MM:SS) or float seconds for labels.
- Parameters
-
| [in] | useClock | true = HH:MM:SS, false = float seconds. |
Definition at line 178 of file timerulerwidget.cpp.
◆ setEvents()
Set the list of stimulus / event marks to display in the stim lane. Pass an empty vector to clear all marks.
- Parameters
-
| [in] | events | Event marks (sample position + colour + label). |
Definition at line 102 of file timerulerwidget.cpp.
◆ setFirstFileSample()
| void TimeRulerWidget::setFirstFileSample |
( |
int | firstFileSample | ) |
|
Set the absolute sample index of the left viewport edge (file-relative). Also records the file's first sample so labels show elapsed time.
- Parameters
-
| [in] | firstFileSample | The absolute sample index of the first sample in the file. |
Definition at line 94 of file timerulerwidget.cpp.
◆ setReferenceMarkers()
Set the list of persistent sample markers to display in the ruler.
- Parameters
-
| [in] | markers | Reference/sample markers. |
Definition at line 110 of file timerulerwidget.cpp.
◆ setSamplesPerPixel
| void TimeRulerWidget::setSamplesPerPixel |
( |
float | spp | ) |
|
|
slot |
Update the horizontal zoom and trigger a repaint.
- Parameters
-
| [in] | spp | Samples per pixel. |
Definition at line 128 of file timerulerwidget.cpp.
◆ setScrollSample
| void TimeRulerWidget::setScrollSample |
( |
float | sample | ) |
|
|
slot |
Update the left-edge scroll position and trigger a repaint.
- Parameters
-
| [in] | sample | Absolute sample index at the left edge of the view. |
Definition at line 118 of file timerulerwidget.cpp.
◆ setSfreq()
| void TimeRulerWidget::setSfreq |
( |
double | sfreq | ) |
|
Set the file sampling frequency. Must be called before the first paint.
- Parameters
-
| [in] | sfreq | Sampling frequency in Hz. |
Definition at line 86 of file timerulerwidget.cpp.
◆ sizeHint()
| QSize DISPLIB::TimeRulerWidget::sizeHint |
( |
| ) |
const |
|
inlineoverride |
◆ toggleTimeFormat()
| void TimeRulerWidget::toggleTimeFormat |
( |
| ) |
|
Toggle the time format between float seconds and HH:MM:SS clock time.
Definition at line 170 of file timerulerwidget.cpp.
◆ kStimZoneH
| int DISPLIB::TimeRulerWidget::kStimZoneH = 16 |
|
staticconstexpr |
◆ kTimeZoneH
| int DISPLIB::TimeRulerWidget::kTimeZoneH = 28 |
|
staticconstexpr |
◆ kTotalH
The documentation for this class was generated from the following files: