#ifndef GLWIDGET_H
#define GLWIDGET_H
#include <QGLWidget>
#include "window.h"
{
Q_OBJECT
public:
~GLWidget();
QSize minimumSizeHint
() const;
public slots:
void setXRotation(int angle);
void setYRotation(int angle);
void setZRotation(int angle);
void setHighlighted();
signals:
void xRotationChanged(int angle);
void yRotationChanged(int angle);
void zRotationChanged(int angle);
protected:
void initializeGL();
void paintGL();
void resizeGL(int width, int height);
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);
GLuint object;
int xRot;
int yRot;
int zRot;
};
#endif
#ifndef GLWIDGET_H
#define GLWIDGET_H
#include <QGLWidget>
#include "window.h"
class GLWidget : public QGLWidget
{
Q_OBJECT
public:
GLWidget(QWidget *parent = 0);
~GLWidget();
QSize minimumSizeHint() const;
QSize sizeHint() const;
public slots:
void setXRotation(int angle);
void setYRotation(int angle);
void setZRotation(int angle);
void setHighlighted();
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);
GLuint object;
int xRot;
int yRot;
int zRot;
QPoint lastPos;
QColor trolltechGreen;
QColor trolltechPurple;
QColor Purple;
};
#endif
To copy to clipboard, switch view to plain text mode
Bookmarks