summaryrefslogtreecommitdiff
path: root/noncore/games/kpacman/status.h
authorleseb <leseb>2002-04-15 22:40:28 (UTC)
committer leseb <leseb>2002-04-15 22:40:28 (UTC)
commita91544d04ed391bbdc0c6f95ff8a80d35190788c (patch) (unidiff)
tree85dea85fd8a1cdb6d2d18fef57753d0b5e4bd143 /noncore/games/kpacman/status.h
parent6396d8b9fca7f3f50010a13a26e4ee9569abefb3 (diff)
downloadopie-a91544d04ed391bbdc0c6f95ff8a80d35190788c.zip
opie-a91544d04ed391bbdc0c6f95ff8a80d35190788c.tar.gz
opie-a91544d04ed391bbdc0c6f95ff8a80d35190788c.tar.bz2
New directory structure
Diffstat (limited to 'noncore/games/kpacman/status.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kpacman/status.h78
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
23class Status : public QWidget
24{
25 Q_OBJECT
26public:
27 Status(QWidget *parent=0, const char *name=0, int scheme=-1, int mode=-1);
28 ~Status() {};
29
30public slots:
31 void setScheme(int scheme, int mode);
32 void setLevel(int level);
33 void setLifes(int lifes);
34
35protected:
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
52private:
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