From c90c389a8a8d9d8661e9772ec4144c5cf2039f23 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- kolf/objects/test/test.h | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 kolf/objects/test/test.h (limited to 'kolf/objects/test/test.h') 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 +#include + +#include + +#include +#include + +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 -- cgit v1.2.1