MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
scalingview.h
Go to the documentation of this file.
1//=============================================================================================================
35#ifndef SCALINGVIEW_H
36#define SCALINGVIEW_H
37
38//=============================================================================================================
39// INCLUDES
40//=============================================================================================================
41
42#include "../disp_global.h"
43#include "abstractview.h"
44
45//=============================================================================================================
46// QT INCLUDES
47//=============================================================================================================
48
49#include <QMap>
50#include <QPointer>
51
52//=============================================================================================================
53// EIGEN INCLUDES
54//=============================================================================================================
55
56//=============================================================================================================
57// FORWARD DECLARATIONS
58//=============================================================================================================
59
60class QCheckBox;
61namespace Ui {
62 class ScalingViewWidget;
63}
64
65//=============================================================================================================
66// DEFINE NAMESPACE DISPLIB
67//=============================================================================================================
68
69namespace DISPLIB
70{
71
72//=============================================================================================================
73// DISPLIB FORWARD DECLARATIONS
74//=============================================================================================================
75class ScaleControl;
76
77//=========================================================================================================
88DISPSHARED_EXPORT float getDefaultScalingValue(int iChannelKind,
89 int iChannelUnit);
90
91//=========================================================================================================
104DISPSHARED_EXPORT float getScalingValue(const QMap<qint32, float>& qMapChScaling,
105 int iChannelKind,
106 int iChannelUnit);
107
108//=============================================================================================================
115{
116 Q_OBJECT
117
118public:
119 typedef QSharedPointer<ScalingView> SPtr;
120 typedef QSharedPointer<const ScalingView> ConstSPtr;
122 //=========================================================================================================
128 ScalingView(const QString& sSettingsPath = "",
129 QWidget *parent = 0,
130 Qt::WindowFlags f = Qt::Widget,
131 const QStringList& lChannelsToShow = QStringList() << "all");
132
133 //=========================================================================================================
137 ~ScalingView();
138
139 //=========================================================================================================
145 QMap<qint32,float> getScaleMap() const;
146
147 //=========================================================================================================
151 void setScaleMap(const QMap<qint32, float> &qMapChScaling);
152
153 //=========================================================================================================
157 void saveSettings() override;
158
159 //=========================================================================================================
163 void loadSettings() override;
164
165 //=========================================================================================================
169 void clearView() override;
170
171 //=========================================================================================================
177 void setMagGradLink(int l);
178
179signals:
180 //=========================================================================================================
187 void scalingChanged(const QMap<qint32, float>& scalingMap);
188
189private:
190
191 //=============================================================================================================
195 void processScalingChange();
196
197 //=============================================================================================================
201 void showLinkControl();
202
203 //=============================================================================================================
209 void updateMAGScale(double dScale);
210
211 //=========================================================================================================
217 void updateGRADScale(double dScale);
218
219 //=========================================================================================================
225 void updateMAGtoGRADlink(double dScale);
226
227 //=========================================================================================================
233 void updateEEGScale(double dScale);
234
235 //=========================================================================================================
241 void updateEOGScale(double dScale);
242
243 //=========================================================================================================
249 void updateEMGScale(double dScale);
250
251 //=========================================================================================================
257 void updateECGScale(double dScale);
258
259 //=========================================================================================================
265 void updateMISCScale(double dScale);
266
267 //=========================================================================================================
273 void updateSTIMScale(double dScale);
274
275 //=========================================================================================================
281 void updateGuiMode(GuiMode mode) override;
282
283 //=========================================================================================================
289 void updateProcessingMode(ProcessingMode mode) override;
290
291 //=========================================================================================================
295 void createScaleControls();
296
297 //=========================================================================================================
301 void drawScalingGUI();
302
303 //=========================================================================================================
307 void linkMagToGrad();
308
309 //=========================================================================================================
313 void linkGradToMag();
314
315 //=========================================================================================================
319 void createLinkMagGradCheckBox();
320
321 //=========================================================================================================
327 void keyReleaseEvent(QKeyEvent* event) override;
328
329 //=========================================================================================================
335 void keyPressEvent(QKeyEvent* event) override;
336
337 QMap<qint32, float> m_qMapChScaling;
338 QMap<qint32, QPointer<ScaleControl> > m_qMapScaleControls;
340 QString m_sSettingsPath;
342 QStringList m_lChannelTypesToShow;
344 Ui::ScalingViewWidget* m_pUi;
345 bool m_bLinkMAGtoGRAD;
346 bool m_bIsShiftKeyPressed;
347 bool m_bManagingSpinBoxChange;
348 bool m_bManagingSliderChange;
349 bool m_bManagingLinkMagToGrad;
350 QPointer<QCheckBox> m_pCheckBox;
351};
352
353} // NAMESPACE
354
355#endif // SCALINGVIEW_H
DISPSHARED_EXPORT float getScalingValue(const QMap< qint32, float > &qMapChScaling, int iChannelKind, int iChannelUnit)
DISPSHARED_EXPORT float getDefaultScalingValue(int iChannelKind, int iChannelUnit)
#define DISPSHARED_EXPORT
Definition disp_global.h:55
The AbstractView class provides the base calss for all Disp viewers.
The ScalingView class provides a view to select the scaling for different channels modalities.
void scalingChanged(const QMap< qint32, float > &scalingMap)
QSharedPointer< const ScalingView > ConstSPtr
QSharedPointer< ScalingView > SPtr
AbstractView class declaration.