You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
1.7 KiB
89 lines
1.7 KiB
15 years ago
|
//-----------------------------------------------------------------------------
|
||
|
//
|
||
|
// 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__
|
||
|
|
||
14 years ago
|
#include <tqtimer.h>
|
||
|
#include <tqcolor.h>
|
||
12 years ago
|
#include <tdescreensaver.h>
|
||
15 years ago
|
#include <kdialogbase.h>
|
||
|
|
||
|
// See lorenz.cpp for this private class
|
||
|
class Matrix3D;
|
||
|
|
||
|
class KLorenzSaver : public KScreenSaver
|
||
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
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:
|
||
14 years ago
|
TQTimer timer;
|
||
15 years ago
|
int colorContext;
|
||
|
|
||
|
private:
|
||
|
void readSettings();
|
||
|
|
||
|
private:
|
||
|
double x, y, z, t;
|
||
|
double speed, epoch, zrot, yrot, xrot, crate;
|
||
|
int e;
|
||
|
Matrix3D *mat;
|
||
|
};
|
||
|
|
||
14 years ago
|
class TQSlider;
|
||
15 years ago
|
|
||
|
class KLorenzSetup : public KDialogBase
|
||
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
public:
|
||
14 years ago
|
KLorenzSetup(TQWidget *parent = 0, const char *name = 0 );
|
||
15 years ago
|
~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:
|
||
14 years ago
|
TQWidget *preview;
|
||
|
TQSlider *sps, *eps, *zrs, *yrs, *xrs, *crs;
|
||
15 years ago
|
KLorenzSaver *saver;
|
||
|
int speed, epoch, zrot, yrot, xrot, crate;
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
|