blob: c8fa68381bc8ba983c91e0aa535e392108bb0b60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#ifndef KOLFTEST_H
#define KOLFTEST_H
#include <tqcanvas.h>
#include <tqobject.h>
#include <klibloader.h>
#include <kolf/canvasitem.h>
#include <kolf/object.h>
class KConfig;
class TestFactory : KLibFactory {
Q_OBJECT
TQ_OBJECT
public:
TQObject *createObject(TQObject *, const char *, const char *, const TQStringList & = TQStringList());
};
class Test : public TQCanvasEllipse, public CanvasItem
{
public:
Test(TQCanvas *canvas);
virtual Config *config(TQWidget *tqparent);
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
TQ_OBJECT
public:
TestConfig(Test *test, TQWidget *tqparent);
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 TQCanvasItem *newObject(TQCanvas *canvas) { return new Test(canvas); }
};
#endif
|