v2.0.0
Loading...
Searching...
No Matches
DISPLIB::ChannelLabelPanel Class Reference

Fixed-width panel showing channel names and metadata, left of the render surface. More...

#include <channellabelpanel.h>

Signals

void channelScrollRequested (int targetFirst)
void channelBadToggled (int channelIndex, bool bad)

Public Member Functions

 ChannelLabelPanel (QWidget *parent=nullptr)
void setModel (ChannelDataModel *model)
void setFirstVisibleChannel (int ch)
void setVisibleChannelCount (int count)
void setChannelIndices (const QVector< int > &indices)
void setHideBadChannels (bool hide)
void setButterflyMode (bool enabled)
void setVisibleSampleRange (int firstSample, int lastSample)
QSize sizeHint () const override
QSize minimumSizeHint () const override

Protected Member Functions

void paintEvent (QPaintEvent *event) override
void mousePressEvent (QMouseEvent *event) override
void mouseMoveEvent (QMouseEvent *event) override
void mouseReleaseEvent (QMouseEvent *event) override
bool event (QEvent *e) override

Detailed Description

Fixed-width panel showing channel names and metadata, left of the render surface.

Repaints one row per visible channel (height / visibleChannelCount pixels each). Each row shows: a type-colour strip, channel name, type abbreviation, and a red "BAD" badge when the channel is flagged bad. Hovering over a row shows a tooltip with full detail.

Vertical drag on the panel scrolls the channel window (emits channelScrollRequested).

Definition at line 76 of file channellabelpanel.h.

Inheritance diagram for DISPLIB::ChannelLabelPanel:
Inheritance graph

Constructor & Destructor Documentation

◆ ChannelLabelPanel()

ChannelLabelPanel::ChannelLabelPanel ( QWidget * parent = nullptr)
explicit

Definition at line 76 of file channellabelpanel.cpp.

Member Function Documentation

◆ channelBadToggled

void DISPLIB::ChannelLabelPanel::channelBadToggled ( int channelIndex,
bool bad )
signal

◆ channelScrollRequested

void DISPLIB::ChannelLabelPanel::channelScrollRequested ( int targetFirst)
signal

Emitted while the user drags vertically on the panel.

Parameters
[in]targetFirstThe desired new first-visible-channel index.

◆ event()

bool ChannelLabelPanel::event ( QEvent * e)
overrideprotected

Definition at line 478 of file channellabelpanel.cpp.

◆ minimumSizeHint()

QSize ChannelLabelPanel::minimumSizeHint ( ) const
override

Definition at line 94 of file channellabelpanel.cpp.

◆ mouseMoveEvent()

void ChannelLabelPanel::mouseMoveEvent ( QMouseEvent * event)
overrideprotected

Definition at line 380 of file channellabelpanel.cpp.

◆ mousePressEvent()

void ChannelLabelPanel::mousePressEvent ( QMouseEvent * event)
overrideprotected

Definition at line 367 of file channellabelpanel.cpp.

◆ mouseReleaseEvent()

void ChannelLabelPanel::mouseReleaseEvent ( QMouseEvent * event)
overrideprotected

Definition at line 413 of file channellabelpanel.cpp.

◆ paintEvent()

void ChannelLabelPanel::paintEvent ( QPaintEvent * event)
overrideprotected

Definition at line 166 of file channellabelpanel.cpp.

◆ setButterflyMode()

void ChannelLabelPanel::setButterflyMode ( bool enabled)

Enable or disable butterfly mode. When active, lanes show type group labels (e.g. "MEG", "EEG") instead of individual channel names.

Parameters
[in]enabledtrue = butterfly mode, false = normal per-channel mode.

Definition at line 147 of file channellabelpanel.cpp.

◆ setChannelIndices()

void ChannelLabelPanel::setChannelIndices ( const QVector< int > & indices)

Restrict the panel to a subset of model channel indices. When indices is empty all model channels are available (no filter). Must be kept in sync with ChannelRhiView::setChannelIndices().

Parameters
[in]indicesOrdered list of model channel indices to display.

Definition at line 109 of file channellabelpanel.cpp.

◆ setFirstVisibleChannel()

void ChannelLabelPanel::setFirstVisibleChannel ( int ch)

Set the index of the first visible channel row (kept in sync with ChannelRhiView).

Definition at line 117 of file channellabelpanel.cpp.

◆ setHideBadChannels()

void ChannelLabelPanel::setHideBadChannels ( bool hide)

Show or hide bad-channel rows. When hide is true, bad channels are removed from the visible row list so the panel stays aligned with the trace view.

Definition at line 137 of file channellabelpanel.cpp.

◆ setModel()

void ChannelLabelPanel::setModel ( ChannelDataModel * model)

Definition at line 101 of file channellabelpanel.cpp.

◆ setVisibleChannelCount()

void ChannelLabelPanel::setVisibleChannelCount ( int count)

Set how many channel rows are simultaneously visible (kept in sync with ChannelRhiView).

Definition at line 127 of file channellabelpanel.cpp.

◆ setVisibleSampleRange()

void ChannelLabelPanel::setVisibleSampleRange ( int firstSample,
int lastSample )

Update the visible sample window used for the per-channel RMS level bar. Call this whenever the horizontal scroll position changes.

Parameters
[in]firstSampleAbsolute first sample in the visible window.
[in]lastSampleAbsolute last sample (exclusive) in the visible window.

Definition at line 157 of file channellabelpanel.cpp.

◆ sizeHint()

QSize ChannelLabelPanel::sizeHint ( ) const
override

Definition at line 87 of file channellabelpanel.cpp.


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