MNE-CPP  beta 1.0
cluststcview.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef CLUSTSTCVIEW_H
37 #define CLUSTSTCVIEW_H
38 
39 //*************************************************************************************************************
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "../disp3D_global.h"
45 
46 
47 //*************************************************************************************************************
48 //=============================================================================================================
49 // Qt INCLUDES
50 //=============================================================================================================
51 
52 #include "qglview.h"
53 #include <QGeometryData>
54 #include <QGLColorMaterial>
55 #include <QSharedPointer>
56 #include <QList>
57 #include <QVector>
58 #include <QMap>
59 
60 
61 //*************************************************************************************************************
62 //=============================================================================================================
63 // DEFINE NAMESPACE DISP3DLIB
64 //=============================================================================================================
65 
66 namespace DISP3DLIB
67 {
68 
69 
70 //*************************************************************************************************************
71 //=============================================================================================================
72 // FORWARD DECLARATIONS
73 //=============================================================================================================
74 
75 class ClustStcModel;
76 
77 //=============================================================================================================
83 class DISP3DSHARED_EXPORT ClustStcView : public QGLView
84 {
85  Q_OBJECT
86 public:
87  typedef QSharedPointer<ClustStcView> SPtr;
88  typedef QSharedPointer<const ClustStcView> ConstSPtr;
90  ClustStcView(bool showRegions = true, bool isStereo = true, QGLView::StereoType stereo = QGLView::RedCyanAnaglyph, QWindow *parent = 0);
91 
92  ~ClustStcView();
93 
94  void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int> ());
95 
96  void setModel(ClustStcModel* model);
97 
98 protected:
99  //=========================================================================================================
105  void initializeGL(QGLPainter *painter);
106 
107  //=========================================================================================================
113  void paintGL(QGLPainter *painter);
114 
115  //=========================================================================================================
121  void keyPressEvent(QKeyEvent *e);
122 
123  //=========================================================================================================
129  void mouseMoveEvent(QMouseEvent *e);
130 
131  //=========================================================================================================
137  void mousePressEvent(QMouseEvent *e);
138 
139 
140 private:
141  ClustStcModel* m_pModel;
142 
143  bool m_bIsInitialized;
144 
145  bool m_bShowRegions;
146 
147  bool m_bStereo;
148  QGLView::StereoType m_stereoType;
149 
150  float m_fOffsetZ;
151  float m_fOffsetZEye;
152  QGLSceneNode *m_pSceneNodeBrain;
153  QGLSceneNode *m_pSceneNode;
155  QGLLightModel *m_pLightModel;
156  QGLLightParameters *m_pLightParametersScene;
158  bool m_bColorize;
159 
160  QGLColorMaterial material;
161 
162  QMap<qint32, qint32> m_qMapLabelIdIndex;
163 
164 };
165 
166 } // NAMESPACE
167 
168 #endif // CLUSTSTCVIEW_H
Table model which prepares source estimate information.
QSharedPointer< const ClustStcView > ConstSPtr
Definition: cluststcview.h:88
QSharedPointer< ClustStcView > SPtr
Definition: cluststcview.h:87
#define DISP3DSHARED_EXPORT
Definition: disp3D_global.h:57