MNE-CPP  beta 1.0
realtimebutterflyplot.h
1 #ifndef REALTIMEBUTTERFLYPLOT_H
2 #define REALTIMEBUTTERFLYPLOT_H
3 
4 //*************************************************************************************************************
5 //=============================================================================================================
6 // INCLUDES
7 //=============================================================================================================
8 
9 #include "../xdisp_global.h"
10 
11 #include "realtimeevokedmodel.h"
12 
13 
14 //*************************************************************************************************************
15 //=============================================================================================================
16 // QT INCLUDES
17 //=============================================================================================================
18 
19 #include <QWidget>
20 #include <QPolygonF>
21 #include <QColor>
22 #include <QSharedPointer>
23 
24 
25 //*************************************************************************************************************
26 //=============================================================================================================
27 // DEFINE NAMESPACE XDISPLIB
28 //=============================================================================================================
29 
30 namespace XDISPLIB
31 {
32 
33 struct Modality;
34 
35 
37 {
38  Q_OBJECT
39 public:
40  explicit RealTimeButterflyPlot(QWidget *parent = 0);
41 
42  inline void setModel(RealTimeEvokedModel* model);
43 
44  void dataUpdate(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>& roles = QVector<int>());
45 
46  void setSettings(const QList< Modality >& p_qListModalities);
47 
48  void setSelectedChannels(const QList<int> &selectedChannels);
49 
50 protected:
51  //=========================================================================================================
58  virtual void paintEvent( QPaintEvent* event );
59 
60 private:
61  //=========================================================================================================
68  void createPlotPath(qint32 row, QPainterPath& path) const;
69 
70  bool showMAG;
71  bool showGRAD;
72  bool showEEG;
73  bool showEOG;
74  bool showMISC;
76  float fMaxMAG;
77  float fMaxGRAD;
78  float fMaxEEG;
79  float fMaxEOG;
80  float fMaxMISC;
82  RealTimeEvokedModel* m_pRealTimeEvokedModel;
83 
84  qint32 m_iNumChannels;
85 
86  bool m_bIsInit;
87 
88  QList<int> m_lSelectedChannels;
89 };
90 
91 
92 //*************************************************************************************************************
93 //=============================================================================================================
94 // INLINE DEFINITIONS
95 //=============================================================================================================
96 
97 inline void RealTimeButterflyPlot::setModel(RealTimeEvokedModel* model)
98 {
99  m_pRealTimeEvokedModel = model;
100 
101  connect(m_pRealTimeEvokedModel, &RealTimeEvokedModel::dataChanged, this, &RealTimeButterflyPlot::dataUpdate);
102 }
103 
104 } // NAMESPACE
105 
106 #endif // REALTIMEBUTTERFLYPLOT_H
#define XDISPSHARED_EXPORT
Definition: xdisp_global.h:55
Declaration of the RealTimeEvokedModel Class.
The RealTimeEvokedModel class implements the data access model for a real-time multi sample array dat...