QRhi-based GPU-accelerated channel time-series renderer used by the modern raw browser.
More...
#include <channelrhiview.h>
QRhi-based GPU-accelerated channel time-series renderer used by the modern raw browser.
Manages its own pipeline, samplers, resource bindings and a small CrosshairOverlay for the time / amplitude cursor; exposes callbacks for the host ChannelDataView to push samples, change scaling or update the visible window.
Definition at line 78 of file channelrhiview.h.
◆ ChannelRhiView()
| ChannelRhiView::ChannelRhiView |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
◆ ~ChannelRhiView()
| ChannelRhiView::~ChannelRhiView |
( |
| ) |
|
|
overridedefault |
◆ annotationBoundaryMoved
| void DISPLIB::ChannelRhiView::annotationBoundaryMoved |
( |
int | annotationIndex, |
|
|
bool | isStartBoundary, |
|
|
int | newSample ) |
|
signal |
Emitted when the user finishes dragging an annotation boundary.
- Parameters
-
| [in] | annotationIndex | Index in the annotation span list. |
| [in] | isStartBoundary | True if the start boundary was dragged. |
| [in] | newSample | New absolute sample position of the boundary. |
◆ annotationSelecting()
| bool DISPLIB::ChannelRhiView::annotationSelecting |
( |
| ) |
const |
|
inlineprotected |
◆ annotationsVisible()
| bool ChannelRhiView::annotationsVisible |
( |
| ) |
const |
◆ backgroundColor()
| QColor DISPLIB::ChannelRhiView::backgroundColor |
( |
| ) |
const |
|
inline |
◆ butterflyMode()
| bool DISPLIB::ChannelRhiView::butterflyMode |
( |
| ) |
const |
|
inline |
◆ channelOffsetChanged
| void DISPLIB::ChannelRhiView::channelOffsetChanged |
( |
int | firstChannel | ) |
|
|
signal |
Emitted whenever the first visible channel index changes.
◆ clippingVisible()
| bool DISPLIB::ChannelRhiView::clippingVisible |
( |
| ) |
const |
|
inline |
◆ clockTimeFormat()
| bool DISPLIB::ChannelRhiView::clockTimeFormat |
( |
| ) |
const |
|
inline |
◆ crosshairEnabled()
| bool DISPLIB::ChannelRhiView::crosshairEnabled |
( |
| ) |
const |
|
inline |
◆ cursorDataChanged
| void DISPLIB::ChannelRhiView::cursorDataChanged |
( |
float | timeSec, |
|
|
float | amplitude, |
|
|
const QString & | channelName, |
|
|
const QString & | unitLabel ) |
|
signal |
Emitted continuously when the crosshair is active and the mouse moves.
- Parameters
-
| [in] | timeSec | Time at cursor in seconds relative to file start. |
| [in] | amplitude | Raw amplitude value under the cursor in physical units. |
| [in] | channelName | Name of the channel under the cursor. |
| [in] | unitLabel | Short unit label ("T", "V", "AU", …). |
◆ drawAnnotationSelectionOverlay()
| void ChannelRhiView::drawAnnotationSelectionOverlay |
( |
QPainter & | p | ) |
|
|
protected |
◆ drawCrosshair()
| void ChannelRhiView::drawCrosshair |
( |
QPainter & | p | ) |
|
|
protected |
◆ drawRulerOverlay()
| void ChannelRhiView::drawRulerOverlay |
( |
QPainter & | p | ) |
|
|
protected |
◆ drawScalebars()
| void ChannelRhiView::drawScalebars |
( |
QPainter & | p | ) |
|
|
protected |
◆ emitCursorData()
| void ChannelRhiView::emitCursorData |
( |
| ) |
|
|
protected |
◆ epochMarkersVisible()
| bool DISPLIB::ChannelRhiView::epochMarkersVisible |
( |
| ) |
const |
|
inline |
◆ eventsVisible()
| bool ChannelRhiView::eventsVisible |
( |
| ) |
const |
◆ firstVisibleChannel()
| int DISPLIB::ChannelRhiView::firstVisibleChannel |
( |
| ) |
const |
|
inline |
◆ gridVisible()
| bool DISPLIB::ChannelRhiView::gridVisible |
( |
| ) |
const |
|
inline |
◆ hideBadChannels()
| bool DISPLIB::ChannelRhiView::hideBadChannels |
( |
| ) |
const |
|
inline |
◆ initialize()
| void ChannelRhiView::initialize |
( |
QRhiCommandBuffer * | cb | ) |
|
|
overrideprotected |
◆ isFrozen()
| bool DISPLIB::ChannelRhiView::isFrozen |
( |
| ) |
const |
|
inline |
◆ lastFileSample()
| int DISPLIB::ChannelRhiView::lastFileSample |
( |
| ) |
const |
|
inline |
◆ mouseDoubleClickEvent()
| void ChannelRhiView::mouseDoubleClickEvent |
( |
QMouseEvent * | event | ) |
|
|
overrideprotected |
◆ mouseMoveEvent()
| void ChannelRhiView::mouseMoveEvent |
( |
QMouseEvent * | event | ) |
|
|
overrideprotected |
◆ mousePressEvent()
| void ChannelRhiView::mousePressEvent |
( |
QMouseEvent * | event | ) |
|
|
overrideprotected |
◆ mouseReleaseEvent()
| void ChannelRhiView::mouseReleaseEvent |
( |
QMouseEvent * | event | ) |
|
|
overrideprotected |
◆ paintEvent()
| void ChannelRhiView::paintEvent |
( |
QPaintEvent * | event | ) |
|
|
overrideprotected |
◆ releaseResources()
| void ChannelRhiView::releaseResources |
( |
| ) |
|
|
overrideprotected |
◆ render()
| void ChannelRhiView::render |
( |
QRhiCommandBuffer * | cb | ) |
|
|
overrideprotected |
◆ resizeEvent()
| void ChannelRhiView::resizeEvent |
( |
QResizeEvent * | event | ) |
|
|
overrideprotected |
◆ rulerActive()
| bool DISPLIB::ChannelRhiView::rulerActive |
( |
| ) |
const |
|
inlineprotected |
◆ sampleClicked
| void DISPLIB::ChannelRhiView::sampleClicked |
( |
int | sample | ) |
|
|
signal |
Emitted whenever the user clicks; provides the sample index under the cursor.
◆ sampleRangeSelected
| void DISPLIB::ChannelRhiView::sampleRangeSelected |
( |
int | startSample, |
|
|
int | endSample ) |
|
signal |
Emitted when the user selects a time span with Shift+drag in annotation mode.
◆ samplesPerPixel()
| float DISPLIB::ChannelRhiView::samplesPerPixel |
( |
| ) |
const |
|
inline |
◆ samplesPerPixelChanged
| void DISPLIB::ChannelRhiView::samplesPerPixelChanged |
( |
float | spp | ) |
|
|
signal |
◆ scalebarsVisible()
| bool DISPLIB::ChannelRhiView::scalebarsVisible |
( |
| ) |
const |
|
inline |
◆ scrollSample()
| float DISPLIB::ChannelRhiView::scrollSample |
( |
| ) |
const |
|
inline |
◆ scrollSampleChanged
| void DISPLIB::ChannelRhiView::scrollSampleChanged |
( |
float | sample | ) |
|
|
signal |
◆ scrollSpeedFactor()
| float DISPLIB::ChannelRhiView::scrollSpeedFactor |
( |
| ) |
const |
|
inline |
◆ scrollTo()
| void ChannelRhiView::scrollTo |
( |
float | targetSample, |
|
|
int | durationMs = 200 ) |
Smoothly animate the scroll position.
- Parameters
-
| [in] | targetSample | Target left-edge sample index. |
| [in] | durationMs | Animation duration in milliseconds (0 = instant). |
Definition at line 309 of file channelrhiview.cpp.
◆ setAnnotations()
| void ChannelRhiView::setAnnotations |
( |
const QVector< AnnotationSpan > & | annotations | ) |
|
Set the list of time-span annotations to overlay on the traces.
- Parameters
-
Definition at line 707 of file channelrhiview.cpp.
◆ setAnnotationSelectionEnabled()
| void ChannelRhiView::setAnnotationSelectionEnabled |
( |
bool | enabled | ) |
|
Enable or disable annotation range selection. When enabled, Shift+drag emits sampleRangeSelected on mouse release instead of acting as a pure measurement tool.
Definition at line 717 of file channelrhiview.cpp.
◆ setAnnotationsVisible()
| void ChannelRhiView::setAnnotationsVisible |
( |
bool | visible | ) |
|
◆ setBackgroundColor()
| void ChannelRhiView::setBackgroundColor |
( |
const QColor & | color | ) |
|
Background colour of the render surface.
- Parameters
-
| [in] | color | The new background colour. |
Definition at line 342 of file channelrhiview.cpp.
◆ setButterflyMode()
| void ChannelRhiView::setButterflyMode |
( |
bool | enabled | ) |
|
Toggle butterfly mode: all channels of the same type are overlaid in a single lane.
Definition at line 515 of file channelrhiview.cpp.
◆ setChannelIndices()
| void ChannelRhiView::setChannelIndices |
( |
const QVector< int > & | indices | ) |
|
Restrict rendering to a specific subset of channel indices. When indices is empty all channels in the model are shown (no filter). When set, scrolling and visible-channel-count are relative to this subset.
- Parameters
-
| [in] | indices | Ordered list of model channel indices to display. Pass an empty vector to clear the filter. |
Definition at line 578 of file channelrhiview.cpp.
◆ setClippingVisible()
| void ChannelRhiView::setClippingVisible |
( |
bool | visible | ) |
|
◆ setClockTimeFormat()
| void DISPLIB::ChannelRhiView::setClockTimeFormat |
( |
bool | useClock | ) |
|
|
inline |
Set whether the crosshair label uses clock time (mm:ss.ms) or seconds.
Definition at line 350 of file channelrhiview.h.
◆ setCrosshairEnabled()
| void ChannelRhiView::setCrosshairEnabled |
( |
bool | enabled | ) |
|
Enable or disable the crosshair cursor overlay. When enabled, a vertical + horizontal cross follows the mouse and the view continuously emits cursorDataChanged() with the time/amplitude under the cursor.
Definition at line 489 of file channelrhiview.cpp.
◆ setEpochMarkers()
| void ChannelRhiView::setEpochMarkers |
( |
const QVector< int > & | triggerSamples | ) |
|
◆ setEpochMarkersVisible()
| void ChannelRhiView::setEpochMarkersVisible |
( |
bool | visible | ) |
|
◆ setEvents()
| void ChannelRhiView::setEvents |
( |
const QVector< EventMarker > & | events | ) |
|
Set the list of stimulus / event markers to overlay on the traces. Each marker is drawn as a coloured vertical line spanning all channel rows, with a small colour-coded label chip at the bottom of the view. Pass an empty vector to clear all markers.
- Parameters
-
Definition at line 652 of file channelrhiview.cpp.
◆ setEventsVisible()
| void ChannelRhiView::setEventsVisible |
( |
bool | visible | ) |
|
◆ setFirstFileSample()
| void ChannelRhiView::setFirstFileSample |
( |
int | first | ) |
|
Set the absolute sample index of the first sample in the file. Used to align grid tick lines with the time ruler labels.
- Parameters
-
| [in] | first | Absolute sample index of the file's first sample. |
Definition at line 436 of file channelrhiview.cpp.
◆ setFirstVisibleChannel()
| void ChannelRhiView::setFirstVisibleChannel |
( |
int | ch | ) |
|
Set the index of the first visible channel row.
- Parameters
-
| [in] | ch | Zero-based channel index (within the active filter if any). |
Definition at line 373 of file channelrhiview.cpp.
◆ setFrozen()
| void ChannelRhiView::setFrozen |
( |
bool | frozen | ) |
|
Freeze or unfreeze drag-panning (mouse drag and inertia). Wheel scroll and the scrollbar remain active when frozen.
Definition at line 403 of file channelrhiview.cpp.
◆ setGridVisible()
| void ChannelRhiView::setGridVisible |
( |
bool | visible | ) |
|
◆ setHideBadChannels()
| void ChannelRhiView::setHideBadChannels |
( |
bool | hide | ) |
|
Show or hide waveform traces of channels marked bad. When hide is true bad channels are removed from the logical channel list used for scrolling and rendering so the trace lanes collapse upward in sync with the label panel.
- Parameters
-
| [in] | hide | true = remove bad channels from the visible trace list. |
Definition at line 455 of file channelrhiview.cpp.
◆ setLastFileSample()
| void ChannelRhiView::setLastFileSample |
( |
int | last | ) |
|
Set the absolute sample index of the last sample in the file. Used to clamp scrolling so mouse pan cannot exceed the file end. Pass -1 (default) for unlimited.
- Parameters
-
| [in] | last | Absolute sample index of the file's last sample. |
Definition at line 448 of file channelrhiview.cpp.
◆ setModel()
Attach the data model. The view does NOT take ownership.
- Parameters
-
| [in] | model | The channel data model to render. |
Definition at line 210 of file channelrhiview.cpp.
◆ setPrefetchFactor()
| void ChannelRhiView::setPrefetchFactor |
( |
float | factor | ) |
|
How many samples to prefetch beyond the visible window on each side (in multiples of the visible window). Default = 1.0.
- Parameters
-
| [in] | factor | Prefetch factor. |
Definition at line 352 of file channelrhiview.cpp.
◆ setSamplesPerPixel()
| void ChannelRhiView::setSamplesPerPixel |
( |
float | spp | ) |
|
Set the horizontal zoom (samples per screen pixel). Triggers a VBO rebuild with new decimation.
- Parameters
-
| [in] | spp | Samples per pixel (> 1 = zoomed out, < 1 = zoomed in). |
Definition at line 294 of file channelrhiview.cpp.
◆ setScalebarsVisible()
| void ChannelRhiView::setScalebarsVisible |
( |
bool | visible | ) |
|
Show or hide per-channel-type scalebars in the bottom-right corner.
Definition at line 505 of file channelrhiview.cpp.
◆ setScrollSample()
| void ChannelRhiView::setScrollSample |
( |
float | sample | ) |
|
Set the left-edge scroll position. Updates only the GPU uniform — no VBO rebuild unless the prefetch window is exhausted.
- Parameters
-
| [in] | sample | Absolute sample index for the left viewport edge. |
Definition at line 239 of file channelrhiview.cpp.
◆ setScrollSpeedFactor()
| void ChannelRhiView::setScrollSpeedFactor |
( |
float | factor | ) |
|
◆ setSfreq()
| void ChannelRhiView::setSfreq |
( |
float | sfreq | ) |
|
◆ setVisibleChannelCount()
| void ChannelRhiView::setVisibleChannelCount |
( |
int | count | ) |
|
Set how many channel rows are displayed simultaneously.
- Parameters
-
| [in] | count | Number of channels to show (clamped to 1–model count). |
Definition at line 389 of file channelrhiview.cpp.
◆ setWheelScrollsChannels()
| void ChannelRhiView::setWheelScrollsChannels |
( |
bool | channelsMode | ) |
|
Control what the vertical mouse wheel scrolls. When channelsMode is true the vertical wheel scrolls through channels. When false the vertical wheel scrolls through time (same as horizontal).
- Parameters
-
| [in] | channelsMode | true = vertical wheel → channels, false → time. |
Definition at line 475 of file channelrhiview.cpp.
◆ setZScoreMode()
| void ChannelRhiView::setZScoreMode |
( |
bool | enabled | ) |
|
◆ totalLogicalChannels()
| int ChannelRhiView::totalLogicalChannels |
( |
| ) |
const |
Total number of logical channels available for scrolling (respects active filter).
Definition at line 596 of file channelrhiview.cpp.
◆ viewResized
| void DISPLIB::ChannelRhiView::viewResized |
( |
int | newWidth, |
|
|
int | newHeight ) |
|
signal |
◆ visibleChannelCount()
| int DISPLIB::ChannelRhiView::visibleChannelCount |
( |
| ) |
const |
|
inline |
◆ visibleFirstSample()
| int ChannelRhiView::visibleFirstSample |
( |
| ) |
const |
Returns the absolute sample index currently shown at x = 0 (left edge). (Same as scrollSample rounded to int.)
Definition at line 359 of file channelrhiview.cpp.
◆ visibleSampleCount()
| int ChannelRhiView::visibleSampleCount |
( |
| ) |
const |
◆ wheelEvent()
| void ChannelRhiView::wheelEvent |
( |
QWheelEvent * | event | ) |
|
|
overrideprotected |
◆ wheelScrollsChannels()
| bool DISPLIB::ChannelRhiView::wheelScrollsChannels |
( |
| ) |
const |
|
inline |
◆ zoomTo()
| void ChannelRhiView::zoomTo |
( |
float | targetSpp, |
|
|
int | durationMs = 200 ) |
Smoothly animate the zoom level.
- Parameters
-
| [in] | targetSpp | Target samples-per-pixel. |
| [in] | durationMs | Animation duration in milliseconds (0 = instant). |
Definition at line 325 of file channelrhiview.cpp.
◆ zScoreMode()
| bool DISPLIB::ChannelRhiView::zScoreMode |
( |
| ) |
const |
|
inline |
◆ ::CrosshairOverlay
| friend class ::CrosshairOverlay |
|
friend |
◆ samplesPerPixel
| float DISPLIB::ChannelRhiView::samplesPerPixel |
|
readwrite |
◆ scrollSample
| float DISPLIB::ChannelRhiView::scrollSample |
|
readwrite |
The documentation for this class was generated from the following files: