uic4 port
[kdeartwork.git] / kscreensaver / kdesavers / wave.h
blob8b0118c5fce72a927972f0060bcfd1a819ac4a0e
1 //-----------------------------------------------------------------------------
2 //
3 // kwave - Partical Wave Screen Saver for KDE 2
4 //
5 // Copyright (c) Ian Reinhart Geiser 2001
6 //
7 /////
8 //NOTE:
9 // The base particle engine did not come from me, it was designed by Jeff Molofee <nehe@connect.ab.ca>
10 // I did some extensive modifications to make it work with QT's OpenGL but the base principal is about
11 // the same.
12 ////
14 #ifndef __WAVE_H__
15 #define __WAVE_H__
17 #include <qdialog.h>
18 #include <qgl.h>
19 #ifdef Q_WS_MACX
20 #include <OpenGL/glu.h>
21 #include <OpenGL/gl.h>
22 #else
23 #include <GL/glu.h>
24 #include <GL/gl.h>
25 #endif
26 #include <kscreensaver.h>
27 #include <qtimer.h>
28 #include <qimage.h>
29 #include "ui_wavecfg.h"
32 class Wave : public QGLWidget
34 Q_OBJECT
36 public:
37 Wave( QWidget * parent=0, const char * name=0 );
38 ~Wave();
40 protected:
41 /** paint the GL view */
42 void paintGL ();
43 /** resize the gl view */
44 void resizeGL ( int w, int h );
45 /** setup the GL enviroment */
46 void initializeGL ();
49 private:
51 GLUnurbsObj *pNurb;
52 GLint nNumPoints;
53 // float ctrlPoints[4][4][3];
54 // float knots[8];
55 int index;
56 bool LoadGLTextures();
57 GLuint texture[1];
58 QImage tex;
62 class KWaveSaver : public KScreenSaver
64 Q_OBJECT
65 public:
66 KWaveSaver( WId drawable );
67 virtual ~KWaveSaver();
68 void readSettings();
69 public slots:
70 void blank();
72 private:
73 Wave *wave;
74 QTimer *timer;
77 class KWaveSetup : public QDialog, public Ui::SetupUi
79 Q_OBJECT
80 public:
81 KWaveSetup( QWidget *parent = 0L );
82 ~KWaveSetup( );
83 protected:
84 void readSettings();
86 private slots:
87 void slotOkPressed();
88 void aboutPressed();
89 private:
90 KWaveSaver *saver;
91 float size;
92 float stars;
95 #endif