diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-26 13:16:15 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-26 13:16:15 -0600 |
commit | 7e09b5c2efae58399621a938de26b9675b8ba621 (patch) | |
tree | de2c9535e1f4c48ae91910492d298eba1d593fd5 /tdescreensaver/kdesavers/SolarWinds.h | |
parent | 159f7e147ac33c924b3ce9050c8f03cbc54916ee (diff) | |
download | tdeartwork-7e09b5c2efae58399621a938de26b9675b8ba621.tar.gz tdeartwork-7e09b5c2efae58399621a938de26b9675b8ba621.zip |
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdescreensaver/kdesavers/SolarWinds.h')
-rw-r--r-- | tdescreensaver/kdesavers/SolarWinds.h | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/tdescreensaver/kdesavers/SolarWinds.h b/tdescreensaver/kdesavers/SolarWinds.h new file mode 100644 index 00000000..c8a7688a --- /dev/null +++ b/tdescreensaver/kdesavers/SolarWinds.h @@ -0,0 +1,141 @@ +#ifndef __SOLARWINDS_H__ +#define __SOLARWINDS_H__ +//============================================================================ +// +// Terence Welsh Screensaver - Solar Winds +// http://www.reallyslick.com/ +// +// Ported to KDE by Karl Robillard +// +//============================================================================ + + +#include <tqgl.h> + + +#define LIGHTSIZE 64 + + +class wind; +class TQTimer; + +class SWindsWidget : public TQGLWidget +{ + Q_OBJECT + + +public: + + enum eDefault + { + Regular, + CosmicStrings, + ColdPricklies, + SpaceFur, + Jiggly, + Undertow, + + DefaultModes + }; + + SWindsWidget( TQWidget* parent=0, const char* name=0 ); + ~SWindsWidget(); + + void updateParameters(); + void setDefaults( int which ); + +protected: + + void paintGL(); + void resizeGL( int w, int h ); + void initializeGL(); +#ifdef UNIT_TEST + void keyPressEvent( TQKeyEvent* ); +#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; + + + // Using TQTimer rather than timerEvent() to avoid getting locked out of + // the TQEvent loop on lower-end systems. Ian Geiser <geiseri@kde.org> + // says this is the way to go. + TQTimer* _timer; + int _frameTime; + + friend class wind; +}; + + +#ifndef UNIT_TEST +#include <kdialogbase.h> +#include <tdescreensaver.h> + + +class KSWindsScreenSaver : public KScreenSaver +{ + Q_OBJECT + + +public: + + KSWindsScreenSaver( WId id ); + virtual ~KSWindsScreenSaver(); + + int mode() const { return _mode; } + +public slots: + + void setMode( int ); + +private: + + void readSettings(); + + SWindsWidget* _flux; + int _mode; +}; + + +class TQComboBox; + +class KSWindsSetup : public KDialogBase +{ + Q_OBJECT + + +public: + + KSWindsSetup( TQWidget* parent = 0, const char* name = 0 ); + ~KSWindsSetup(); + +private slots: + + void slotHelp(); + void slotOk(); + +private: + + TQComboBox* modeW; + KSWindsScreenSaver* _saver; +}; +#endif + + +#endif //__SOLARWINDS_H__ |