diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ae2a03c2941bf92573f89b88ef73f8aa842bea0a (patch) | |
tree | 3566563f3fb6ac3cb3496669d8f233062d3091bc /ktux/sprite.h | |
download | tdetoys-ae2a03c2941bf92573f89b88ef73f8aa842bea0a.tar.gz tdetoys-ae2a03c2941bf92573f89b88ef73f8aa842bea0a.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/kdetoys@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ktux/sprite.h')
-rw-r--r-- | ktux/sprite.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/ktux/sprite.h b/ktux/sprite.h new file mode 100644 index 0000000..d93e285 --- /dev/null +++ b/ktux/sprite.h @@ -0,0 +1,72 @@ +//----------------------------------------------------------------------------- +// +// ksprite - QCanvas based screensaver +// +// Copyright (c) Martin R. Jones 1996 +// + +#ifndef __SPRITE_H__ +#define __SPRITE_H__ + +#include <qtimer.h> +#include <qpushbutton.h> +#include <qptrlist.h> +#include <qstrlist.h> +#include <qcanvas.h> +#include <kscreensaver.h> +#include "spriteanim.h" + +//----------------------------------------------------------------------------- +class KSpriteSaver : public KScreenSaver +{ + Q_OBJECT +public: + KSpriteSaver( WId id ); + virtual ~KSpriteSaver(); + + void setSpeed(int speed); + +private: + void readSettings(); + void initialise(); + void blank(); + +protected slots: + void slotTimeout(); + +protected: + virtual void timerEvent(QTimerEvent *); + +protected: + QCanvas *mCanvas; + QCanvasView *mView; + QTimer mTimer; + int mSpeed; + QPtrList<SpriteGroup> mGroups; + QMemArray<int> mTimerIds; +}; + +class KSpriteSetup : public QDialog +{ + Q_OBJECT +public: + KSpriteSetup( QWidget *parent = NULL, const char *name = NULL ); + ~KSpriteSetup(); + +protected: + void readSettings(); + +private slots: + void slotSpeed(int s); + void slotOkPressed(); + void slotAbout(); + +private: + int speed; + QWidget *preview; + KSpriteSaver *saver; +}; + + +#endif + |