Compile GL screensaver
[kdeartwork.git] / kscreensaver / kdesavers / lorenz.h
blob7610362796a4fe6ab3e3e70eb15bc26f48438a4a
1 //-----------------------------------------------------------------------------
2 //
3 // Lorenz - Lorenz Attractor screen saver
4 // Nicolas Brodu, brodu@kde.org, 2000
5 //
6 // Portions of code from kblankscrn and khop.
7 // See authors there.
8 //
9 // I release my code as GPL, but see the other headers and the README
11 #ifndef __LORENZKSCRN_H__
12 #define __LORENZKSCRN_H__
14 #include <qtimer.h>
15 #include <qcolor.h>
16 #include <kscreensaver.h>
17 #include <kdialog.h>
19 // See lorenz.cpp for this private class
20 class Matrix3D;
22 class KLorenzSaver : public KScreenSaver
24 Q_OBJECT
25 public:
26 KLorenzSaver( WId id );
27 virtual ~KLorenzSaver();
28 void setSpeed(int num);
29 void setEpoch(int num);
30 void setCRate(int num);
31 void setZRot(int num);
32 void setYRot(int num);
33 void setXRot(int num);
34 void updateMatrix();
35 void newEpoch();
37 protected slots:
38 void drawOnce();
40 protected:
41 QTimer timer;
43 private:
44 void readSettings();
46 private:
47 double x, y, z, t;
48 double speed, epoch, zrot, yrot, xrot, crate;
49 int e;
50 Matrix3D *mat;
53 class QSlider;
55 class KLorenzSetup : public KDialog
57 Q_OBJECT
58 public:
59 KLorenzSetup(QWidget *parent = 0, const char *name = 0 );
60 ~KLorenzSetup();
62 protected:
63 void readSettings();
65 private slots:
66 void slotSpeed(int num);
67 void slotEpoch(int num);
68 void slotCRate(int num);
69 void slotZRot(int num);
70 void slotYRot(int num);
71 void slotXRot(int num);
73 void slotOk();
74 void slotHelp();
75 void slotDefault();
77 private:
78 QWidget *preview;
79 QSlider *sps, *eps, *zrs, *yrs, *xrs, *crs;
80 KLorenzSaver *saver;
81 int speed, epoch, zrot, yrot, xrot, crate;
84 #endif