blob: 4080f6b9c60eeac331b282e5e62070bd7878a5d6 (
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
|
#ifndef _PLANET_INFO_H_
#define _PLANET_INFO_H_
#include <qframe.h>
#include <qstring.h>
#include <qptrlist.h>
#include <qpalette.h>
#include "gamecore.h"
class QLabel;
struct planet_info_buffer {
Planet *planet;
int production;
int ships;
float killRate;
};
typedef QPtrList<planet_info_buffer> PlanetInfoList;
typedef QPtrListIterator<planet_info_buffer> PlanetInfoListIterator;
class PlanetInfo : public QFrame
{
Q_OBJECT
public:
PlanetInfo( QWidget *parent, QPalette palette );
virtual ~PlanetInfo();
void setPlanetList( PlanetList &newPlanets );
void rescanPlanets();
QSize sizeHint() const;
public slots:
void showPlanet( Planet * );
private:
void emptyPlanetInfoList();
void clearDisplay();
PlanetList *planets;
PlanetInfoList planet_stats;
QLabel *name;
QLabel *owner;
QLabel *ships;
QLabel *production;
QLabel *kill_percent;
};
#endif // _PLANET_INFO_H_
|