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/map_widget.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/map_widget.h')
-rw-r--r-- | konquest/map_widget.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/konquest/map_widget.h b/konquest/map_widget.h new file mode 100644 index 00000000..052d6e9d --- /dev/null +++ b/konquest/map_widget.h @@ -0,0 +1,59 @@ +#ifndef _MAP_WIDGET_H +#define _MAP_WIDGET_H + + +#include <qwidget.h> +#include <qframe.h> +#include <qpixmap.h> + +#include <qgridview.h> + +#include <qtimer.h> + +#include "gamecore.h" +#include "images.h" + +class ConquestMap : public QGridView +{ + Q_OBJECT + + // Constructors +public: + ConquestMap( Map *newMap, QWidget *parent = 0 ); + virtual ~ConquestMap(); + + // Interface +public: + void unselectPlanet(); + +protected: + virtual void contentsMousePressEvent( QMouseEvent *e ); + virtual void contentsMouseMoveEvent( QMouseEvent *e ); + virtual void paintCell( QPainter *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( QPainter *, Sector &, bool borderStrobe = true, bool highlight = false ); + + Map *map; + QColor gridColor; + QFont labelFont; + + int hiLiteRow, hiLiteCol; +}; + + +#endif |