216 if (QLayout* layout = this->layout()) {
218 while (std::unique_ptr<QLayoutItem> pItem{layout->takeAt(0)}) {
219 std::unique_ptr<QWidget> pWidget{pItem->widget()};
226 QGridLayout* pGroupBoxArtifactRejection =
new QGridLayout();
227 this->setLayout(pGroupBoxArtifactRejection);
231 QStringList channelTypes;
239 channelTypes <<
"grad";
242 channelTypes <<
"mag";
244 if (kind ==
FIFFV_EEG_CH && !channelTypes.contains(
"eeg", Qt::CaseInsensitive)) {
245 channelTypes <<
"eeg";
247 if (kind ==
FIFFV_EOG_CH && !channelTypes.contains(
"eog", Qt::CaseInsensitive)) {
248 channelTypes <<
"eog";
250 if (kind ==
FIFFV_EMG_CH && !channelTypes.contains(
"emg", Qt::CaseInsensitive)) {
251 channelTypes <<
"emg";
253 if (kind ==
FIFFV_ECG_CH && !channelTypes.contains(
"ecg", Qt::CaseInsensitive)) {
254 channelTypes <<
"ecg";
258 if (!channelTypes.isEmpty()) {
265 for (
int i = 0; i < channelTypes.size(); ++i) {
266 QLabel* pLabel =
new QLabel(channelTypes.at(i));
267 pGroupBoxArtifactRejection->addWidget(pLabel, i + 1, 0);
269 QDoubleSpinBox* pDoubleSpinBox =
new QDoubleSpinBox();
270 pDoubleSpinBox->setPrefix(
"+/-");
271 pDoubleSpinBox->setMinimum(0.0);
272 pDoubleSpinBox->setMaximum(100000.0);
274 pGroupBoxArtifactRejection->addWidget(pDoubleSpinBox, i + 1, 1);
275 connect(pDoubleSpinBox,
static_cast<void (QDoubleSpinBox::*)(
double)
>(&QDoubleSpinBox::valueChanged),
279 QSpinBox* pSpinBox =
new QSpinBox();
280 pSpinBox->setPrefix(
"e");
281 pSpinBox->setMaximum(0);
282 pSpinBox->setMinimum(-10000);
284 pGroupBoxArtifactRejection->addWidget(pSpinBox, i + 1, 2);
285 connect(pSpinBox,
static_cast<void (QSpinBox::*)(
int)
>(&QSpinBox::valueChanged),
313 while (i.hasNext()) {
319 if (i.key().contains(
"grad", Qt::CaseInsensitive)) {
322 if (i.key().contains(
"mag", Qt::CaseInsensitive)) {
325 if (i.key().contains(
"eeg", Qt::CaseInsensitive)) {
328 if (i.key().contains(
"ecg", Qt::CaseInsensitive)) {
331 if (i.key().contains(
"eog", Qt::CaseInsensitive)) {
334 if (i.key().contains(
"emg", Qt::CaseInsensitive)) {