summaryrefslogtreecommitdiffstats
path: root/kscreensaver/kdesavers/Euphoria.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit8b2aa1b5301ab60368a03e36df4ff5216726e87d (patch)
tree36163d4ee667c23b5cf232df2f3004cd0a76202a /kscreensaver/kdesavers/Euphoria.h
downloadtdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.tar.gz
tdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscreensaver/kdesavers/Euphoria.h')
-rw-r--r--kscreensaver/kdesavers/Euphoria.h155
1 files changed, 155 insertions, 0 deletions
diff --git a/kscreensaver/kdesavers/Euphoria.h b/kscreensaver/kdesavers/Euphoria.h
new file mode 100644
index 00000000..b7de2677
--- /dev/null
+++ b/kscreensaver/kdesavers/Euphoria.h
@@ -0,0 +1,155 @@
+#ifndef __EUPHORIASS_H__
+#define __EUPHORIASS_H__
+//============================================================================
+//
+// Terence Welsh Screensaver - Euphoria
+// http://www.reallyslick.com/
+//
+// KDE port by Karl Robillard
+//
+//============================================================================
+
+
+#include <qgl.h>
+
+#include <kdialogbase.h>
+
+class wisp;
+class QTimer;
+
+class EuphoriaWidget : public QGLWidget
+{
+ Q_OBJECT
+
+public:
+
+ enum eDefault
+ {
+ Regular,
+ Grid,
+ Cubism,
+ BadMath,
+ MTheory,
+ UHFTEM, // ultra high frequency tunneling electron microscope
+ Nowhere,
+ Echo,
+ Kaleidoscope,
+ DefaultModes
+ };
+
+ EuphoriaWidget( QWidget* parent=0, const char* name=0 );
+ ~EuphoriaWidget();
+
+ void updateParameters();
+ void setDefaults( int which );
+
+protected:
+
+ void paintGL();
+ void resizeGL( int w, int h );
+ void initializeGL();
+#ifdef UNIT_TEST
+ void keyPressEvent( QKeyEvent* );
+#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;
+
+
+ // Using QTimer rather than timerEvent() to avoid getting locked out of
+ // the QEvent loop on lower-end systems. Ian Geiser <geiseri@kde.org>
+ // says this is the way to go.
+ QTimer* _timer;
+ int _frameTime;
+
+ friend class wisp;
+};
+
+
+#ifndef UNIT_TEST
+#include <qdialog.h>
+#include <kscreensaver.h>
+
+
+class KEuphoriaScreenSaver : public KScreenSaver
+{
+ Q_OBJECT
+
+public:
+
+ KEuphoriaScreenSaver( WId id );
+ virtual ~KEuphoriaScreenSaver();
+
+ int mode() const { return _mode; }
+
+public slots:
+
+ void setMode( int );
+
+private:
+
+ void readSettings();
+
+ EuphoriaWidget* _effect;
+ int _mode;
+};
+
+
+class QComboBox;
+
+class KEuphoriaSetup : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ KEuphoriaSetup( QWidget* parent = 0, const char* name = 0 );
+ ~KEuphoriaSetup();
+
+private slots:
+ void slotHelp();
+ void slotOk();
+
+private:
+ QComboBox* modeW;
+ KEuphoriaScreenSaver* _saver;
+};
+#endif
+
+#endif //__EUPHORIASS_H__