ChannelRhiView – QRhiWidget-based channel signal renderer. More...
#include <channelrhiview.h>
Classes | |
| struct | EventMarker |
| Stimulus / event marker — a coloured vertical line at a given sample. More... | |
| struct | AnnotationSpan |
| Time-span annotation overlay. More... | |
Signals | |
| void | scrollSampleChanged (float sample) |
| void | samplesPerPixelChanged (float spp) |
| void | viewResized (int newWidth, int newHeight) |
| void | channelOffsetChanged (int firstChannel) |
| void | sampleClicked (int sample) |
| void | sampleRangeSelected (int startSample, int endSample) |
| void | annotationBoundaryMoved (int annotationIndex, bool isStartBoundary, int newSample) |
| void | cursorDataChanged (float timeSec, float amplitude, const QString &channelName, const QString &unitLabel) |
Public Member Functions | |
| ChannelRhiView (QWidget *parent=nullptr) | |
| ~ChannelRhiView () override | |
| void | setModel (ChannelDataModel *model) |
| void | setEvents (const QVector< EventMarker > &events) |
| void | setEpochMarkers (const QVector< int > &triggerSamples) |
| void | setEpochMarkersVisible (bool visible) |
| bool | epochMarkersVisible () const |
| void | setClippingVisible (bool visible) |
| bool | clippingVisible () const |
| void | setZScoreMode (bool enabled) |
| bool | zScoreMode () const |
| void | setAnnotations (const QVector< AnnotationSpan > &annotations) |
| void | setAnnotationSelectionEnabled (bool enabled) |
| void | setEventsVisible (bool visible) |
| bool | eventsVisible () const |
| void | setAnnotationsVisible (bool visible) |
| bool | annotationsVisible () const |
| float | scrollSample () const |
| float | samplesPerPixel () const |
| void | setScrollSample (float sample) |
| void | setSamplesPerPixel (float spp) |
| void | scrollTo (float targetSample, int durationMs=200) |
| void | zoomTo (float targetSpp, int durationMs=200) |
| void | setBackgroundColor (const QColor &color) |
| QColor | backgroundColor () const |
| void | setPrefetchFactor (float factor) |
| int | visibleFirstSample () const |
| int | visibleSampleCount () const |
| void | setChannelIndices (const QVector< int > &indices) |
| int | totalLogicalChannels () const |
| void | setFirstVisibleChannel (int ch) |
| int | firstVisibleChannel () const |
| void | setVisibleChannelCount (int count) |
| int | visibleChannelCount () const |
| void | setFrozen (bool frozen) |
| bool | isFrozen () const |
| void | setGridVisible (bool visible) |
| bool | gridVisible () const |
| void | setSfreq (float sfreq) |
| void | setFirstFileSample (int first) |
| void | setLastFileSample (int last) |
| int | lastFileSample () const |
| void | setWheelScrollsChannels (bool channelsMode) |
| bool | wheelScrollsChannels () const |
| void | setScrollSpeedFactor (float factor) |
| float | scrollSpeedFactor () const |
| void | setHideBadChannels (bool hide) |
| bool | hideBadChannels () const |
| void | setCrosshairEnabled (bool enabled) |
| bool | crosshairEnabled () const |
| void | setClockTimeFormat (bool useClock) |
| bool | clockTimeFormat () const |
| void | setScalebarsVisible (bool visible) |
| bool | scalebarsVisible () const |
| void | setButterflyMode (bool enabled) |
| bool | butterflyMode () const |
Protected Member Functions | |
| void | initialize (QRhiCommandBuffer *cb) override |
| void | render (QRhiCommandBuffer *cb) override |
| void | releaseResources () override |
| void | paintEvent (QPaintEvent *event) override |
| void | drawCrosshair (QPainter &p) |
| void | drawScalebars (QPainter &p) |
| void | drawRulerOverlay (QPainter &p) |
| void | drawAnnotationSelectionOverlay (QPainter &p) |
| void | emitCursorData () |
| bool | rulerActive () const |
| bool | annotationSelecting () const |
| void | resizeEvent (QResizeEvent *event) override |
| void | wheelEvent (QWheelEvent *event) override |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| void | mouseDoubleClickEvent (QMouseEvent *event) override |
Properties | |
| float | scrollSample |
| float | samplesPerPixel |
Friends | |
| class | ::CrosshairOverlay |
ChannelRhiView – QRhiWidget-based channel signal renderer.
The raw browser uses QRhiWidget as its only supported rendering backend. It renders channel traces via a custom GLSL pipeline with min/max decimation, while smooth scrolling and zoom animations are driven by Q_PROPERTY so that QPropertyAnimation can be used directly.
Definition at line 92 of file channelrhiview.h.

|
explicit |
Definition at line 160 of file channelrhiview.cpp.
|
overridedefault |
|
signal |
Emitted when the user finishes dragging an annotation boundary.
| [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. |
|
inlineprotected |
Definition at line 444 of file channelrhiview.h.
| bool ChannelRhiView::annotationsVisible | ( | ) | const |
Definition at line 768 of file channelrhiview.cpp.
|
inline |
Definition at line 223 of file channelrhiview.h.
|
inline |
Definition at line 383 of file channelrhiview.h.
|
signal |
Emitted whenever the first visible channel index changes.
|
inline |
Definition at line 149 of file channelrhiview.h.
|
inline |
Definition at line 365 of file channelrhiview.h.
|
inline |
Definition at line 359 of file channelrhiview.h.
|
signal |
Emitted continuously when the crosshair is active and the mouse moves.
| [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", …). |
|
protected |
Definition at line 2384 of file channelrhiview.cpp.
|
protected |
Definition at line 2028 of file channelrhiview.cpp.
|
protected |
Definition at line 2234 of file channelrhiview.cpp.
|
protected |
Definition at line 2154 of file channelrhiview.cpp.
|
protected |
Definition at line 2118 of file channelrhiview.cpp.
|
inline |
Definition at line 146 of file channelrhiview.h.
| bool ChannelRhiView::eventsVisible | ( | ) | const |
Definition at line 755 of file channelrhiview.cpp.
|
inline |
Definition at line 271 of file channelrhiview.h.
|
inline |
Definition at line 295 of file channelrhiview.h.
|
inline |
Definition at line 348 of file channelrhiview.h.
|
overrideprotected |
Definition at line 791 of file channelrhiview.cpp.
|
inline |
Definition at line 288 of file channelrhiview.h.
|
inline |
Definition at line 322 of file channelrhiview.h.
|
overrideprotected |
Definition at line 2801 of file channelrhiview.cpp.
|
overrideprotected |
Definition at line 2557 of file channelrhiview.cpp.
|
overrideprotected |
Definition at line 2476 of file channelrhiview.cpp.
|
overrideprotected |
Definition at line 2689 of file channelrhiview.cpp.
|
overrideprotected |
Definition at line 1591 of file channelrhiview.cpp.
|
overrideprotected |
Definition at line 800 of file channelrhiview.cpp.
|
overrideprotected |
Definition at line 1407 of file channelrhiview.cpp.
|
overrideprotected |
Definition at line 2427 of file channelrhiview.cpp.
|
inlineprotected |
Definition at line 443 of file channelrhiview.h.
|
signal |
Emitted whenever the user clicks; provides the sample index under the cursor.
|
signal |
Emitted when the user selects a time span with Shift+drag in annotation mode.
|
inline |
Definition at line 178 of file channelrhiview.h.
|
signal |
|
inline |
Definition at line 374 of file channelrhiview.h.
|
inline |
Definition at line 177 of file channelrhiview.h.
|
signal |
|
inline |
Definition at line 336 of file channelrhiview.h.
| void ChannelRhiView::scrollTo | ( | float | targetSample, |
| int | durationMs = 200 ) |
Smoothly animate the scroll position.
| [in] | targetSample | Target left-edge sample index. |
| [in] | durationMs | Animation duration in milliseconds (0 = instant). |
Definition at line 331 of file channelrhiview.cpp.
| void ChannelRhiView::setAnnotations | ( | const QVector< AnnotationSpan > & | annotations | ) |
Set the list of time-span annotations to overlay on the traces.
| [in] | annotations | List of AnnotationSpan objects. |
Definition at line 729 of file channelrhiview.cpp.
| 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 739 of file channelrhiview.cpp.
| void ChannelRhiView::setAnnotationsVisible | ( | bool | visible | ) |
Definition at line 759 of file channelrhiview.cpp.
| void ChannelRhiView::setBackgroundColor | ( | const QColor & | color | ) |
Background colour of the render surface.
| [in] | color | The new background colour. |
Definition at line 364 of file channelrhiview.cpp.
| void ChannelRhiView::setButterflyMode | ( | bool | enabled | ) |
Toggle butterfly mode: all channels of the same type are overlaid in a single lane.
Definition at line 537 of file channelrhiview.cpp.
| 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.
| [in] | indices | Ordered list of model channel indices to display. Pass an empty vector to clear the filter. |
Definition at line 600 of file channelrhiview.cpp.
| void ChannelRhiView::setClippingVisible | ( | bool | visible | ) |
Definition at line 706 of file channelrhiview.cpp.
|
inline |
Set whether the crosshair label uses clock time (mm:ss.ms) or seconds.
Definition at line 364 of file channelrhiview.h.
| 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 511 of file channelrhiview.cpp.
| void ChannelRhiView::setEpochMarkers | ( | const QVector< int > & | triggerSamples | ) |
Definition at line 684 of file channelrhiview.cpp.
| void ChannelRhiView::setEpochMarkersVisible | ( | bool | visible | ) |
Definition at line 694 of file channelrhiview.cpp.
| 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.
| [in] | events | List of EventMarker objects. |
Definition at line 674 of file channelrhiview.cpp.
| void ChannelRhiView::setEventsVisible | ( | bool | visible | ) |
Definition at line 746 of file channelrhiview.cpp.
| 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.
| [in] | first | Absolute sample index of the file's first sample. |
Definition at line 458 of file channelrhiview.cpp.
| void ChannelRhiView::setFirstVisibleChannel | ( | int | ch | ) |
Set the index of the first visible channel row.
| [in] | ch | Zero-based channel index (within the active filter if any). |
Definition at line 395 of file channelrhiview.cpp.
| 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 425 of file channelrhiview.cpp.
| void ChannelRhiView::setGridVisible | ( | bool | visible | ) |
Show or hide the time and amplitude grid overlay.
Definition at line 436 of file channelrhiview.cpp.
| 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.
| [in] | hide | true = remove bad channels from the visible trace list. |
Definition at line 477 of file channelrhiview.cpp.
| 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.
| [in] | last | Absolute sample index of the file's last sample. |
Definition at line 470 of file channelrhiview.cpp.
| void ChannelRhiView::setModel | ( | ChannelDataModel * | model | ) |
Attach the data model. The view does NOT take ownership.
| [in] | model | The channel data model to render. |
Definition at line 232 of file channelrhiview.cpp.
| 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.
| [in] | factor | Prefetch factor. |
Definition at line 374 of file channelrhiview.cpp.
| void ChannelRhiView::setSamplesPerPixel | ( | float | spp | ) |
Set the horizontal zoom (samples per screen pixel). Triggers a VBO rebuild with new decimation.
| [in] | spp | Samples per pixel (> 1 = zoomed out, < 1 = zoomed in). |
Definition at line 316 of file channelrhiview.cpp.
| void ChannelRhiView::setScalebarsVisible | ( | bool | visible | ) |
Show or hide per-channel-type scalebars in the bottom-right corner.
Definition at line 527 of file channelrhiview.cpp.
| 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.
| [in] | sample | Absolute sample index for the left viewport edge. |
Definition at line 261 of file channelrhiview.cpp.
| void ChannelRhiView::setScrollSpeedFactor | ( | float | factor | ) |
Definition at line 504 of file channelrhiview.cpp.
| void ChannelRhiView::setSfreq | ( | float | sfreq | ) |
Set the sampling frequency (Hz) used to place time-grid tick lines. Call this from ChannelDataView::init() after FiffInfo is available.
Definition at line 448 of file channelrhiview.cpp.
| void ChannelRhiView::setVisibleChannelCount | ( | int | count | ) |
Set how many channel rows are displayed simultaneously.
| [in] | count | Number of channels to show (clamped to 1–model count). |
Definition at line 411 of file channelrhiview.cpp.
| 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).
| [in] | channelsMode | true = vertical wheel → channels, false → time. |
Definition at line 497 of file channelrhiview.cpp.
| void ChannelRhiView::setZScoreMode | ( | bool | enabled | ) |
Definition at line 717 of file channelrhiview.cpp.
| int ChannelRhiView::totalLogicalChannels | ( | ) | const |
Total number of logical channels available for scrolling (respects active filter).
Definition at line 618 of file channelrhiview.cpp.
|
signal |
|
inline |
Definition at line 280 of file channelrhiview.h.
| 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 381 of file channelrhiview.cpp.
| int ChannelRhiView::visibleSampleCount | ( | ) | const |
Returns the number of samples currently visible.
Definition at line 388 of file channelrhiview.cpp.
|
overrideprotected |
Definition at line 2440 of file channelrhiview.cpp.
|
inline |
Definition at line 333 of file channelrhiview.h.
| void ChannelRhiView::zoomTo | ( | float | targetSpp, |
| int | durationMs = 200 ) |
Smoothly animate the zoom level.
| [in] | targetSpp | Target samples-per-pixel. |
| [in] | durationMs | Animation duration in milliseconds (0 = instant). |
Definition at line 347 of file channelrhiview.cpp.
|
inline |
Definition at line 152 of file channelrhiview.h.
|
friend |
Definition at line 437 of file channelrhiview.h.
|
readwrite |
Definition at line 97 of file channelrhiview.h.
|
readwrite |
Definition at line 96 of file channelrhiview.h.