summaryrefslogtreecommitdiffstats
path: root/kscreensaver/kdesavers/lorenz.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/lorenz.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/lorenz.h')
-rw-r--r--kscreensaver/kdesavers/lorenz.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/kscreensaver/kdesavers/lorenz.h b/kscreensaver/kdesavers/lorenz.h
new file mode 100644
index 00000000..f666db71
--- /dev/null
+++ b/kscreensaver/kdesavers/lorenz.h
@@ -0,0 +1,86 @@
+//-----------------------------------------------------------------------------
+//
+// Lorenz - Lorenz Attractor screen saver
+// Nicolas Brodu, brodu@kde.org, 2000
+//
+// Portions of code from kblankscrn and khop.
+// See authors there.
+//
+// I release my code as GPL, but see the other headers and the README
+
+#ifndef __LORENZKSCRN_H__
+#define __LORENZKSCRN_H__
+
+#include <qtimer.h>
+#include <qcolor.h>
+#include <kscreensaver.h>
+#include <kdialogbase.h>
+
+// See lorenz.cpp for this private class
+class Matrix3D;
+
+class KLorenzSaver : public KScreenSaver
+{
+ Q_OBJECT
+public:
+ KLorenzSaver( WId id );
+ virtual ~KLorenzSaver();
+ void setSpeed(int num);
+ void setEpoch(int num);
+ void setCRate(int num);
+ void setZRot(int num);
+ void setYRot(int num);
+ void setXRot(int num);
+ void updateMatrix();
+ void newEpoch();
+
+protected slots:
+ void drawOnce();
+
+protected:
+ QTimer timer;
+ int colorContext;
+
+private:
+ void readSettings();
+
+private:
+ double x, y, z, t;
+ double speed, epoch, zrot, yrot, xrot, crate;
+ int e;
+ Matrix3D *mat;
+};
+
+class QSlider;
+
+class KLorenzSetup : public KDialogBase
+{
+ Q_OBJECT
+public:
+ KLorenzSetup(QWidget *parent = 0, const char *name = 0 );
+ ~KLorenzSetup();
+
+protected:
+ void readSettings();
+
+private slots:
+ void slotSpeed(int num);
+ void slotEpoch(int num);
+ void slotCRate(int num);
+ void slotZRot(int num);
+ void slotYRot(int num);
+ void slotXRot(int num);
+
+ void slotOk();
+ void slotHelp();
+ void slotDefault();
+
+private:
+ QWidget *preview;
+ QSlider *sps, *eps, *zrs, *yrs, *xrs, *crs;
+ KLorenzSaver *saver;
+ int speed, epoch, zrot, yrot, xrot, crate;
+};
+
+#endif
+