Blame view

qtSpectrumDisplay.h 1.15 KB
8ffb8373   dmayerich   Improved material...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  #ifndef GLWIDGET_H
  #define GLWIDGET_H
  
  #include <QtOpenGL/QGLWidget>
  #include "globals.h"
  
  class qtSpectrumDisplay : public QGLWidget
  {
      Q_OBJECT
  
  public:
      qtSpectrumDisplay(QWidget *parent = 0);
      ~qtSpectrumDisplay();
  
      QSize minimumSizeHint() const;
      QSize sizeHint() const;
  
  public slots:
      /*void setXRotation(int angle);
      void setYRotation(int angle);
      void setZRotation(int angle);*/
  
  signals:
      void xRotationChanged(int angle);
      void yRotationChanged(int angle);
      void zRotationChanged(int angle);
  
  protected:
      void initializeGL();
      void paintGL();
      void resizeGL(int width, int height);
      void mousePressEvent(QMouseEvent *event);
      void mouseMoveEvent(QMouseEvent *event);
  
  private:
      //GLuint makeObject();
      void quad(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2,
                GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4);
      //void extrude(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
      void normalizeAngle(int *angle);
      void printWavenumber(int wn);
  
      GLuint object;
      int xRot;
      int yRot;
      int zRot;
      QPoint lastPos;
      QColor qtGreen;
      QColor qtPurple;
  };
  
  #endif