Horizontal time-axis ruler displayed beneath ChannelDataView.
More...
#include <timerulerwidget.h>
Horizontal time-axis ruler displayed beneath ChannelDataView.
Tick spacing adapts to the current zoom so labels stay readable from milliseconds to minutes; supports left-click drag for window scrolling and right-click context actions (jump to event, set marker).
Definition at line 74 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 156 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 80 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 72 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 88 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 106 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 96 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 64 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 148 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: