Last change
on this file since 1089 was
562,
checked in by garnier, 17 years ago
|
r565@mac-90108: laurentgarnier | 2007-08-14 14:18:03 +0200
mise a jour suite au plantage de svk (cheksum error) suite au crash du DD en juin
|
File size:
1.1 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 | |
---|
14 | QSize minimumSizeHint() const; |
---|
15 | QSize sizeHint() const; |
---|
16 | |
---|
17 | public slots: |
---|
18 | void setXRotation(int angle); |
---|
19 | void setYRotation(int angle); |
---|
20 | void setZRotation(int angle); |
---|
21 | |
---|
22 | signals: |
---|
23 | void xRotationChanged(int angle); |
---|
24 | void yRotationChanged(int angle); |
---|
25 | void zRotationChanged(int angle); |
---|
26 | |
---|
27 | protected: |
---|
28 | void initializeGL(); |
---|
29 | void paintGL(); |
---|
30 | void resizeGL(int width, int height); |
---|
31 | void mousePressEvent(QMouseEvent *event); |
---|
32 | void mouseMoveEvent(QMouseEvent *event); |
---|
33 | |
---|
34 | private: |
---|
35 | GLuint makeObject(); |
---|
36 | void quad(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2, |
---|
37 | GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4); |
---|
38 | void extrude(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); |
---|
39 | void normalizeAngle(int *angle); |
---|
40 | |
---|
41 | GLuint object; |
---|
42 | int xRot; |
---|
43 | int yRot; |
---|
44 | int zRot; |
---|
45 | QPoint lastPos; |
---|
46 | QColor trolltechGreen; |
---|
47 | QColor trolltechPurple; |
---|
48 | }; |
---|
49 | |
---|
50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.