Diffstat (limited to 'noncore/games/kpacman/status.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/kpacman/status.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/noncore/games/kpacman/status.h b/noncore/games/kpacman/status.h new file mode 100644 index 0000000..4f69b02 --- a/dev/null +++ b/noncore/games/kpacman/status.h | |||
@@ -0,0 +1,78 @@ | |||
1 | #ifndef STATUS_H | ||
2 | #define STATUS_H | ||
3 | |||
4 | #ifdef HAVE_CONFIG_H | ||
5 | #include <config.h> | ||
6 | #endif | ||
7 | |||
8 | #include "portable.h" | ||
9 | |||
10 | #if defined( KDE2_PORT ) | ||
11 | #include <kapp.h> | ||
12 | #include <kconfig.h> | ||
13 | #endif | ||
14 | |||
15 | #include <qwidget.h> | ||
16 | #include <qpixmap.h> | ||
17 | #include <qstring.h> | ||
18 | #include <qarray.h> | ||
19 | #include <qlist.h> | ||
20 | #include <qstrlist.h> | ||
21 | #include <qregexp.h> | ||
22 | |||
23 | class Status : public QWidget | ||
24 | { | ||
25 | Q_OBJECT | ||
26 | public: | ||
27 | Status(QWidget *parent=0, const char *name=0, int scheme=-1, int mode=-1); | ||
28 | ~Status() {}; | ||
29 | |||
30 | public slots: | ||
31 | void setScheme(int scheme, int mode); | ||
32 | void setLevel(int level); | ||
33 | void setLifes(int lifes); | ||
34 | |||
35 | protected: | ||
36 | void paintEvent(QPaintEvent *); | ||
37 | int minHeight(); | ||
38 | int minWidth(); | ||
39 | |||
40 | QString decodeHexOctString(QString str); | ||
41 | |||
42 | void fillArray(QArray<int> &, QString, int); | ||
43 | void fillStrList(QStrList &, QString, int); | ||
44 | void fillPixmapName(QStrList &); | ||
45 | |||
46 | void confScheme(); | ||
47 | void confLevels(bool defGroup=TRUE); | ||
48 | void confMisc(bool defGroup=TRUE); | ||
49 | |||
50 | void initPixmaps(); | ||
51 | |||
52 | private: | ||
53 | QArray<int> levelPos; | ||
54 | int actualLifes; | ||
55 | int actualLevel; | ||
56 | |||
57 | QString pixmapDirectory; | ||
58 | |||
59 | QStrList lifesPixmapName; | ||
60 | QStrList levelPixmapName; | ||
61 | |||
62 | QString lastLifesPixmapName; | ||
63 | QString lastLevelPixmapName; | ||
64 | |||
65 | QList<QPixmap> *loadPixmap(QWidget *parent, QString pixmapName, | ||
66 | QList<QPixmap> *pixmaps=0); | ||
67 | |||
68 | QList<QPixmap> *lifesPix; | ||
69 | QList<QPixmap> *levelPix; | ||
70 | |||
71 | int maxLevel; | ||
72 | int level; | ||
73 | |||
74 | int scheme; | ||
75 | int mode; | ||
76 | }; | ||
77 | |||
78 | #endif // STATUS_H | ||