author | Henek |
Mon, 13 Dec 2010 04:52:23 +0100 | |
changeset 4513 | 1dd97c710f5a |
parent 4511 | df827e70ae63 |
child 4519 | aee36896d46b |
permissions | -rw-r--r-- |
164 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
486 | 3 |
* Copyright (c) 2006, 2007 Igor Ulyanov <iulyanov@gmail.com> |
164 | 4 |
* |
184 | 5 |
* This program is free software; you can redistribute it and/or modify |
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
164 | 8 |
* |
184 | 9 |
* This program is distributed in the hope that it will be useful, |
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
164 | 13 |
* |
184 | 14 |
* You should have received a copy of the GNU General Public License |
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
164 | 17 |
*/ |
18 |
||
19 |
#ifndef _HWMAP_CONTAINER_INCLUDED |
|
20 |
#define _HWMAP_CONTAINER_INCLUDED |
|
21 |
||
22 |
#include <QWidget> |
|
1209 | 23 |
#include <QGridLayout> |
249 | 24 |
#include <QComboBox> |
1802 | 25 |
#include <QLabel> |
4489 | 26 |
#include <QByteArray> |
164 | 27 |
|
1210 | 28 |
#include "hwmap.h" |
29 |
||
164 | 30 |
class QPushButton; |
1209 | 31 |
class IconedGroupBox; |
32 |
class QListWidget; |
|
164 | 33 |
|
249 | 34 |
class MapFileErrorException |
35 |
{ |
|
36 |
}; |
|
37 |
||
164 | 38 |
class HWMapContainer : public QWidget |
39 |
{ |
|
40 |
Q_OBJECT |
|
320 | 41 |
|
164 | 42 |
public: |
43 |
HWMapContainer(QWidget * parent=0); |
|
44 |
QString getCurrentSeed() const; |
|
249 | 45 |
QString getCurrentMap() const; |
46 |
QString getCurrentTheme() const; |
|
1790 | 47 |
int getCurrentHHLimit() const; |
4513
1dd97c710f5a
added general scripts to multiplayer and added option for scripts to allow user set schemes or weapon sets.
Henek
parents:
4511
diff
changeset
|
48 |
QString getCurrentScheme() const; |
1dd97c710f5a
added general scripts to multiplayer and added option for scripts to allow user set schemes or weapon sets.
Henek
parents:
4511
diff
changeset
|
49 |
QString getCurrentWeapons() const; |
1802 | 50 |
quint32 getTemplateFilter() const; |
3133 | 51 |
MapGenerator get_mapgen(void) const; |
52 |
int get_maze_size(void) const; |
|
3008 | 53 |
bool getCurrentIsMission() const; |
4489 | 54 |
QByteArray getDrawnMapData(); |
164 | 55 |
|
56 |
public slots: |
|
57 |
void changeImage(); |
|
320 | 58 |
void setSeed(const QString & seed); |
59 |
void setMap(const QString & map); |
|
60 |
void setTheme(const QString & theme); |
|
1797 | 61 |
void setTemplateFilter(int); |
3133 | 62 |
void setMapgen(MapGenerator m); |
63 |
void setMaze_size(int size); |
|
164 | 64 |
|
325 | 65 |
signals: |
66 |
void seedChanged(const QString & seed); |
|
67 |
void mapChanged(const QString & map); |
|
68 |
void themeChanged(const QString & theme); |
|
1802 | 69 |
void newTemplateFilter(int filter); |
3133 | 70 |
void mapgenChanged(MapGenerator m); |
71 |
void maze_sizeChanged(int s); |
|
4511 | 72 |
void drawMapRequested(); |
325 | 73 |
|
164 | 74 |
private slots: |
75 |
void setImage(const QImage newImage); |
|
1790 | 76 |
void setHHLimit(int hhLimit); |
249 | 77 |
void mapChanged(int index); |
320 | 78 |
void setRandomSeed(); |
1318 | 79 |
void setRandomTheme(); |
4337 | 80 |
void setRandomMap(); |
81 |
void setRandomStatic(); |
|
82 |
void setRandomMission(); |
|
1215 | 83 |
void themeSelected(int currentRow); |
1790 | 84 |
void addInfoToPreview(QPixmap image); |
1802 | 85 |
void templateFilterChanged(int filter); |
164 | 86 |
|
87 |
protected: |
|
88 |
virtual void resizeEvent ( QResizeEvent * event ); |
|
89 |
||
90 |
private: |
|
1209 | 91 |
QGridLayout mainLayout; |
164 | 92 |
QPushButton* imageButt; |
249 | 93 |
QComboBox* chooseMap; |
1209 | 94 |
IconedGroupBox* gbThemes; |
95 |
QListWidget* lwThemes; |
|
169
a78d4a552500
new more working, but still not completely working version :)
displacer
parents:
168
diff
changeset
|
96 |
HWMap* pMap; |
164 | 97 |
QString m_seed; |
1790 | 98 |
int hhLimit; |
1797 | 99 |
int templateFilter; |
1790 | 100 |
QPixmap hhSmall; |
1802 | 101 |
QLabel* lblFilter; |
102 |
QComboBox* CB_TemplateFilter; |
|
3133 | 103 |
QLabel *maze_size_label; |
104 |
QComboBox *maze_size_selection; |
|
105 |
MapGenerator mapgen; |
|
4489 | 106 |
QByteArray drawnMapData; |
4337 | 107 |
int numMissions; |
3133 | 108 |
int maze_size; |
331 | 109 |
|
110 |
void loadMap(int index); |
|
164 | 111 |
}; |
112 |
||
113 |
#endif // _HWMAP_CONTAINER_INCLUDED |