42 #include "../realtimemultisamplearraywidget.h"
51 #include <QGridLayout>
72 this->setWindowTitle(
"Covariance Modality Settings");
73 this->setMinimumWidth(330);
74 this->setMaximumWidth(330);
76 QGridLayout* t_pGridLayout =
new QGridLayout;
80 if(m_pRTMSAW->m_qMapChScaling.contains(FIFF_UNIT_T))
82 QLabel* t_pLabelModality =
new QLabel;
83 t_pLabelModality->setText(
"MAG (pT)");
84 t_pGridLayout->addWidget(t_pLabelModality,i,0,1,1);
86 QDoubleSpinBox* t_pDoubleSpinBoxScale =
new QDoubleSpinBox;
87 t_pDoubleSpinBoxScale->setMinimum(10e-11);
88 t_pDoubleSpinBoxScale->setMaximum(10e14);
89 t_pDoubleSpinBoxScale->setMaximumWidth(100);
90 t_pDoubleSpinBoxScale->setSingleStep(0.1);
91 t_pDoubleSpinBoxScale->setDecimals(4);
92 t_pDoubleSpinBoxScale->setValue(m_pRTMSAW->m_qMapChScaling[FIFF_UNIT_T]/(1e-12));
93 m_qMapScalingDoubleSpinBox.insert(FIFF_UNIT_T,t_pDoubleSpinBoxScale);
94 connect(t_pDoubleSpinBoxScale,
static_cast<void (QDoubleSpinBox::*)(
double)
>(&QDoubleSpinBox::valueChanged),
95 this,&RealTimeMultiSampleArrayScalingWidget::updateDoubleSpinBox);
96 t_pGridLayout->addWidget(t_pDoubleSpinBoxScale,i,2,1,1);
103 QLabel* t_pLabelModality =
new QLabel;
104 t_pLabelModality->setText(
"GRAD (fT/cm)");
105 t_pGridLayout->addWidget(t_pLabelModality,i,0,1,1);
107 QDoubleSpinBox* t_pDoubleSpinBoxScale =
new QDoubleSpinBox;
108 t_pDoubleSpinBoxScale->setMinimum(10e-11);
109 t_pDoubleSpinBoxScale->setMaximum(2000);
110 t_pDoubleSpinBoxScale->setMaximumWidth(100);
111 t_pDoubleSpinBoxScale->setSingleStep(20.0);
112 t_pDoubleSpinBoxScale->setDecimals(4);
113 t_pDoubleSpinBoxScale->setValue(m_pRTMSAW->m_qMapChScaling[
FIFF_UNIT_T_M]/(1e-15 * 100));
114 m_qMapScalingDoubleSpinBox.insert(
FIFF_UNIT_T_M,t_pDoubleSpinBoxScale);
115 connect(t_pDoubleSpinBoxScale,
static_cast<void (QDoubleSpinBox::*)(
double)
>(&QDoubleSpinBox::valueChanged),
116 this,&RealTimeMultiSampleArrayScalingWidget::updateDoubleSpinBox);
117 t_pGridLayout->addWidget(t_pDoubleSpinBoxScale,i,2,1,1);
122 if(m_pRTMSAW->m_qMapChScaling.contains(FIFFV_EEG_CH))
124 QLabel* t_pLabelModality =
new QLabel;
125 t_pLabelModality->setText(
"EEG (uV)");
126 t_pGridLayout->addWidget(t_pLabelModality,i,0,1,1);
128 QDoubleSpinBox* t_pDoubleSpinBoxScale =
new QDoubleSpinBox;
129 t_pDoubleSpinBoxScale->setMinimum(10e-11);
130 t_pDoubleSpinBoxScale->setMaximum(2000);
131 t_pDoubleSpinBoxScale->setMaximumWidth(100);
132 t_pDoubleSpinBoxScale->setSingleStep(1.0);
133 t_pDoubleSpinBoxScale->setDecimals(4);
134 t_pDoubleSpinBoxScale->setValue(m_pRTMSAW->m_qMapChScaling[FIFFV_EEG_CH]/(1e-06));
135 m_qMapScalingDoubleSpinBox.insert(FIFFV_EEG_CH,t_pDoubleSpinBoxScale);
136 connect(t_pDoubleSpinBoxScale,
static_cast<void (QDoubleSpinBox::*)(
double)
>(&QDoubleSpinBox::valueChanged),
137 this,&RealTimeMultiSampleArrayScalingWidget::updateDoubleSpinBox);
138 t_pGridLayout->addWidget(t_pDoubleSpinBoxScale,i,2,1,1);
143 if(m_pRTMSAW->m_qMapChScaling.contains(FIFFV_EOG_CH))
145 QLabel* t_pLabelModality =
new QLabel;
146 t_pLabelModality->setText(
"EOG (uV)");
147 t_pGridLayout->addWidget(t_pLabelModality,i,0,1,1);
149 QDoubleSpinBox* t_pDoubleSpinBoxScale =
new QDoubleSpinBox;
150 t_pDoubleSpinBoxScale->setMinimum(10e-11);
151 t_pDoubleSpinBoxScale->setMaximum(10000);
152 t_pDoubleSpinBoxScale->setMaximumWidth(100);
153 t_pDoubleSpinBoxScale->setSingleStep(10.0);
154 t_pDoubleSpinBoxScale->setDecimals(4);
155 t_pDoubleSpinBoxScale->setValue(m_pRTMSAW->m_qMapChScaling[FIFFV_EOG_CH]/(1e-06));
156 m_qMapScalingDoubleSpinBox.insert(FIFFV_EOG_CH,t_pDoubleSpinBoxScale);
157 connect(t_pDoubleSpinBoxScale,
static_cast<void (QDoubleSpinBox::*)(
double)
>(&QDoubleSpinBox::valueChanged),
158 this,&RealTimeMultiSampleArrayScalingWidget::updateDoubleSpinBox);
159 t_pGridLayout->addWidget(t_pDoubleSpinBoxScale,i,2,1,1);
164 if(m_pRTMSAW->m_qMapChScaling.contains(FIFFV_STIM_CH))
166 QLabel* t_pLabelModality =
new QLabel;
167 t_pLabelModality->setText(
"STIM");
168 t_pGridLayout->addWidget(t_pLabelModality,i,0,1,1);
170 QDoubleSpinBox* t_pDoubleSpinBoxScale =
new QDoubleSpinBox;
171 t_pDoubleSpinBoxScale->setMinimum(10e-11);
172 t_pDoubleSpinBoxScale->setMaximum(1000);
173 t_pDoubleSpinBoxScale->setMaximumWidth(100);
174 t_pDoubleSpinBoxScale->setSingleStep(1.0);
175 t_pDoubleSpinBoxScale->setDecimals(4);
176 t_pDoubleSpinBoxScale->setValue(m_pRTMSAW->m_qMapChScaling[FIFFV_STIM_CH]);
177 m_qMapScalingDoubleSpinBox.insert(FIFFV_STIM_CH,t_pDoubleSpinBoxScale);
178 connect(t_pDoubleSpinBoxScale,
static_cast<void (QDoubleSpinBox::*)(
double)
>(&QDoubleSpinBox::valueChanged),
179 this,&RealTimeMultiSampleArrayScalingWidget::updateDoubleSpinBox);
180 t_pGridLayout->addWidget(t_pDoubleSpinBoxScale,i,2,1,1);
185 if(m_pRTMSAW->m_qMapChScaling.contains(FIFFV_MISC_CH))
187 QLabel* t_pLabelModality =
new QLabel;
188 t_pLabelModality->setText(
"MISC");
189 t_pGridLayout->addWidget(t_pLabelModality,i,0,1,1);
191 QDoubleSpinBox* t_pDoubleSpinBoxScale =
new QDoubleSpinBox;
192 t_pDoubleSpinBoxScale->setMinimum(10e-11);
193 t_pDoubleSpinBoxScale->setMaximum(1000);
194 t_pDoubleSpinBoxScale->setMaximumWidth(100);
195 t_pDoubleSpinBoxScale->setSingleStep(1.0);
196 t_pDoubleSpinBoxScale->setDecimals(4);
197 t_pDoubleSpinBoxScale->setValue(m_pRTMSAW->m_qMapChScaling[FIFFV_MISC_CH]);
198 m_qMapScalingDoubleSpinBox.insert(FIFFV_MISC_CH,t_pDoubleSpinBoxScale);
199 connect(t_pDoubleSpinBoxScale,
static_cast<void (QDoubleSpinBox::*)(
double)
>(&QDoubleSpinBox::valueChanged),
200 this,&RealTimeMultiSampleArrayScalingWidget::updateDoubleSpinBox);
201 t_pGridLayout->addWidget(t_pDoubleSpinBoxScale,i,2,1,1);
206 this->setLayout(t_pGridLayout);
213 void RealTimeMultiSampleArrayScalingWidget::updateDoubleSpinBox(
const double val)
217 QMap<qint32, QDoubleSpinBox*>::iterator it;
218 for (it = m_qMapScalingDoubleSpinBox.begin(); it != m_qMapScalingDoubleSpinBox.end(); ++it)
220 double scaleValue = 0;
230 scaleValue = 1e-15 * 100;
260 m_pRTMSAW->m_qMapChScaling[it.key()] = it.value()->value() * scaleValue;
265 emit scalingChanged();