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) (side-by-side diff)
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 @@
+#ifndef STATUS_H
+#define STATUS_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "portable.h"
+
+#if defined( KDE2_PORT )
+#include <kapp.h>
+#include <kconfig.h>
+#endif
+
+#include <qwidget.h>
+#include <qpixmap.h>
+#include <qstring.h>
+#include <qarray.h>
+#include <qlist.h>
+#include <qstrlist.h>
+#include <qregexp.h>
+
+class Status : public QWidget
+{
+ Q_OBJECT
+public:
+ Status(QWidget *parent=0, const char *name=0, int scheme=-1, int mode=-1);
+ ~Status() {};
+
+public slots:
+ void setScheme(int scheme, int mode);
+ void setLevel(int level);
+ void setLifes(int lifes);
+
+protected:
+ void paintEvent(QPaintEvent *);
+ int minHeight();
+ int minWidth();
+
+ QString decodeHexOctString(QString str);
+
+ void fillArray(QArray<int> &, QString, int);
+ void fillStrList(QStrList &, QString, int);
+ void fillPixmapName(QStrList &);
+
+ void confScheme();
+ void confLevels(bool defGroup=TRUE);
+ void confMisc(bool defGroup=TRUE);
+
+ void initPixmaps();
+
+private:
+ QArray<int> levelPos;
+ int actualLifes;
+ int actualLevel;
+
+ QString pixmapDirectory;
+
+ QStrList lifesPixmapName;
+ QStrList levelPixmapName;
+
+ QString lastLifesPixmapName;
+ QString lastLevelPixmapName;
+
+ QList<QPixmap> *loadPixmap(QWidget *parent, QString pixmapName,
+ QList<QPixmap> *pixmaps=0);
+
+ QList<QPixmap> *lifesPix;
+ QList<QPixmap> *levelPix;
+
+ int maxLevel;
+ int level;
+
+ int scheme;
+ int mode;
+};
+
+#endif // STATUS_H