Home · All Namespaces · All Classes · Main Classes · Grouped Classes · Modules · Functions

glbox.h Example File
activeqt/opengl/glbox.h

 /****************************************************************************
 **
 ** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
 ** Contact: Qt Software Information (qt-info@nokia.com)
 **
 ** This file is part of the example classes of the Qt Toolkit.
 **
 ** Commercial Usage
 ** Licensees holding valid Qt Commercial licenses may use this file in
 ** accordance with the Qt Commercial License Agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and Nokia.
 **
 **
 ** If you are unsure which license is appropriate for your use, please
 ** contact the sales department at qt-sales@nokia.com.
 **
 ****************************************************************************/

 /****************************************************************************
 **
 ** This is a simple QGLWidget displaying an openGL wireframe box
 **
 ****************************************************************************/

 #ifndef GLBOX_H
 #define GLBOX_H

 #include <QtOpenGL>
 #include <QAxBindable>

 class GLBox : public QGLWidget,
               public QAxBindable
 {
     Q_OBJECT

 public:

     GLBox( QWidget* parent, const char* name = 0 );
     ~GLBox();

     QAxAggregated *createAggregate();

 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


Copyright © 2008 Nokia Trademarks
Qt 4.4.3