summaryrefslogtreecommitdiffstats
path: root/kscreensaver/kdesavers/wave.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit8b2aa1b5301ab60368a03e36df4ff5216726e87d (patch)
tree36163d4ee667c23b5cf232df2f3004cd0a76202a /kscreensaver/kdesavers/wave.h
downloadtdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.tar.gz
tdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscreensaver/kdesavers/wave.h')
-rw-r--r--kscreensaver/kdesavers/wave.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/kscreensaver/kdesavers/wave.h b/kscreensaver/kdesavers/wave.h
new file mode 100644
index 00000000..ea2f64f3
--- /dev/null
+++ b/kscreensaver/kdesavers/wave.h
@@ -0,0 +1,97 @@
+//-----------------------------------------------------------------------------
+//
+// kwave - Partical Wave Screen Saver for KDE 2
+//
+// Copyright (c) Ian Reinhart Geiser 2001
+//
+/////
+//NOTE:
+// The base particle engine did not come from me, it was designed by Jeff Molofee <nehe@connect.ab.ca>
+// I did some extensive modifications to make it work with QT's OpenGL but the base principal is about
+// the same.
+////
+
+#ifndef __WAVE_H__
+#define __WAVE_H__
+
+#include <qdialog.h>
+#include <qgl.h>
+#ifdef Q_WS_MACX
+#include <OpenGL/glu.h>
+#include <OpenGL/gl.h>
+#else
+#include <GL/glu.h>
+#include <GL/gl.h>
+#endif
+#include <kscreensaver.h>
+#include <qtimer.h>
+#include <qimage.h>
+#include "wavecfg.h"
+
+
+class Wave : public QGLWidget
+{
+Q_OBJECT
+
+public:
+ Wave( QWidget * parent=0, const char * name=0 );
+ ~Wave();
+
+protected:
+ /** paint the GL view */
+ void paintGL ();
+ /** resize the gl view */
+ void resizeGL ( int w, int h );
+ /** setup the GL enviroment */
+ void initializeGL ();
+
+
+private:
+//
+ GLUnurbsObj *pNurb;
+ GLint nNumPoints;
+// float ctrlPoints[4][4][3];
+// float knots[8];
+ int index;
+ bool LoadGLTextures();
+ GLuint texture[1];
+ QImage tex;
+
+};
+
+class KWaveSaver : public KScreenSaver
+{
+Q_OBJECT
+public:
+ KWaveSaver( WId drawable );
+ virtual ~KWaveSaver();
+ void readSettings();
+public slots:
+ void blank();
+
+private:
+ Wave *wave;
+ QTimer *timer;
+};
+
+class KWaveSetup : public SetupUi
+{
+ Q_OBJECT
+public:
+ KWaveSetup( QWidget *parent = NULL, const char *name = NULL );
+ ~KWaveSetup( );
+protected:
+ void readSettings();
+
+private slots:
+ void slotOkPressed();
+ void aboutPressed();
+private:
+ KWaveSaver *saver;
+ float size;
+ float stars;
+};
+
+#endif
+
+