source: additional/scripts/OpenGLQT_exemple/src/glwidget.h@ 1297

Last change on this file since 1297 was 561, checked in by garnier, 18 years ago

r563@mac-90108: laurentgarnier | 2007-08-14 12:28:16 +0200
mise a jour suite au plantage de svk (cheksum error) suite au crash du DD en juin

File size: 1.2 KB
Line 
1#ifndef GLWIDGET_H
2#define GLWIDGET_H
3
4#include <QGLWidget>
5
6 class GLWidget : public QGLWidget
7 {
8/* Q_OBJECT */
9
10 public:
11 GLWidget(QWidget *parent = 0);
12 ~GLWidget();
13 void initializeGL();
14 void initialize();
15 void resizeGL(int width, int height);
16 void paintGL();
17
18/* QSize minimumSizeHint() const; */
19/* QSize sizeHint() const; */
20
21 protected:
22 void setXRotation(int angle);
23 void setYRotation(int angle);
24 void setZRotation(int angle);
25
26/* signals: */
27/* void xRotationChanged(int angle); */
28/* void yRotationChanged(int angle); */
29/* void zRotationChanged(int angle); */
30
31 void mousePressEvent(QMouseEvent*);
32 void mouseMoveEvent(QMouseEvent*);
33 void normalizeAngle(int *angle);
34
35 private:
36 GLuint makeObject();
37 void quad(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2,
38 GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4);
39 void extrude(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
40
41 GLuint object;
42 int xRot;
43 int yRot;
44 int zRot;
45 float reelXRot;
46 float realYRot;
47 float realZRot;
48 QPoint lastPos;
49 QColor trolltechGreen;
50 QColor trolltechPurple;
51 };
52
53 #endif
Note: See TracBrowser for help on using the repository browser.