41 #include "ui_fiffrawviewsettings.h"
47 #include <QColorDialog>
59 using namespace DISPLIB;
69 , m_pUi(new Ui::FiffRawViewSettingsWidget)
74 this->setWindowTitle(
"Fiff Raw View Settings");
75 this->setMinimumWidth(330);
94 if(lVisibleWidgets.contains(
"numberChannels", Qt::CaseInsensitive) || lVisibleWidgets.isEmpty()) {
96 connect(m_pUi->m_doubleSpinBox_numberVisibleChannels,
static_cast<void (QDoubleSpinBox::*)(
double)
>(&QDoubleSpinBox::valueChanged),
99 m_pUi->m_doubleSpinBox_numberVisibleChannels->hide();
100 m_pUi->label_numberChannels->hide();
103 if(lVisibleWidgets.contains(
"windowSize", Qt::CaseInsensitive) || lVisibleWidgets.isEmpty()) {
105 connect(m_pUi->m_spinBox_windowSize,
static_cast<void (QSpinBox::*)(
int)
>(&QSpinBox::valueChanged),
108 m_pUi->m_spinBox_windowSize->hide();
109 m_pUi->label_windowSize->hide();
112 if(lVisibleWidgets.contains(
"distanceSpacers", Qt::CaseInsensitive) || lVisibleWidgets.isEmpty()) {
114 connect(m_pUi->m_comboBox_distaceTimeSpacer,
static_cast<void (QComboBox::*)(
int)
>(&QComboBox::currentIndexChanged),
117 m_pUi->m_comboBox_distaceTimeSpacer->hide();
118 m_pUi->label_timeSpacers->hide();
121 if(lVisibleWidgets.contains(
"backgroundColor", Qt::CaseInsensitive) || lVisibleWidgets.isEmpty()) {
123 connect(m_pUi->m_pushButton_backgroundColor,
static_cast<void (QPushButton::*)(
bool)
>(&QPushButton::clicked),
126 m_pUi->m_pushButton_backgroundColor->hide();
127 m_pUi->label_backgroundColor->hide();
130 if(lVisibleWidgets.contains(
"signalColor", Qt::CaseInsensitive) || lVisibleWidgets.isEmpty()) {
132 connect(m_pUi->m_pushButton_signalColor,
static_cast<void (QPushButton::*)(
bool)
>(&QPushButton::clicked),
135 m_pUi->m_pushButton_signalColor->hide();
136 m_pUi->label_signalColor->hide();
139 if(lVisibleWidgets.contains(
"screenshot", Qt::CaseInsensitive) || lVisibleWidgets.isEmpty()) {
141 connect(m_pUi->m_pushButton_makeScreenshot,
static_cast<void (QPushButton::*)(
bool)
>(&QPushButton::clicked),
144 m_pUi->m_pushButton_makeScreenshot->hide();
145 m_pUi->m_comboBox_imageType->hide();
155 m_pUi->m_spinBox_windowSize->setValue(windowSize);
162 m_pUi->m_doubleSpinBox_numberVisibleChannels->setValue(zoomFactor);
169 return m_pUi->m_comboBox_distaceTimeSpacer->currentText().toInt();
176 m_pUi->m_comboBox_distaceTimeSpacer->setCurrentText(QString::number(value));
183 m_pUi->m_pushButton_backgroundColor->setStyleSheet(QString(
"background-color: rgb(%1, %2, %3);").arg(backgroundColor.red()).arg(backgroundColor.green()).arg(backgroundColor.blue()));
192 m_pUi->m_pushButton_signalColor->setStyleSheet(QString(
"background-color: rgb(%1, %2, %3);").arg(signalColor.red()).arg(signalColor.green()).arg(signalColor.blue()));
215 return m_pUi->m_doubleSpinBox_numberVisibleChannels->value();
222 return m_pUi->m_spinBox_windowSize->value();
233 QSettings settings(
"MNECPP");
250 QSettings settings(
"MNECPP");
252 m_pUi->m_doubleSpinBox_numberVisibleChannels->setValue(settings.value(
m_sSettingsPath + QString(
"/FiffRawViewSettings/viewZoomFactor"), 16).toDouble());
253 m_pUi->m_spinBox_windowSize->setValue(settings.value(
m_sSettingsPath + QString(
"/FiffRawViewSettings/viewWindowSize"), 10).toInt());
255 QColor colorDefault = Qt::blue;
259 colorDefault = Qt::white;
263 m_pUi->m_comboBox_distaceTimeSpacer->setCurrentText(QString::number(settings.value(
m_sSettingsPath + QString(
"/FiffRawViewSettings/distanceTimeSpacer"), 1000).toInt()));
271 case GuiMode::Clinical:
283 case ProcessingMode::Offline:
323 QObject* obj = sender();
324 if(obj == m_pUi->m_pushButton_signalColor) {
326 pDialog->setWindowTitle(
"Signal Color");
337 if( obj == m_pUi->m_pushButton_backgroundColor ) {
339 pDialog->setWindowTitle(
"Background Color");