MNE-CPP  beta 0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
glwidget.h
1 #ifndef GLWIDGET_H
2 #define GLWIDGET_H
3 
4 #include <QGLWidget>
5 
6 
7 class GLWidget : public QGLWidget
8 {
9  Q_OBJECT
10 
11 public:
12  GLWidget( QWidget *parent = 0);
13  ~GLWidget();
14 
15  QSize minimumSizeHint() const;
16  QSize sizeHint() const;
17 
18 public slots:
19 
20 signals:
21 
22 protected:
23  void initializeGL();
24  void paintGL();
25  void resizeGL(int width, int height);
26  void mousePressEvent(QMouseEvent *event);
27  void mouseMoveEvent(QMouseEvent *event);
28  void mouseReleaseEvent(QMouseEvent *event);
29  //void paintEvent(QPaintEvent *);
30 
31 private:
32  QPoint startPos;
33  QPoint lastPos;
34  QPoint MovePos;
35  QColor qtGreen;
36  QColor qtPurple;
37 
38 public:
39  void drawLines(float * samples, int row, int col, int wise_type,QVector <float> x, QVector <float> y, float w, float h);
40  void drawOneLine(float * samples, int row, int col, int wise_type, int chanIndx, float x, float y, float w, float h);
41  void SetGLView(float xleft, float xright, float ydown, float ytop);
42  void drawBoxes(QVector <float> x, QVector <float> y, float w, float h);
43  void SetXYScales(float xCoordScale, float yCoordScale);
44  void SetOnset(float ons);
45  void SetVScale(float v);
46  void SetBoxMode(bool boxmode);
47  void SetLabelMode(bool labelmode);
48  void SetLabels(QList <QString> labels,QVector <float> x,QVector <float> y);
49  void DrawLabels();
50 public:
51  int NumLines;
52  int NumBoxes;
53  float VScale;
54  float Onset;
55  bool NeedBox;
56  bool NeedLabel;
57  float xCoordScale, yCoordScale;
58  float xl,xr,yt,yd;
59  QList <QString> mlabels;
60  QVector <float> mx;
61  QVector <float> my;
62 
63  bool DragMode;
64 };
65 
66 
67 #endif // GLWIDGET_H