You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
1.6 KiB
101 lines
1.6 KiB
15 years ago
|
//-----------------------------------------------------------------------------
|
||
|
//
|
||
|
// 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__
|
||
|
|
||
15 years ago
|
#include <tqdialog.h>
|
||
|
#include <tqgl.h>
|
||
14 years ago
|
#ifdef TQ_WS_MACX
|
||
15 years ago
|
#include <OpenGL/glu.h>
|
||
|
#include <OpenGL/gl.h>
|
||
|
#else
|
||
|
#include <GL/glu.h>
|
||
|
#include <GL/gl.h>
|
||
|
#endif
|
||
12 years ago
|
#include <tdescreensaver.h>
|
||
15 years ago
|
#include <tqtimer.h>
|
||
|
#include <tqimage.h>
|
||
15 years ago
|
#include "wavecfg.h"
|
||
|
|
||
|
|
||
14 years ago
|
class Wave : public TQGLWidget
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
|
||
|
public:
|
||
15 years ago
|
Wave( TQWidget * parent=0, const char * name=0 );
|
||
15 years ago
|
~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];
|
||
15 years ago
|
TQImage tex;
|
||
15 years ago
|
|
||
|
};
|
||
|
|
||
|
class KWaveSaver : public KScreenSaver
|
||
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
public:
|
||
|
KWaveSaver( WId drawable );
|
||
|
virtual ~KWaveSaver();
|
||
|
void readSettings();
|
||
|
public slots:
|
||
|
void blank();
|
||
|
|
||
|
private:
|
||
|
Wave *wave;
|
||
15 years ago
|
TQTimer *timer;
|
||
15 years ago
|
};
|
||
|
|
||
|
class KWaveSetup : public SetupUi
|
||
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
public:
|
||
15 years ago
|
KWaveSetup( TQWidget *parent = NULL, const char *name = NULL );
|
||
15 years ago
|
~KWaveSetup( );
|
||
|
protected:
|
||
|
void readSettings();
|
||
|
|
||
|
private slots:
|
||
|
void slotOkPressed();
|
||
|
void aboutPressed();
|
||
|
private:
|
||
|
KWaveSaver *saver;
|
||
|
float size;
|
||
|
float stars;
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
|
||
|
|