summaryrefslogtreecommitdiffstats
path: root/konquest/minimap.h
blob: 9d205abb76fcd4fc9fd245fe0b8af6446ed1c8af (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
#ifndef _MINIMAP_H
#define _MINIMAP_H

#include <qwidget.h>
#include <qframe.h>
#include <qpixmap.h>
#include <qgridview.h>
#include <qtimer.h>

#include "gamecore.h"
#include "images.h"


class MiniMap : public QGridView
{
    Q_OBJECT

    // Constructors
public:
    MiniMap( QWidget *parent = 0, const char* name = 0 );
    virtual ~MiniMap();

    void setMap( Map *newMap );

protected:
    void paintCell( QPainter *p, int row, int col );

private slots:
    void mapUpdate();

private:
    int SECTOR_HEIGHT;
    int SECTOR_WIDTH;

    int BOARD_HEIGHT;
    int BOARD_WIDTH;

    void drawSector( QPainter *, Sector & );

    Map *map;
};


#endif // _MINIMAP_H_