summaryrefslogtreecommitdiffstats
path: root/kpacman/status.h
blob: 94fd09e6478a36db57e9ac01b36bbce51070b9c8 (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
64
65
66
67
68
69
70
71
72
73
74
#ifndef STATUS_H
#define STATUS_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <kapp.h>
#include <tdeconfig.h>

#include <ntqwidget.h>
#include <ntqpixmap.h>
#include <ntqstring.h>
#include <ntqarray.h>

#include <ntqstrlist.h>
#include <ntqregexp.h>

class Status : public TQWidget
{
    Q_OBJECT
public:
    Status(TQWidget *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(TQPaintEvent *);
    int minHeight();
    int minWidth();

    TQString decodeHexOctString(TQString str);

    void fillArray(TQArray<int> &, TQString, int);
    void fillStrList(TQStrList &, TQString, int);
    void fillPixmapName(TQStrList &);

    void confScheme();
    void confLevels(bool defGroup=TRUE);
    void confMisc(bool defGroup=TRUE);

    void initPixmaps();

private:
    TQArray<int> levelPos;
    int actualLifes;
    int actualLevel;

    TQString pixmapDirectory;

    TQStrList lifesPixmapName;
    TQStrList levelPixmapName;

    TQString lastLifesPixmapName;
    TQString lastLevelPixmapName;

    TQPtrList<TQPixmap> *loadPixmap(TQWidget *parent, TQString pixmapName,
                               TQPtrList<TQPixmap> *pixmaps=0);

    TQPtrList<TQPixmap> *lifesPix;
    TQPtrList<TQPixmap> *levelPix;

    int maxLevel;
    int level;

    int scheme;
    int mode;
};

#endif // STATUS_H