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.
142 lines
2.2 KiB
142 lines
2.2 KiB
15 years ago
|
#ifndef __SOLARWINDS_H__
|
||
|
#define __SOLARWINDS_H__
|
||
|
//============================================================================
|
||
|
//
|
||
|
// Terence Welsh Screensaver - Solar Winds
|
||
|
// http://www.reallyslick.com/
|
||
|
//
|
||
|
// Ported to KDE by Karl Robillard
|
||
|
//
|
||
|
//============================================================================
|
||
|
|
||
|
|
||
14 years ago
|
#include <tqgl.h>
|
||
15 years ago
|
|
||
|
|
||
|
#define LIGHTSIZE 64
|
||
|
|
||
|
|
||
|
class wind;
|
||
14 years ago
|
class TQTimer;
|
||
15 years ago
|
|
||
13 years ago
|
class SWindsWidget : public TQGLWidget
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
|
||
|
public:
|
||
|
|
||
|
enum eDefault
|
||
|
{
|
||
|
Regular,
|
||
|
CosmicStrings,
|
||
|
ColdPricklies,
|
||
|
SpaceFur,
|
||
|
Jiggly,
|
||
|
Undertow,
|
||
|
|
||
|
DefaultModes
|
||
|
};
|
||
|
|
||
14 years ago
|
SWindsWidget( TQWidget* parent=0, const char* name=0 );
|
||
15 years ago
|
~SWindsWidget();
|
||
|
|
||
|
void updateParameters();
|
||
|
void setDefaults( int which );
|
||
|
|
||
|
protected:
|
||
|
|
||
|
void paintGL();
|
||
|
void resizeGL( int w, int h );
|
||
|
void initializeGL();
|
||
|
#ifdef UNIT_TEST
|
||
14 years ago
|
void keyPressEvent( TQKeyEvent* );
|
||
15 years ago
|
#endif
|
||
|
|
||
|
private slots:
|
||
|
|
||
|
void nextFrame();
|
||
|
|
||
|
private:
|
||
|
|
||
|
wind* _winds;
|
||
|
unsigned char lightTexture[LIGHTSIZE][LIGHTSIZE];
|
||
|
|
||
|
int dWinds;
|
||
|
int dEmitters;
|
||
|
int dParticles;
|
||
|
int dGeometry;
|
||
|
float dSize;
|
||
|
int dParticlespeed;
|
||
|
int dEmitterspeed;
|
||
|
int dWindspeed;
|
||
|
int dBlur;
|
||
|
|
||
|
|
||
14 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.
|
||
14 years ago
|
TQTimer* _timer;
|
||
15 years ago
|
int _frameTime;
|
||
|
|
||
|
friend class wind;
|
||
|
};
|
||
|
|
||
|
|
||
|
#ifndef UNIT_TEST
|
||
|
#include <kdialogbase.h>
|
||
12 years ago
|
#include <tdescreensaver.h>
|
||
15 years ago
|
|
||
|
|
||
|
class KSWindsScreenSaver : public KScreenSaver
|
||
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
|
||
|
public:
|
||
|
|
||
|
KSWindsScreenSaver( WId id );
|
||
|
virtual ~KSWindsScreenSaver();
|
||
|
|
||
|
int mode() const { return _mode; }
|
||
|
|
||
|
public slots:
|
||
|
|
||
|
void setMode( int );
|
||
|
|
||
|
private:
|
||
|
|
||
|
void readSettings();
|
||
|
|
||
|
SWindsWidget* _flux;
|
||
|
int _mode;
|
||
|
};
|
||
|
|
||
|
|
||
14 years ago
|
class TQComboBox;
|
||
15 years ago
|
|
||
|
class KSWindsSetup : public KDialogBase
|
||
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
|
||
|
public:
|
||
|
|
||
14 years ago
|
KSWindsSetup( TQWidget* parent = 0, const char* name = 0 );
|
||
15 years ago
|
~KSWindsSetup();
|
||
|
|
||
|
private slots:
|
||
|
|
||
|
void slotHelp();
|
||
|
void slotOk();
|
||
|
|
||
|
private:
|
||
|
|
||
14 years ago
|
TQComboBox* modeW;
|
||
15 years ago
|
KSWindsScreenSaver* _saver;
|
||
|
};
|
||
|
#endif
|
||
|
|
||
|
|
||
|
#endif //__SOLARWINDS_H__
|