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

Vertical column of channel-name labels synced with ChannelDataView row geometry. 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

Vertical column of channel-name labels synced with ChannelDataView row geometry.

Listens to the same ChannelDataModel as the central data view; bad channels are greyed and label clicks emit channel selection signals.

Definition at line 56 of file channellabelpanel.h.

Inheritance diagram for DISPLIB::ChannelLabelPanel:
Inheritance graph

Constructor & Destructor Documentation

◆ ChannelLabelPanel()

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

Definition at line 54 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 457 of file channellabelpanel.cpp.

◆ minimumSizeHint()

QSize ChannelLabelPanel::minimumSizeHint ( ) const
override

Definition at line 72 of file channellabelpanel.cpp.

◆ mouseMoveEvent()

void ChannelLabelPanel::mouseMoveEvent ( QMouseEvent * event)
overrideprotected

Definition at line 359 of file channellabelpanel.cpp.

◆ mousePressEvent()

void ChannelLabelPanel::mousePressEvent ( QMouseEvent * event)
overrideprotected

Definition at line 346 of file channellabelpanel.cpp.

◆ mouseReleaseEvent()

void ChannelLabelPanel::mouseReleaseEvent ( QMouseEvent * event)
overrideprotected

Definition at line 392 of file channellabelpanel.cpp.

◆ paintEvent()

void ChannelLabelPanel::paintEvent ( QPaintEvent * event)
overrideprotected

Definition at line 144 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 125 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 87 of file channellabelpanel.cpp.

◆ setFirstVisibleChannel()

void ChannelLabelPanel::setFirstVisibleChannel ( int ch)

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

Parameters
[in]chIndex of the first visible row in the displayed channel list.

Definition at line 95 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.

Parameters
[in]hideTrue to hide bad-channel rows.

Definition at line 115 of file channellabelpanel.cpp.

◆ setModel()

void ChannelLabelPanel::setModel ( ChannelDataModel * model)

Definition at line 79 of file channellabelpanel.cpp.

◆ setVisibleChannelCount()

void ChannelLabelPanel::setVisibleChannelCount ( int count)

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

Parameters
[in]countNumber of simultaneously visible channel rows.

Definition at line 105 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 135 of file channellabelpanel.cpp.

◆ sizeHint()

QSize ChannelLabelPanel::sizeHint ( ) const
override

Definition at line 65 of file channellabelpanel.cpp.


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