MNE-CPP  beta 1.0
realtimeevokedwidget.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef REALTIMEEVOKEDWIDGET_H
37 #define REALTIMEEVOKEDWIDGET_H
38 
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include "xdisp_global.h"
46 #include "newmeasurementwidget.h"
48 #include "helpers/realtimebutterflyplot.h"
49 
51 #include "helpers/selectionmanagerwindow.h"
52 #include "helpers/chinfomodel.h"
53 
54 
55 //*************************************************************************************************************
56 //=============================================================================================================
57 // QT INCLUDES
58 //=============================================================================================================
59 
60 #include <QSharedPointer>
61 #include <QList>
62 #include <QAction>
63 #include <QSpinBox>
64 #include <QDoubleSpinBox>
65 #include <QLabel>
66 #include <QVBoxLayout>
67 
68 
69 //*************************************************************************************************************
70 //=============================================================================================================
71 // FORWARD DECLARATIONS
72 //=============================================================================================================
73 
74 class QTime;
75 
76 namespace XMEASLIB
77 {
78 class RealTimeEvoked;
79 }
80 
81 
82 //*************************************************************************************************************
83 //=============================================================================================================
84 // DEFINE NAMESPACE XDISPLIB
85 //=============================================================================================================
86 
87 namespace XDISPLIB
88 {
89 
90 //*************************************************************************************************************
91 //=============================================================================================================
92 // FORWARD DECLARATIONS
93 //=============================================================================================================
94 
95 
96 //*************************************************************************************************************
97 //=============================================================================================================
98 // USED NAMESPACES
99 //=============================================================================================================
100 
101 using namespace XMEASLIB;
102 
103 
104 //*************************************************************************************************************
105 //=============================================================================================================
106 // ENUMERATIONS
107 //=============================================================================================================
108 
111 //* Tool enumeration.
112 //*/
113 //enum Tool
114 //{
115 // Freeze = 0, /**< Freezing tool. */
116 // Annotation = 1 /**< Annotation tool. */
117 //};
118 
119 struct Modality {
120  QString m_sName;
121  bool m_bActive;
122  float m_fNorm;
123 
124  Modality(QString name, bool active, double norm)
125  : m_sName(name), m_bActive(active), m_fNorm(norm)
126  {}
127 };
128 
129 
130 //=============================================================================================================
137 {
138  Q_OBJECT
139 
140  friend class EvokedModalityWidget;
141 public:
142  //=========================================================================================================
150  RealTimeEvokedWidget(QSharedPointer<RealTimeEvoked> pRTE, QSharedPointer<QTime> &pTime, QWidget* parent = 0);
151 
152  //=========================================================================================================
157 
158  //=========================================================================================================
162  void broadcastSettings();
163 
164  //=========================================================================================================
170  virtual void update(XMEASLIB::NewMeasurement::SPtr pMeasurement);
171 
172  //=========================================================================================================
176  virtual void getData();
177 
178  //=========================================================================================================
182  virtual void init();
183 
184 private:
185  //=========================================================================================================
189  void showSensorSelectionWidget();
190 
191  //=========================================================================================================
195  void showModalitySelectionWidget();
196 
197  //=========================================================================================================
203  void showSelectedChannelsOnly(QStringList selectedChannels);
204 
205  QVBoxLayout *m_pRteLayout;
206  QLabel *m_pLabelInit;
208  RealTimeEvokedModel* m_pRTEModel;
209  RealTimeButterflyPlot* m_pButterflyPlot;
211  QAction* m_pActionSelectModality;
213  QSharedPointer<RealTimeEvoked> m_pRTE;
215  bool m_bInitialized;
217  QList<RealTimeSampleArrayChInfo> m_qListChInfo;
218  FiffInfo m_fiffInfo;
220  QAction* m_pActionSelectSensors;
222  QSharedPointer<SelectionManagerWindow> m_pSelectionManagerWindow;
223  QSharedPointer<ChInfoModel> m_pChInfoModel;
224  bool m_bHideBadChannels;
226  QSharedPointer<EvokedModalityWidget> m_pEvokedModalityWidget;
227  QList< Modality > m_qListModalities;
228 
229  QList<qint32> m_qListCurrentSelection;
230  void applySelection();
231  void resetSelection();
232 };
233 
234 } // NAMESPACE
235 
236 #endif // REALTIMEEVOKEDWIDGET_H
xDisp library export/import macros.
FIFF measurement file information.
Definition: fiff_info.h:96
Declaration of the MeasurementWidget Class.
#define XDISPSHARED_EXPORT
Definition: xdisp_global.h:55
QSharedPointer< NewMeasurement > SPtr
The RealTimeMultiSampleArrayNewWidget class provides a real-time curve display.
The EvokedModalityWidget class provides the sensor selection widget.
Declaration of the RealTimeEvokedModel Class.
The MeasurementWidget class is the base class of all measurement widgets.
The RealTimeEvokedModel class implements the data access model for a real-time multi sample array dat...
Declaration of the EvokedModalityWidget Class.