48 #include <QGridLayout>
49 #include <QSignalMapper>
61 using namespace DISPLIB;
62 using namespace FIFFLIB;
75 this->setWindowTitle(
"Compensators");
76 this->setMinimumWidth(330);
77 this->setMaximumWidth(330);
103 for(
int i = 0; i <
m_pComps.size(); ++i) {
104 if(!m_mapCompActive.contains(
m_pComps.at(i).kind)) {
105 m_mapCompActive.insert(
m_pComps.at(i).kind,
false);
120 QSettings settings(
"MNECPP");
122 settings.beginGroup(
m_sSettingsPath + QString(
"/CompensatorView/compensatorActive"));
124 QMap<int,bool>::const_iterator iComp = m_mapCompActive.constBegin();
125 while (iComp != m_mapCompActive.constEnd()) {
126 settings.setValue(QString::number(iComp.key()), iComp.value());
141 QSettings settings(
"MNECPP");
143 settings.beginGroup(
m_sSettingsPath + QString(
"/CompensatorView/compensatorActive"));
145 QStringList keys = settings.childKeys();
146 foreach (QString key, keys) {
147 m_mapCompActive[key.toInt()] = settings.value(key).toBool();
158 case GuiMode::Clinical:
170 case ProcessingMode::Offline:
195 QGridLayout *topLayout =
new QGridLayout;
197 for(
int i = 0; i <
m_pComps.size(); ++i) {
199 QCheckBox* checkBox =
new QCheckBox(numStr.setNum(
m_pComps[i].kind));
203 connect(checkBox, &QCheckBox::toggled,
206 checkBox->setChecked(m_mapCompActive[
m_pComps.at(i).kind]);
208 topLayout->addWidget(checkBox, i, 0);
212 this->setLayout(topLayout);
219 if(QCheckBox* pCheckBox = qobject_cast<QCheckBox*>(sender())) {
220 bool currentState =
false;
221 QString compName = pCheckBox->text();
226 m_mapCompActive[compName.toInt()] =
false;
229 m_mapCompActive[compName.toInt()] = currentState;
235 m_iLastTo = compName.toInt();