MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
minimumnormsettingsview.cpp
Go to the documentation of this file.
1//=============================================================================================================
35//=============================================================================================================
36// INCLUDES
37//=============================================================================================================
38
40
41#include "ui_minimumnormsettingsview.h"
42
43//=============================================================================================================
44// QT INCLUDES
45//=============================================================================================================
46
47#include <QSettings>
48
49//=============================================================================================================
50// EIGEN INCLUDES
51//=============================================================================================================
52
53//=============================================================================================================
54// USED NAMESPACES
55//=============================================================================================================
56
57using namespace DISPLIB;
58
59//=============================================================================================================
60// DEFINE MEMBER METHODS
61//=============================================================================================================
62
64 const QString& sMethod,
65 QWidget *parent,
66 Qt::WindowFlags f)
67: AbstractView(parent, f)
68, m_pUi(new Ui::MinimumNormSettingsViewWidget)
69{
70 m_sSettingsPath = sSettingsPath;
71 m_sMethod = sMethod;
72 m_pUi->setupUi(this);
73
74 connect(m_pUi->m_comboBox_method, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged),
76
77 connect(m_pUi->m_comboBox_triggerType, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged),
79
80 connect(m_pUi->m_spinBox_timepoint, &QSpinBox::editingFinished,
82
83 if(!m_sMethod.isEmpty())
84 {
85 m_pUi->m_comboBox_method->setCurrentIndex(m_pUi->m_comboBox_method->findText(m_sMethod));
86 m_pUi->m_comboBox_method->setEnabled(false);
87 }
88
89 this->setWindowTitle("MinimumNorm Settings");
90 this->setMinimumWidth(330);
91 this->setMaximumWidth(330);
92
94}
95
96//=============================================================================================================
97
103
104//=============================================================================================================
105
106void MinimumNormSettingsView::setTriggerTypes(const QStringList& lTriggerTypes)
107{
108 for(const QString &sTriggerType : lTriggerTypes) {
109 if(m_pUi->m_comboBox_triggerType->findText(sTriggerType) == -1) {
110 m_pUi->m_comboBox_triggerType->addItem(sTriggerType);
111 }
112 }
113}
114
115//=============================================================================================================
116
118{
119 if(m_sSettingsPath.isEmpty()) {
120 return;
121 }
122
123 // Save Settings
124 QSettings settings("MNECPP");
125}
126
127//=============================================================================================================
128
130{
131 if(m_sSettingsPath.isEmpty()) {
132 return;
133 }
134
135 // Load Settings
136 QSettings settings("MNECPP");
137}
138
139//=============================================================================================================
140
142{
143 switch(mode) {
144 case GuiMode::Clinical:
145 break;
146 default: // default is research mode
147 break;
148 }
149}
150
151//=============================================================================================================
152
154{
155 switch(mode) {
156 case ProcessingMode::Offline:
157 break;
158 default: // default is realtime mode
159 break;
160 }
161}
162
163//=============================================================================================================
164
166{
167 emit methodChanged(method);
168}
169
170//=============================================================================================================
171
172void MinimumNormSettingsView::onTriggerTypeChanged(const QString& sTriggerType)
173{
174 emit triggerTypeChanged(sTriggerType);
175}
176
177//=============================================================================================================
178
180{
181 emit timePointChanged(m_pUi->m_spinBox_timepoint->value());
182}
183
184//=============================================================================================================
185
Declaration of the MinimumNormSettingsView Class.
The AbstractView class provides the base calss for all Disp viewers.
void updateProcessingMode(ProcessingMode mode)
void onMethodChanged(const QString &method)
void onTriggerTypeChanged(const QString &sTriggerType)
MinimumNormSettingsView(const QString &sSettingsPath="", const QString &sMethod="", QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
void timePointChanged(int iTimePoint)
void triggerTypeChanged(const QString &triggerType)
void setTriggerTypes(const QStringList &lTriggerTypes)
void methodChanged(const QString &method)