diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | c90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch) | |
tree | 6d8391395bce9eaea4ad78958617edb20c6a7573 /konquest/planet_info.h | |
download | tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konquest/planet_info.h')
-rw-r--r-- | konquest/planet_info.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/konquest/planet_info.h b/konquest/planet_info.h new file mode 100644 index 00000000..4080f6b9 --- /dev/null +++ b/konquest/planet_info.h @@ -0,0 +1,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_ + |