43 #include "ui_filtersettingsview.h"
50 #include <QGridLayout>
51 #include <QPushButton>
62 using namespace DISPLIB;
72 , m_pUi(new Ui::FilterSettingsViewWidget)
75 this->setWindowTitle(
"Filter Settings");
87 m_pUi->m_pDoubleSpinBoxFrom->setValue(dFrom);
90 m_pUi->m_pDoubleSpinBoxTo->setValue(dTo);
100 connect(
m_pUi->m_pCheckBoxActivateFilter, &QCheckBox::toggled,
102 connect(
m_pUi->m_pPushButtonShowFilterOptions, &QPushButton::clicked,
104 connect(
m_pUi->m_pDoubleSpinBoxFrom, &QDoubleSpinBox::editingFinished,
106 connect(
m_pUi->m_pDoubleSpinBoxTo, &QDoubleSpinBox::editingFinished,
108 connect(
m_pUi->m_pcomboBoxChannelTypes, &QComboBox::currentTextChanged,
131 return m_pUi->m_pCheckBoxActivateFilter->isChecked();
139 double nyquistFrequency = dSFreq/2;
141 m_pUi->m_pDoubleSpinBoxFrom->setMaximum(nyquistFrequency);
142 m_pUi->m_pDoubleSpinBoxTo->setMaximum(nyquistFrequency);
144 if(
m_pUi->m_pDoubleSpinBoxFrom->value() > dSFreq/2) {
145 m_pUi->m_pDoubleSpinBoxFrom->setValue(dSFreq/2);
148 if(
m_pUi->m_pDoubleSpinBoxTo->value() > dSFreq/2) {
149 m_pUi->m_pDoubleSpinBoxTo->setValue(dSFreq/2);
163 QSettings settings(
"MNECPP");
165 settings.setValue(
m_sSettingsPath + QString(
"/FilterSettingsView/filterActivated"),
m_pUi->m_pCheckBoxActivateFilter->isChecked());
166 settings.setValue(
m_sSettingsPath + QString(
"/FilterSettingsView/filterFrom"),
m_pUi->m_pDoubleSpinBoxFrom->value());
167 settings.setValue(
m_sSettingsPath + QString(
"/FilterSettingsView/filterTo"),
m_pUi->m_pDoubleSpinBoxTo->value());
168 settings.setValue(
m_sSettingsPath + QString(
"/FilterSettingsView/filterChannelType"),
m_pUi->m_pcomboBoxChannelTypes->currentText());
179 QSettings settings(
"MNECPP");
181 m_pUi->m_pCheckBoxActivateFilter->setChecked(settings.value(
m_sSettingsPath + QString(
"/FilterSettingsView/filterActivated"),
false).toBool());
182 m_pUi->m_pDoubleSpinBoxTo->setValue(settings.value(
m_sSettingsPath + QString(
"/FilterSettingsView/filterTo"), 0).toDouble());
183 m_pUi->m_pDoubleSpinBoxFrom->setValue(settings.value(
m_sSettingsPath + QString(
"/FilterSettingsView/filterFrom"), 0).toDouble());
184 m_pUi->m_pcomboBoxChannelTypes->setCurrentText(settings.value(
m_sSettingsPath + QString(
"/FilterSettingsView/filterChannelType"),
"All").toString());
192 case GuiMode::Clinical:
193 m_pUi->m_pPushButtonShowFilterOptions->hide();
196 m_pUi->m_pPushButtonShowFilterOptions->show();
206 case ProcessingMode::Offline:
248 if(
m_pUi->m_pDoubleSpinBoxFrom->value() >= 2) {
249 m_pUi->m_pDoubleSpinBoxFrom->setMaximum(
m_pUi->m_pDoubleSpinBoxTo->value()-1);
251 m_pUi->m_pDoubleSpinBoxFrom->setMaximum(
m_pUi->m_pDoubleSpinBoxTo->value());