MNE-CPP  beta 1.0
realtimemultisamplearraywidget.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef REALTIMEMULTISAMPLEARRAYWIDGET_H
37 #define REALTIMEMULTISAMPLEARRAYWIDGET_H
38 
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include "xdisp_global.h"
46 #include "newmeasurementwidget.h"
49 
52 #include "helpers/selectionmanagerwindow.h"
53 #include "helpers/chinfomodel.h"
54 
55 
56 //*************************************************************************************************************
57 //=============================================================================================================
58 // QT INCLUDES
59 //=============================================================================================================
60 
61 #include <QSharedPointer>
62 #include <QList>
63 #include <QMap>
64 #include <QTableView>
65 #include <QAction>
66 #include <QSpinBox>
67 #include <QDoubleSpinBox>
68 
69 
70 //*************************************************************************************************************
71 //=============================================================================================================
72 // FORWARD DECLARATIONS
73 //=============================================================================================================
74 
75 class QTime;
76 
77 namespace XMEASLIB
78 {
79 class NewRealTimeMultiSampleArray;
80 }
81 
82 
83 //*************************************************************************************************************
84 //=============================================================================================================
85 // DEFINE NAMESPACE XDISPLIB
86 //=============================================================================================================
87 
88 namespace XDISPLIB
89 {
90 
91 //*************************************************************************************************************
92 //=============================================================================================================
93 // FORWARD DECLARATIONS
94 //=============================================================================================================
95 
96 
97 //*************************************************************************************************************
98 //=============================================================================================================
99 // USED NAMESPACES
100 //=============================================================================================================
101 
102 using namespace XMEASLIB;
103 
104 
105 //*************************************************************************************************************
106 //=============================================================================================================
107 // ENUMERATIONS
108 //=============================================================================================================
109 
112 //* Tool enumeration.
113 //*/
114 //enum Tool
115 //{
116 // Freeze = 0, /**< Freezing tool. */
117 // Annotation = 1 /**< Annotation tool. */
118 //};
119 
120 
121 //=============================================================================================================
128 {
129  Q_OBJECT
130 
132 
133 public:
134  //=========================================================================================================
142  RealTimeMultiSampleArrayWidget(QSharedPointer<NewRealTimeMultiSampleArray> pRTMSA_New, QSharedPointer<QTime> &pTime, QWidget* parent = 0);
143 
144  //=========================================================================================================
149 
150  //=========================================================================================================
156  virtual void update(XMEASLIB::NewMeasurement::SPtr pMeasurement);
157 
158  //=========================================================================================================
162  virtual void init();
163 
164 public slots:
165  //=========================================================================================================
171  void channelContextMenu(QPoint pos);
172 
173 protected:
174  //=========================================================================================================
180  virtual void resizeEvent(QResizeEvent* event);
181 
182  //=========================================================================================================
189  virtual void keyPressEvent(QKeyEvent * keyEvent);
190 
191  //=========================================================================================================
198  virtual void mousePressEvent(QMouseEvent* mouseEvent);
199 
200  //=========================================================================================================
207  virtual void mouseMoveEvent(QMouseEvent* mouseEvent);
208 
209  //=========================================================================================================
216  virtual void mouseReleaseEvent(QMouseEvent* event);
217 
218  //=========================================================================================================
225  virtual void mouseDoubleClickEvent(QMouseEvent* event);
226 
227  //=========================================================================================================
231  void showChScalingWidget();
232 
233  //=========================================================================================================
240  virtual void wheelEvent(QWheelEvent* wheelEvent);
241 
242 signals:
243  //=========================================================================================================
249  void fiffFileUpdated(const FiffInfo&);
250 
251 private:
252  //=========================================================================================================
256  void broadcastScaling();
257 
258  //=========================================================================================================
264  void zoomChanged(double zoomFac);
265 
266  //=========================================================================================================
272  void timeWindowChanged(int T);
273 
274  //=========================================================================================================
278  void showProjectionWidget();
279 
280  //=========================================================================================================
284  void showSensorSelectionWidget();
285 
286  //=========================================================================================================
292  void showSelectedChannelsOnly(QStringList selectedChannels);
293 
294  RealTimeMultiSampleArrayModel* m_pRTMSAModel;
295  RealTimeMultiSampleArrayDelegate* m_pRTMSADelegate;
296  QTableView* m_pTableView;
298  float m_fDefaultSectionSize;
299  float m_fZoomFactor;
300  QDoubleSpinBox* m_pDoubleSpinBoxZoom;
302  QSharedPointer<NewRealTimeMultiSampleArray> m_pRTMSA;
304  bool m_bInitialized;
306  QList<RealTimeSampleArrayChInfo> m_qListChInfo;
307  FiffInfo::SPtr m_pFiffInfo;
309  qint32 m_iT;
310  float m_fSamplingRate;
311  float m_fDesiredSamplingRate;
313  QSpinBox* m_pSpinBoxTimeScale;
315  QAction* m_pActionSelectSensors;
317  QSharedPointer<SelectionManagerWindow> m_pSelectionManagerWindow;
319  QMap< qint32,float > m_qMapChScaling;
320  QAction* m_pActionChScaling;
322  QAction* m_pActionProjection;
323  QSharedPointer<ProjectorWidget> m_pProjectorSelectionWidget;
326  QStringList m_slSelectedChannels;
327  bool m_bHideBadChannels;
329  QSharedPointer<RealTimeMultiSampleArrayScalingWidget> m_pRTMSAScalingWidget;
330  QSharedPointer<ChInfoModel> m_pChInfoModel;
332  QList<qint32> m_qListCurrentSelection;
333  void applySelection();
334  void resetSelection();
335 };
336 
337 } // NAMESPACE
338 
339 #endif // REALTIMEMULTISAMPLEARRAYWIDGET_H
Declaration of the RealTimeMultiSampleArrayScalingWidget Class.
xDisp library export/import macros.
FIFF measurement file information.
Definition: fiff_info.h:96
The RealTimeMultiSampleArrayDelegate class represents a RTMSA delegate which creates the plot paths...
The EvokedModalityWidget class provides the sensor selection widget.
The RealTimeMultiSampleArrayModel class implements the data access model for a real-time multi sample...
QSharedPointer< FiffInfo > SPtr
Definition: fiff_info.h:99
Declaration of the RealTimeMultiSampleArrayDelegate Class.
Declaration of the RealTimeMultiSampleArrayModel Class.
Declaration of the MeasurementWidget Class.
#define XDISPSHARED_EXPORT
Definition: xdisp_global.h:55
QSharedPointer< NewMeasurement > SPtr
Declaration of the ProjectorWidget Class.
The MeasurementWidget class is the base class of all measurement widgets.
The RealTimeMultiSampleArrayNewWidget class provides a real-time curve display.