blob: e408b2dd448e60e78809c90ca6c1aa0de5d38064 (
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
|
#ifndef _MAP_WIDGET_H
#define _MAP_WIDGET_H
#include <tqwidget.h>
#include <tqframe.h>
#include <tqpixmap.h>
#include <tqgridview.h>
#include <tqtimer.h>
#include "gamecore.h"
#include "images.h"
class ConquestMap : public TQGridView
{
Q_OBJECT
TQ_OBJECT
// Constructors
public:
ConquestMap( Map *newMap, TQWidget *tqparent = 0 );
virtual ~ConquestMap();
// Interface
public:
void unselectPlanet();
protected:
virtual void contentsMousePressEvent( TQMouseEvent *e );
virtual void contentsMouseMoveEvent( TQMouseEvent *e );
virtual void paintCell( TQPainter *p, int row, int col );
private slots:
void mapUpdate();
void squareBlink();
signals:
void planetSelected( Planet * );
void planetHighlighted( Planet * );
private:
const int SECTOR_HEIGHT;
const int SECTOR_WIDTH;
const int BOARD_HEIGHT;
const int BOARD_WIDTH;
void drawSector( TQPainter *, Sector &, bool borderStrobe = true, bool highlight = false );
Map *map;
TQColor gridColor;
TQFont labelFont;
int hiLiteRow, hiLiteCol;
};
#endif
|