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.
159 lines
2.6 KiB
159 lines
2.6 KiB
15 years ago
|
#ifndef __EUPHORIASS_H__
|
||
|
#define __EUPHORIASS_H__
|
||
|
//============================================================================
|
||
|
//
|
||
|
// Terence Welsh Screensaver - Euphoria
|
||
|
// http://www.reallyslick.com/
|
||
|
//
|
||
|
// KDE port by Karl Robillard
|
||
|
//
|
||
|
//============================================================================
|
||
|
|
||
|
|
||
15 years ago
|
#include <tqgl.h>
|
||
15 years ago
|
|
||
|
#include <kdialogbase.h>
|
||
|
|
||
|
class wisp;
|
||
15 years ago
|
class TQTimer;
|
||
15 years ago
|
|
||
14 years ago
|
class EuphoriaWidget : public TQGLWidget
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
|
||
|
public:
|
||
|
|
||
|
enum eDefault
|
||
|
{
|
||
|
Regular,
|
||
|
Grid,
|
||
|
Cubism,
|
||
|
BadMath,
|
||
|
MTheory,
|
||
|
UHFTEM, // ultra high frequency tunneling electron microscope
|
||
|
Nowhere,
|
||
|
Echo,
|
||
|
Kaleidoscope,
|
||
|
DefaultModes
|
||
|
};
|
||
|
|
||
15 years ago
|
EuphoriaWidget( TQWidget* parent=0, const char* name=0 );
|
||
15 years ago
|
~EuphoriaWidget();
|
||
|
|
||
|
void updateParameters();
|
||
|
void setDefaults( int which );
|
||
|
|
||
|
protected:
|
||
|
|
||
|
void paintGL();
|
||
|
void resizeGL( int w, int h );
|
||
|
void initializeGL();
|
||
|
#ifdef UNIT_TEST
|
||
15 years ago
|
void keyPressEvent( TQKeyEvent* );
|
||
15 years ago
|
#endif
|
||
|
|
||
|
private slots:
|
||
|
|
||
|
void nextFrame();
|
||
|
|
||
|
private:
|
||
|
|
||
|
GLuint texName;
|
||
|
wisp* _wisps;
|
||
|
wisp* _backwisps;
|
||
|
unsigned char* feedbackmap;
|
||
|
float aspectRatio;
|
||
|
int viewport[4];
|
||
|
double elapsedTime;
|
||
|
|
||
|
// feedback texture object
|
||
|
unsigned int feedbacktex;
|
||
|
int feedbacktexsize;
|
||
|
// feedback variables
|
||
|
float fr[4];
|
||
|
float fv[4];
|
||
|
float f[4];
|
||
|
// feedback limiters
|
||
|
float lr[3];
|
||
|
float lv[3];
|
||
|
float l[3];
|
||
|
|
||
|
|
||
|
|
||
|
int dWisps;
|
||
|
int dBackground;
|
||
|
int dDensity;
|
||
|
int dVisibility;
|
||
|
float dSpeed;
|
||
|
int dFeedback;
|
||
|
int dFeedbackspeed;
|
||
|
int dFeedbacksize;
|
||
|
int dWireframe;
|
||
|
int dTexture;
|
||
|
int dPriority;
|
||
|
|
||
|
|
||
15 years ago
|
// Using TQTimer rather than timerEvent() to avoid getting locked out of
|
||
|
// the TQEvent loop on lower-end systems. Ian Geiser <geiseri@kde.org>
|
||
15 years ago
|
// says this is the way to go.
|
||
15 years ago
|
TQTimer* _timer;
|
||
15 years ago
|
int _frameTime;
|
||
|
|
||
|
friend class wisp;
|
||
|
};
|
||
|
|
||
|
|
||
|
#ifndef UNIT_TEST
|
||
15 years ago
|
#include <tqdialog.h>
|
||
12 years ago
|
#include <tdescreensaver.h>
|
||
15 years ago
|
|
||
|
|
||
|
class KEuphoriaScreenSaver : public KScreenSaver
|
||
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
|
||
|
public:
|
||
|
|
||
|
KEuphoriaScreenSaver( WId id );
|
||
|
virtual ~KEuphoriaScreenSaver();
|
||
|
|
||
|
int mode() const { return _mode; }
|
||
|
|
||
|
public slots:
|
||
|
|
||
|
void setMode( int );
|
||
|
|
||
|
private:
|
||
|
|
||
|
void readSettings();
|
||
|
|
||
|
EuphoriaWidget* _effect;
|
||
|
int _mode;
|
||
|
};
|
||
|
|
||
|
|
||
15 years ago
|
class TQComboBox;
|
||
15 years ago
|
|
||
|
class KEuphoriaSetup : public KDialogBase
|
||
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
|
||
|
public:
|
||
15 years ago
|
KEuphoriaSetup( TQWidget* parent = 0, const char* name = 0 );
|
||
15 years ago
|
~KEuphoriaSetup();
|
||
|
|
||
|
private slots:
|
||
|
void slotHelp();
|
||
|
void slotOk();
|
||
|
|
||
|
private:
|
||
15 years ago
|
TQComboBox* modeW;
|
||
15 years ago
|
KEuphoriaScreenSaver* _saver;
|
||
|
};
|
||
|
#endif
|
||
|
|
||
|
#endif //__EUPHORIASS_H__
|