From bd0f3345a938b35ce6a12f6150373b0955b8dd12 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 10 Jul 2011 15:24:15 -0500 Subject: Add Qt3 development HEAD version --- examples/opengl/glpixmap/glbox.h | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 examples/opengl/glpixmap/glbox.h (limited to 'examples/opengl/glpixmap/glbox.h') diff --git a/examples/opengl/glpixmap/glbox.h b/examples/opengl/glpixmap/glbox.h new file mode 100644 index 0000000..d6a78ad --- /dev/null +++ b/examples/opengl/glpixmap/glbox.h @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for Qt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +/**************************************************************************** +** +** This is a simple QGLWidget displaying a box +** +****************************************************************************/ + +#ifndef GLBOX_H +#define GLBOX_H + +#include + + +class GLBox : public QGLWidget +{ + Q_OBJECT + +public: + + GLBox( QWidget* parent, const char* name, const QGLWidget* shareWidget=0 ); + GLBox( const QGLFormat& format, QWidget* parent, const char* name, + const QGLWidget* shareWidget=0 ); + ~GLBox(); + + void copyRotation( const GLBox& fromBox ); + +public slots: + + void setXRotation( int degrees ); + void setYRotation( int degrees ); + void setZRotation( int degrees ); + +protected: + + void initializeGL(); + void paintGL(); + void resizeGL( int w, int h ); + + virtual GLuint makeObject(); + +private: + + GLuint object; + + GLfloat xRot, yRot, zRot, scale; + +}; + + +#endif // GLBOX_H -- cgit v1.2.3