summaryrefslogtreecommitdiffstats
path: root/tdescreensaver/kdesavers/Flux.h
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-01-26 13:16:15 -0600
committerTimothy Pearson <[email protected]>2013-01-26 13:16:15 -0600
commit7e09b5c2efae58399621a938de26b9675b8ba621 (patch)
treede2c9535e1f4c48ae91910492d298eba1d593fd5 /tdescreensaver/kdesavers/Flux.h
parent159f7e147ac33c924b3ce9050c8f03cbc54916ee (diff)
downloadtdeartwork-7e09b5c2efae58399621a938de26b9675b8ba621.tar.gz
tdeartwork-7e09b5c2efae58399621a938de26b9675b8ba621.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdescreensaver/kdesavers/Flux.h')
-rw-r--r--tdescreensaver/kdesavers/Flux.h150
1 files changed, 150 insertions, 0 deletions
diff --git a/tdescreensaver/kdesavers/Flux.h b/tdescreensaver/kdesavers/Flux.h
new file mode 100644
index 00000000..f1a98780
--- /dev/null
+++ b/tdescreensaver/kdesavers/Flux.h
@@ -0,0 +1,150 @@
+#ifndef __FLUXSS_H__
+#define __FLUXSS_H__
+//============================================================================
+//
+// Terence Welsh Screensaver - Flux
+// http://www.reallyslick.com/
+//
+// Ported to KDE by Karl Robillard
+//
+//============================================================================
+
+
+#include <tqgl.h>
+
+
+#define LIGHTSIZE 64
+
+
+class flux;
+class particle;
+class TQTimer;
+
+class FluxWidget : public TQGLWidget
+{
+ Q_OBJECT
+
+
+public:
+
+ enum eDefault
+ {
+ Regular,
+ Hypnotic,
+ Insane,
+ Sparklers,
+ Paradigm,
+ Galactic,
+ DefaultModes
+ };
+
+ FluxWidget( TQWidget* parent=0, const char* name=0 );
+ ~FluxWidget();
+
+ void setDefaults( int which );
+ void updateParameters();
+
+protected:
+
+ void paintGL();
+ void resizeGL( int w, int h );
+ void initializeGL();
+#ifdef UNIT_TEST
+ void keyPressEvent( TQKeyEvent* );
+#endif
+
+private slots:
+
+ void nextFrame();
+
+private:
+
+ float lumdiff;
+ float cameraAngle;
+ float cosCameraAngle, sinCameraAngle;
+ unsigned char lightTexture[LIGHTSIZE][LIGHTSIZE];
+
+ int dFluxes;
+ int dParticles;
+ int dTrail;
+ int dGeometry;
+ float dSize;
+ int dComplexity;
+ int dRandomize;
+ int dExpansion;
+ int dRotation;
+ int dWind;
+ float dInstability;
+ int dBlur;
+ int dSmart;
+ int dPriority;
+
+ flux* _fluxes;
+
+ // Using TQTimer rather than timerEvent() to avoid getting locked out of
+ // the TQEvent loop on lower-end systems. Ian Geiser <[email protected]>
+ // says this is the way to go.
+ TQTimer* _timer;
+ int _frameTime;
+
+ friend class flux;
+ friend class particle;
+};
+
+
+#ifndef UNIT_TEST
+#include <kdialogbase.h>
+#include <tdescreensaver.h>
+
+
+class KFluxScreenSaver : public KScreenSaver
+{
+ Q_OBJECT
+
+
+public:
+
+ KFluxScreenSaver( WId id );
+ virtual ~KFluxScreenSaver();
+
+ int mode() const { return _mode; }
+
+public slots:
+
+ void setMode( int );
+
+private:
+
+ void readSettings();
+
+ FluxWidget* _flux;
+ int _mode;
+};
+
+
+class TQComboBox;
+
+class KFluxSetup : public KDialogBase
+{
+ Q_OBJECT
+
+
+public:
+
+ KFluxSetup( TQWidget* parent = 0, const char* name = 0 );
+ ~KFluxSetup();
+
+private slots:
+
+ void slotHelp();
+ void slotOk();
+
+private:
+
+ TQComboBox* modeW;
+ KFluxScreenSaver* _saver;
+};
+#endif
+
+
+#endif //__FLUXSS_H__