58#include <QResizeEvent>
85 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
89 if (m_useClock == useClock)
return;
90 m_useClock = useClock;
98 p.setRenderHint(QPainter::TextAntialiasing,
true);
102 const int W = width();
105 p.fillRect(QRect(0, 0, W, kTimeH), QColor(245, 245, 247));
108 p.fillRect(QRect(0, kTimeH, W, kStimH), QColor(238, 238, 246));
111 p.setPen(QPen(QColor(190, 190, 205), 1));
112 p.drawLine(0, kTimeH, W - 1, kTimeH);
115 p.setPen(QPen(QColor(185, 185, 195), 1));
116 p.drawLine(W - 1, 0, W - 1, height());
120 tf.setPointSizeF(8.0);
123 p.setPen(QColor(60, 60, 70));
124 p.drawText(QRect(0, 0, W, kTimeH / 2 + 2), Qt::AlignCenter, QStringLiteral(
"Time"));
128 subf.setPointSizeF(6.5);
130 p.setPen(QColor(130, 130, 145));
131 QString fmtLabel = m_useClock ? QStringLiteral(
"mm:ss\u00B7ms")
132 : QStringLiteral(
"seconds");
133 p.drawText(QRect(0, kTimeH / 2, W, kTimeH / 2),
134 Qt::AlignCenter, fmtLabel);
138 sf.setPointSizeF(7.5);
141 p.setPen(QColor(80, 80, 100));
142 p.drawText(QRect(0, kTimeH, W, kStimH), Qt::AlignCenter, QStringLiteral(
"Stim"));
146 bool m_useClock =
false;
157 , m_sSettingsPath(sSettingsPath)
173void ChannelDataView::setupLayout()
175 auto *outerLayout =
new QVBoxLayout(
this);
176 outerLayout->setContentsMargins(0, 0, 0, 0);
177 outerLayout->setSpacing(0);
186 auto *renderRow =
new QHBoxLayout();
187 renderRow->setContentsMargins(0, 0, 0, 0);
188 renderRow->setSpacing(0);
191 auto *leftCol =
new QVBoxLayout();
192 leftCol->setContentsMargins(0, 0, 0, 0);
193 leftCol->setSpacing(0);
197 leftCol->addWidget(m_pRulerHeader, 0);
200 leftCol->addWidget(m_pLabelPanel, 1);
202 renderRow->addLayout(leftCol, 0);
205 auto *traceColumn =
new QVBoxLayout();
206 traceColumn->setContentsMargins(0, 0, 0, 0);
207 traceColumn->setSpacing(0);
210 traceColumn->addWidget(m_pTimeRuler, 0);
213 m_pRhiView->
setModel(m_pModel.data());
215 m_pRhiView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
216 m_pRhiView->setFocusPolicy(Qt::ClickFocus);
217 traceColumn->addWidget(m_pRhiView, 1);
219 renderRow->addLayout(traceColumn, 1);
222 auto *rightCol =
new QVBoxLayout();
223 rightCol->setContentsMargins(0, 0, 0, 0);
224 rightCol->setSpacing(0);
228 auto *rulerSpacer =
new QWidget(
this);
230 rulerSpacer->setVisible(
true);
231 rightCol->addWidget(rulerSpacer, 0);
233 m_pChannelScrollBar =
new QScrollBar(Qt::Vertical,
this);
234 m_pChannelScrollBar->setMinimum(0);
235 m_pChannelScrollBar->setMaximum(0);
236 m_pChannelScrollBar->setValue(0);
237 m_pChannelScrollBar->setSingleStep(1);
238 m_pChannelScrollBar->setPageStep(12);
239 m_pChannelScrollBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
240 rightCol->addWidget(m_pChannelScrollBar, 1);
242 renderRow->addLayout(rightCol, 0);
244 outerLayout->addLayout(renderRow, 1);
248 m_pOverviewBar->
setModel(m_pModel.data());
249 outerLayout->addWidget(m_pOverviewBar, 0);
254 auto *bottomRow =
new QHBoxLayout();
255 bottomRow->setContentsMargins(0, 0, 0, 0);
256 bottomRow->setSpacing(0);
258 m_pScrollBar =
new QScrollBar(Qt::Horizontal,
this);
259 m_pScrollBar->setMinimum(0);
260 m_pScrollBar->setMaximum(0);
261 m_pScrollBar->setValue(0);
262 m_pScrollBar->setSingleStep(1);
263 m_pScrollBar->setPageStep(100);
264 m_pScrollBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
265 bottomRow->addWidget(m_pScrollBar, 1);
267 m_pScrollModeButton =
new QToolButton(
this);
268 m_pScrollModeButton->setCheckable(
true);
269 m_pScrollModeButton->setChecked(
true);
270 m_pScrollModeButton->setText(QStringLiteral(
"\u2195 Ch"));
271 m_pScrollModeButton->setToolTip(QStringLiteral(
272 "Vertical mouse wheel:\n"
273 "\u2195 Ch \u2013 scroll through channels\n"
274 "\u21c4 Time \u2013 scroll through time"));
275 bottomRow->addWidget(m_pScrollModeButton, 0);
277 outerLayout->addLayout(bottomRow, 0);
280 connect(m_pScrollBar, &QScrollBar::valueChanged,
281 this, &ChannelDataView::onScrollBarMoved);
283 connect(m_pChannelScrollBar, &QScrollBar::valueChanged,
284 this, &ChannelDataView::onChannelScrollBarMoved);
287 this, &ChannelDataView::onRhiScrollChanged);
290 this, &ChannelDataView::onChannelOffsetChanged);
298 connect(m_pScrollModeButton, &QToolButton::toggled,
this, [
this](
bool checked) {
301 m_pScrollModeButton->setText(checked ? QStringLiteral(
"\u2195 Ch")
302 : QStringLiteral(
"\u21c4 Time"));
334 this, [
this](
int,
int) { updateSamplesPerPixel(); });
337 this, &ChannelDataView::updateScrollBarRange);
340 this, &ChannelDataView::updateChannelScrollBarRange);
344 m_pLabelPanel, QOverload<>::of(&QWidget::update));
346 m_pLabelPanel, QOverload<>::of(&QWidget::update));
350 this, [
this](
float sample) {
351 if (m_pLabelPanel && m_pRhiView) {
352 m_pLabelPanel->setVisibleSampleRange(
353 static_cast<int>(sample),
354 static_cast<int>(sample) + m_pRhiView->visibleSampleCount());
361 this, [
this](
float sample) {
362 if (m_pOverviewBar && m_pRhiView) {
363 m_pOverviewBar->setViewport(
365 static_cast<float>(m_pRhiView->visibleSampleCount()));
369 this, [
this](
float) {
370 if (m_pOverviewBar && m_pRhiView) {
371 m_pOverviewBar->setViewport(
372 m_pRhiView->scrollSample(),
373 static_cast<float>(m_pRhiView->visibleSampleCount()));
379 if (m_pOverviewBar) {
380 m_pOverviewBar->setModel(m_pModel.data());
385 this, [
this](
float targetSample) {
387 m_pRhiView->scrollTo(targetSample, 150);
390 setFocusProxy(m_pRhiView);
391 setFocusPolicy(Qt::StrongFocus);
399 m_pModel->init(pInfo);
402 if (!m_scaleMap.isEmpty())
403 m_pModel->setScaleMap(m_scaleMap);
404 m_pModel->setSignalColor(m_signalColor);
408 m_pTimeRuler->setSfreq(pInfo->sfreq);
410 m_pRhiView->setSfreq(
static_cast<float>(pInfo->sfreq));
412 m_pOverviewBar->setSfreq(
static_cast<float>(pInfo->sfreq));
416 m_pLabelPanel->setModel(m_pModel.data());
417 m_pLabelPanel->setVisibleChannelCount(m_pRhiView ? m_pRhiView->visibleChannelCount() : 12);
420 updateSamplesPerPixel();
421 updateScrollBarRange();
422 updateChannelScrollBarRange();
429 m_firstFileSample = first;
430 m_lastFileSample = last;
432 m_pRhiView->setFirstFileSample(first);
433 m_pRhiView->setLastFileSample(last);
436 m_pTimeRuler->setFirstFileSample(first);
437 if (m_pOverviewBar) {
438 m_pOverviewBar->setFirstFileSample(first);
439 m_pOverviewBar->setLastFileSample(last);
441 updateScrollBarRange();
448 m_pModel->setData(data, firstSample);
449 updateScrollBarRange();
456 m_pModel->appendData(data);
457 updateScrollBarRange();
464 m_pRhiView->scrollTo(
static_cast<float>(sample), animate ? 200 : 0);
471 m_windowSizeSeconds = qMax(seconds, 0.01f);
472 updateSamplesPerPixel();
480 return m_windowSizeSeconds;
487 m_zoomFactor = qMax(factor, 0.001);
488 updateSamplesPerPixel();
505 m_pRhiView->setBackgroundColor(color);
520 m_signalColor = color;
521 m_pModel->setSignalColor(color);
529 return m_signalColor;
536 m_scaleMap = scaleMap;
537 m_pModel->setScaleMap(scaleMap);
551 m_hideBadChannels = hide;
553 m_pRhiView->setHideBadChannels(hide);
555 m_pLabelPanel->setHideBadChannels(hide);
556 updateChannelScrollBarRange();
563 return m_hideBadChannels;
570 QVector<int> indices;
571 if (!names.isEmpty() && m_pModel) {
572 int total = m_pModel->channelCount();
573 for (
int i = 0; i < total; ++i) {
581 m_pRhiView->setChannelIndices(indices);
583 m_pLabelPanel->setChannelIndices(indices);
586 updateChannelScrollBarRange();
593 m_pModel->setRemoveDC(dc);
600 m_pModel->setDetrendMode(mode);
607 return m_pModel->detrendMode();
615 m_pRhiView->setEvents(events);
618 m_pOverviewBar->setEvents(events);
621 QVector<TimeRulerEventMark> rulerMarks;
622 rulerMarks.reserve(events.size());
623 for (
const auto &ev : events)
624 rulerMarks.append({ev.sample, ev.color, ev.label});
625 m_pTimeRuler->setEvents(rulerMarks);
634 m_pRhiView->setEpochMarkers(triggerSamples);
640 m_pRhiView->setEpochMarkersVisible(visible);
645 return m_pRhiView ? m_pRhiView->epochMarkersVisible() :
false;
651 m_pRhiView->setClippingVisible(visible);
656 return m_pRhiView ? m_pRhiView->clippingVisible() :
false;
662 m_pRhiView->setZScoreMode(enabled);
667 return m_pRhiView ? m_pRhiView->zScoreMode() :
false;
675 m_pTimeRuler->setReferenceMarkers(markers);
683 m_pRhiView->setAnnotations(annotations);
685 m_pOverviewBar->setAnnotations(annotations);
693 m_pRhiView->setAnnotationSelectionEnabled(enabled);
701 m_pRhiView->setEventsVisible(visible);
706 return m_pRhiView ? m_pRhiView->eventsVisible() :
true;
714 m_pRhiView->setAnnotationsVisible(visible);
719 return m_pRhiView ? m_pRhiView->annotationsVisible() :
true;
727 m_pOverviewBar->setVisible(visible);
732 return m_pOverviewBar ? m_pOverviewBar->isVisible() :
true;
740 m_pRhiView->setScrollSpeedFactor(factor);
745 return m_pRhiView ? m_pRhiView->scrollSpeedFactor() : 1.0f;
756 static const QStringList typeOrder = {
757 "MEG grad",
"MEG mag",
"EEG",
"EOG",
"ECG",
"EMG",
"STIM",
"MISC"
760 const int n = m_pModel->channelCount();
761 QVector<int> indices(n);
762 std::iota(indices.begin(), indices.end(), 0);
764 std::stable_sort(indices.begin(), indices.end(), [&](
int a,
int b) {
765 int ia = typeOrder.indexOf(m_pModel->channelInfo(a).typeLabel);
766 int ib = typeOrder.indexOf(m_pModel->channelInfo(b).typeLabel);
767 if (ia < 0) ia = typeOrder.size();
768 if (ib < 0) ib = typeOrder.size();
773 m_pRhiView->setChannelIndices(indices);
775 m_pLabelPanel->setChannelIndices(indices);
776 updateChannelScrollBarRange();
782 m_pRhiView->setChannelIndices({});
784 m_pLabelPanel->setChannelIndices({});
785 updateChannelScrollBarRange();
793 m_pRhiView->setCrosshairEnabled(enabled);
798 return m_pRhiView ? m_pRhiView->crosshairEnabled() :
false;
806 m_pRhiView->setScalebarsVisible(visible);
811 return m_pRhiView ? m_pRhiView->scalebarsVisible() :
false;
819 m_pRhiView->setButterflyMode(enabled);
821 m_pLabelPanel->setButterflyMode(enabled);
826 return m_pRhiView ? m_pRhiView->butterflyMode() :
false;
834 m_pTimeRuler->toggleTimeFormat();
835 bool useClock = m_pTimeRuler ? m_pTimeRuler->clockTimeFormat() :
false;
837 m_pRhiView->setClockTimeFormat(useClock);
847 m_pRhiView->setClockTimeFormat(useClock);
854 return m_pTimeRuler ? m_pTimeRuler->clockTimeFormat() :
false;
861 return m_pRhiView ? m_pRhiView->visibleFirstSample() : 0;
868 return m_pRhiView ? m_pRhiView->visibleSampleCount() : 0;
875 return m_pRhiView ? m_pRhiView->geometry() : QRect();
885 if(viewportRect.width() <= 0) {
886 return viewportRect.left();
889 const double samplesPerPixel =
static_cast<double>(visibleSamples)
890 /
static_cast<double>(viewportRect.width());
891 const double xOffset =
static_cast<double>(sample -
firstVisibleSample()) / samplesPerPixel;
893 return viewportRect.left()
894 + qBound(0, qRound(xOffset), viewportRect.width() - 1);
904 if(viewportRect.width() <= 0) {
908 const int clampedX = qBound(viewportRect.left(), x, viewportRect.right());
909 const double samplesPerPixel =
static_cast<double>(visibleSamples)
910 /
static_cast<double>(viewportRect.width());
913 + qRound(
static_cast<double>(clampedX - viewportRect.left()) * samplesPerPixel);
920 if (m_sSettingsPath.isEmpty())
923 s.setValue(m_sSettingsPath +
"/windowSizeSeconds", m_windowSizeSeconds);
924 s.setValue(m_sSettingsPath +
"/zoomFactor", m_zoomFactor);
925 s.setValue(m_sSettingsPath +
"/backgroundColor", m_bgColor);
926 s.setValue(m_sSettingsPath +
"/signalColor", m_signalColor);
933 if (m_sSettingsPath.isEmpty())
936 float rawWindowSec = s.value(m_sSettingsPath +
"/windowSizeSeconds", 10.f).toFloat();
937 m_windowSizeSeconds = qBound(0.5f, rawWindowSec, 120.f);
939 if (rawWindowSec != m_windowSizeSeconds)
940 s.remove(m_sSettingsPath +
"/windowSizeSeconds");
942 m_zoomFactor = s.value(m_sSettingsPath +
"/zoomFactor", 1.0).toDouble();
943 m_bgColor = s.value(m_sSettingsPath +
"/backgroundColor", QColor(250, 250, 250)).value<QColor>();
944 m_signalColor = s.value(m_sSettingsPath +
"/signalColor", QColor(Qt::darkGreen)).value<QColor>();
949 m_pRhiView->setBackgroundColor(m_bgColor);
951 m_pModel->setSignalColor(m_signalColor);
958 m_pModel->clearData();
960 m_pScrollBar->setMaximum(0);
961 m_pScrollBar->setValue(0);
964 m_pRhiView->setScrollSample(0.f);
966 m_pTimeRuler->setFirstFileSample(0);
967 m_pTimeRuler->setScrollSample(0.f);
968 m_pTimeRuler->setReferenceMarkers({});
983 QWidget::keyPressEvent(event);
987 float step = m_pRhiView->visibleSampleCount() * 0.1f;
988 float page = m_pRhiView->visibleSampleCount() * 0.9f;
990 switch (event->key()) {
992 m_pRhiView->scrollTo(m_pRhiView->scrollSample() - step, 150);
995 m_pRhiView->scrollTo(m_pRhiView->scrollSample() + step, 150);
998 m_pRhiView->scrollTo(m_pRhiView->scrollSample() - page, 200);
1000 case Qt::Key_PageDown:
1001 m_pRhiView->scrollTo(m_pRhiView->scrollSample() + page, 200);
1004 m_pRhiView->scrollTo(
static_cast<float>(m_pModel->firstSample()), 300);
1008 float lastStart =
static_cast<float>(
1009 m_pModel->firstSample() + m_pModel->totalSamples()
1010 - m_pRhiView->visibleSampleCount());
1011 m_pRhiView->scrollTo(qMax(lastStart, 0.f), 300);
1016 m_pRhiView->zoomTo(m_pRhiView->samplesPerPixel() * 0.75f, 200);
1019 m_pRhiView->zoomTo(m_pRhiView->samplesPerPixel() * 1.33f, 200);
1028 switch (m_pModel->detrendMode()) {
1060 if (event->modifiers() & Qt::ShiftModifier) {
1064 QWidget::keyPressEvent(event);
1072 case Qt::Key_BracketRight:
1076 case Qt::Key_BracketLeft:
1084 QWidget::keyPressEvent(event);
1094 AbstractView::resizeEvent(event);
1095 updateSamplesPerPixel();
1096 updateScrollBarRange();
1101void ChannelDataView::onScrollBarMoved(
int value)
1103 if (m_scrollBarUpdating || !m_pRhiView)
1110void ChannelDataView::onRhiScrollChanged(
float sample)
1117 m_scrollBarUpdating =
true;
1118 m_pScrollBar->setValue(
static_cast<int>(sample));
1119 m_scrollBarUpdating =
false;
1124void ChannelDataView::updateScrollBarRange()
1126 if (!m_pScrollBar || !m_pRhiView)
1129 int visible = m_pRhiView->visibleSampleCount();
1132 if (m_firstFileSample >= 0 && m_lastFileSample >= 0) {
1134 minVal = m_firstFileSample;
1135 maxVal = qMax(m_firstFileSample, m_lastFileSample - visible + 1);
1138 int firstSamp = m_pModel->firstSample();
1139 int total = m_pModel->totalSamples();
1141 maxVal = qMax(firstSamp, firstSamp + total - visible);
1144 m_scrollBarUpdating =
true;
1145 m_pScrollBar->setMinimum(minVal);
1146 m_pScrollBar->setMaximum(maxVal);
1147 m_pScrollBar->setPageStep(visible);
1148 m_scrollBarUpdating =
false;
1153void ChannelDataView::updateSamplesPerPixel()
1155 if (!m_pRhiView || !m_pFiffInfo)
1158 float sfreq =
static_cast<float>(m_pFiffInfo->sfreq);
1159 int viewPx = m_pRhiView->width();
1164 float spp = (m_windowSizeSeconds * sfreq) / viewPx /
static_cast<float>(m_zoomFactor);
1165 m_pRhiView->setSamplesPerPixel(qMax(spp, 1e-4f));
1166 updateScrollBarRange();
1171void ChannelDataView::onChannelScrollBarMoved(
int value)
1173 if (m_channelScrollBarUpdating || !m_pRhiView)
1175 m_pRhiView->setFirstVisibleChannel(value);
1180void ChannelDataView::onChannelOffsetChanged(
int firstChannel)
1182 if (!m_pChannelScrollBar)
1184 m_channelScrollBarUpdating =
true;
1185 m_pChannelScrollBar->setValue(firstChannel);
1186 m_channelScrollBarUpdating =
false;
1191void ChannelDataView::updateChannelScrollBarRange()
1193 if (!m_pChannelScrollBar || !m_pRhiView)
1197 int totalCh = m_pRhiView ? m_pRhiView->totalLogicalChannels()
1198 : m_pModel->channelCount();
1199 int visibleCnt = m_pRhiView->visibleChannelCount();
1200 int maxVal = qMax(0, totalCh - visibleCnt);
1202 m_channelScrollBarUpdating =
true;
1203 m_pChannelScrollBar->setMaximum(maxVal);
1204 m_pChannelScrollBar->setPageStep(visibleCnt);
1205 m_channelScrollBarUpdating =
false;
Declaration of the TimeRulerWidget class.
Declaration of the ChannelRhiView class.
Declaration of the ChannelDataModel class.
Declaration of the ChannelLabelPanel class.
Declaration of the ChannelDataView class.
FiffInfo class declaration.
FIFF file I/O and data structures (raw, epochs, evoked, covariance, forward).
2-D display widgets and visualisation helpers (charts, topography, colour maps).
DetrendMode
Channel display metadata (read-only from the renderer's perspective).
AbstractView(QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
RulerHeaderWidget(QWidget *parent=nullptr)
void setClockTimeFormat(bool useClock)
void paintEvent(QPaintEvent *) override
QRect signalViewportRect() const
ChannelDataView(const QString &sSettingsPath=QString(), QWidget *parent=nullptr, Qt::WindowFlags f=Qt::Widget)
void setScalingMap(const QMap< qint32, float > &scaleMap)
void referenceMarkerRemoveRequested(int sample)
void eventsVisibleToggled(bool on)
void loadSettings() override
void clippingToggled(bool on)
int viewportXToSample(int x) const
void setButterflyMode(bool enabled)
void crosshairToggled(bool on)
void sortChannelsByType()
void setBackgroundColor(const QColor &color)
void setClockTimeFormat(bool useClock)
void setRemoveDC(bool dc)
int firstVisibleSample() const
void setWindowSize(float seconds)
void sampleClicked(int sample)
void saveSettings() override
DetrendMode detrendMode() const
bool badChannelsHidden() const
void referenceMarkersClearRequested()
void zScoreModeToggled(bool on)
void clearView() override
bool annotationsVisible() const
void annotationsVisibleToggled(bool on)
void setOverviewBarVisible(bool visible)
void updateGuiMode(GuiMode mode) override
void setSignalColor(const QColor &color)
void scrollPositionChanged(int sample)
void setData(const Eigen::MatrixXd &data, int firstSample=0)
void referenceMarkerAddRequested(int sample)
int visibleSampleCount() const
bool epochMarkersVisible() const
void setEpochMarkersVisible(bool visible)
void setEvents(const QVector< ChannelRhiView::EventMarker > &events)
float scrollSpeedFactor() const
void setZScoreMode(bool enabled)
void setDetrendMode(DetrendMode mode)
bool overviewBarVisible() const
void scrollToSample(int sample, bool animate=true)
QColor signalColor() const
void scalebarsToggled(bool on)
void setFileBounds(int first, int last)
bool butterflyMode() const
void resizeEvent(QResizeEvent *event) override
~ChannelDataView() override
void init(QSharedPointer< FIFFLIB::FiffInfo > pInfo)
void hideBadChannels(bool hide)
bool clockTimeFormat() const
void butterflyToggled(bool on)
void setEpochMarkers(const QVector< int > &triggerSamples)
void setClippingVisible(bool visible)
int sampleToViewportX(int sample) const
void epochMarkersToggled(bool on)
void overviewBarToggled(bool on)
void setAnnotationsVisible(bool visible)
void setScalebarsVisible(bool visible)
void setAnnotationSelectionEnabled(bool enabled)
void updateProcessingMode(ProcessingMode mode) override
bool clippingVisible() const
void cursorDataChanged(float timeSec, float amplitude, const QString &channelName, const QString &unitLabel)
void addData(const Eigen::MatrixXd &data)
QMap< qint32, float > scalingMap() const
void sampleRangeSelected(int startSample, int endSample)
void setEventsVisible(bool visible)
bool eventsVisible() const
bool crosshairEnabled() const
bool scalebarsVisible() const
void scrollSpeedChanged(float factor)
void setCrosshairEnabled(bool enabled)
void annotationBoundaryMoved(int annotationIndex, bool isStartBoundary, int newSample)
void keyPressEvent(QKeyEvent *event) override
void setReferenceMarkers(const QVector< TimeRulerReferenceMark > &markers)
void setAnnotations(const QVector< ChannelRhiView::AnnotationSpan > &annotations)
void setScrollSpeedFactor(float factor)
QColor backgroundColor() const
void setZoom(double factor)
void setChannelFilter(const QStringList &names)
Channel display metadata (read-only from the renderer's perspective).
ChannelDataModel – lightweight data container for ChannelDataView / ChannelRhiView.
Fixed-width panel showing channel names and metadata, left of the render surface.
void channelScrollRequested(int targetFirst)
void setFirstVisibleChannel(int ch)
ChannelRhiView – QRhiWidget-based channel signal renderer.
void viewResized(int newWidth, int newHeight)
void channelOffsetChanged(int firstChannel)
void samplesPerPixelChanged(float spp)
void sampleRangeSelected(int startSample, int endSample)
void annotationBoundaryMoved(int annotationIndex, bool isStartBoundary, int newSample)
void setModel(ChannelDataModel *model)
void setFirstVisibleChannel(int ch)
void sampleClicked(int sample)
void setBackgroundColor(const QColor &color)
void setScrollSample(float sample)
void cursorDataChanged(float timeSec, float amplitude, const QString &channelName, const QString &unitLabel)
void scrollSampleChanged(float sample)
void setWheelScrollsChannels(bool channelsMode)
Minimap / overview bar showing the full recording extent.
void scrollRequested(float targetSample)
void setModel(ChannelDataModel *model)
TimeRulerWidget – a thin horizontal time axis ruler for ChannelDataView.
static constexpr int kTotalH
Total widget height (px).
void setScrollSample(float sample)
static constexpr int kTimeZoneH
Height of the time-tick zone (px).
static constexpr int kStimZoneH
Height of the stimulus lane (px).
void removeReferenceMarkerRequested(int sample)
void addReferenceMarkerRequested(int sample)
void setSamplesPerPixel(float spp)
void clearReferenceMarkersRequested()