SVN_SILENT made messages (.desktop file)
[kdeartwork.git] / kscreensaver / kdesavers / Euphoria.h
blobe59f42639a22df6404b176915b4933a4af3c16e0
1 /*
2 * Terence Welsh Screensaver - Euphoria
3 * http://www.reallyslick.com/
5 * Ported to KDE by Karl Robillard
6 * Copyright (C) 2002 Terence M. Welsh
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef EUPHORIASS_H
23 #define EUPHORIASS_H
25 #include <qgl.h>
27 #include <kdialog.h>
29 class wisp;
30 class QTimer;
32 class EuphoriaWidget : public QGLWidget
34 Q_OBJECT
36 public:
38 enum eDefault
40 Regular,
41 Grid,
42 Cubism,
43 BadMath,
44 MTheory,
45 UHFTEM, // ultra high frequency tunneling electron microscope
46 Nowhere,
47 Echo,
48 Kaleidoscope,
49 DefaultModes
52 EuphoriaWidget( QWidget* parent=0 );
53 ~EuphoriaWidget();
55 void updateParameters();
56 void setDefaults( int which );
58 protected:
60 void paintGL();
61 void resizeGL( int w, int h );
62 void initializeGL();
63 #ifdef UNIT_TEST
64 void keyPressEvent( QKeyEvent* );
65 #endif
67 private slots:
69 void nextFrame();
71 private:
73 GLuint texName;
74 wisp* _wisps;
75 wisp* _backwisps;
76 unsigned char* feedbackmap;
77 float aspectRatio;
78 int viewport[4];
79 double elapsedTime;
81 // feedback texture object
82 unsigned int feedbacktex;
83 int feedbacktexsize;
84 // feedback variables
85 float fr[4];
86 float fv[4];
87 float f[4];
88 // feedback limiters
89 float lr[3];
90 float lv[3];
91 float l[3];
95 int dWisps;
96 int dBackground;
97 int dDensity;
98 int dVisibility;
99 float dSpeed;
100 int dFeedback;
101 int dFeedbackspeed;
102 int dFeedbacksize;
103 int dWireframe;
104 int dTexture;
105 int dPriority;
108 // Using QTimer rather than timerEvent() to avoid getting locked out of
109 // the QEvent loop on lower-end systems. Ian Geiser <geiseri@kde.org>
110 // says this is the way to go.
111 QTimer* _timer;
112 int _frameTime;
114 friend class wisp;
118 #ifndef UNIT_TEST
119 #include <qdialog.h>
120 #include <kscreensaver.h>
123 class KEuphoriaScreenSaver : public KScreenSaver
125 Q_OBJECT
127 public:
129 KEuphoriaScreenSaver( WId id );
130 virtual ~KEuphoriaScreenSaver();
132 int mode() const { return _mode; }
134 public slots:
136 void setMode( int );
138 private:
140 void readSettings();
142 EuphoriaWidget* _effect;
143 int _mode;
147 class QComboBox;
149 class KEuphoriaSetup : public KDialog
151 Q_OBJECT
153 public:
154 KEuphoriaSetup( QWidget* parent = 0 );
155 ~KEuphoriaSetup();
157 private slots:
158 void slotHelp();
159 void slotOk();
161 private:
162 QComboBox* modeW;
163 KEuphoriaScreenSaver* _saver;
165 #endif
167 #endif //__EUPHORIASS_H__