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 | c90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch) | |
tree | 6d8391395bce9eaea4ad78958617edb20c6a7573 /kolf/objects/test/test.h | |
download | tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.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/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kolf/objects/test/test.h')
-rw-r--r-- | kolf/objects/test/test.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/kolf/objects/test/test.h b/kolf/objects/test/test.h new file mode 100644 index 00000000..3086a578 --- /dev/null +++ b/kolf/objects/test/test.h @@ -0,0 +1,56 @@ +#ifndef KOLFTEST_H +#define KOLFTEST_H + +#include <qcanvas.h> +#include <qobject.h> + +#include <klibloader.h> + +#include <kolf/canvasitem.h> +#include <kolf/object.h> + +class KConfig; + +class TestFactory : KLibFactory { Q_OBJECT public: QObject *createObject(QObject *, const char *, const char *, const QStringList & = QStringList()); }; + +class Test : public QCanvasEllipse, public CanvasItem +{ +public: + Test(QCanvas *canvas); + + virtual Config *config(QWidget *parent); + virtual void save(KConfig *cfg); + virtual void load(KConfig *cfg); + + virtual void advance(int phase); + + int switchEvery() const { return m_switchEvery / 2; } + void setSwitchEvery(int news) { m_switchEvery = news * 2; } + +private: + int count; + int m_switchEvery; +}; + +class TestConfig : public Config +{ + Q_OBJECT + +public: + TestConfig(Test *test, QWidget *parent); + +private slots: + void switchEveryChanged(int news); + +private: + Test *m_test; +}; + +class TestObj : public Object +{ +public: + TestObj() { m_name = i18n("Flash"); m__name = "flash"; m_author = "Jason Katz-Brown"; } + virtual QCanvasItem *newObject(QCanvas *canvas) { return new Test(canvas); } +}; + +#endif |