author | Henek |
Mon, 13 Dec 2010 19:26:20 +0100 | |
changeset 4519 | aee36896d46b |
parent 4513 | 1dd97c710f5a |
child 4520 | e7882bd1a894 |
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> |
4519 | 27 |
#include <QLineEdit> |
164 | 28 |
|
1210 | 29 |
#include "hwmap.h" |
30 |
||
164 | 31 |
class QPushButton; |
1209 | 32 |
class IconedGroupBox; |
33 |
class QListWidget; |
|
164 | 34 |
|
249 | 35 |
class MapFileErrorException |
36 |
{ |
|
37 |
}; |
|
38 |
||
164 | 39 |
class HWMapContainer : public QWidget |
40 |
{ |
|
41 |
Q_OBJECT |
|
320 | 42 |
|
164 | 43 |
public: |
44 |
HWMapContainer(QWidget * parent=0); |
|
45 |
QString getCurrentSeed() const; |
|
249 | 46 |
QString getCurrentMap() const; |
47 |
QString getCurrentTheme() const; |
|
1790 | 48 |
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
|
49 |
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
|
50 |
QString getCurrentWeapons() const; |
1802 | 51 |
quint32 getTemplateFilter() const; |
3133 | 52 |
MapGenerator get_mapgen(void) const; |
53 |
int get_maze_size(void) const; |
|
3008 | 54 |
bool getCurrentIsMission() const; |
4489 | 55 |
QByteArray getDrawnMapData(); |
164 | 56 |
|
57 |
public slots: |
|
58 |
void changeImage(); |
|
320 | 59 |
void setSeed(const QString & seed); |
60 |
void setMap(const QString & map); |
|
61 |
void setTheme(const QString & theme); |
|
1797 | 62 |
void setTemplateFilter(int); |
3133 | 63 |
void setMapgen(MapGenerator m); |
64 |
void setMaze_size(int size); |
|
164 | 65 |
|
325 | 66 |
signals: |
67 |
void seedChanged(const QString & seed); |
|
68 |
void mapChanged(const QString & map); |
|
69 |
void themeChanged(const QString & theme); |
|
1802 | 70 |
void newTemplateFilter(int filter); |
3133 | 71 |
void mapgenChanged(MapGenerator m); |
72 |
void maze_sizeChanged(int s); |
|
4511 | 73 |
void drawMapRequested(); |
325 | 74 |
|
164 | 75 |
private slots: |
76 |
void setImage(const QImage newImage); |
|
1790 | 77 |
void setHHLimit(int hhLimit); |
249 | 78 |
void mapChanged(int index); |
320 | 79 |
void setRandomSeed(); |
1318 | 80 |
void setRandomTheme(); |
4337 | 81 |
void setRandomMap(); |
82 |
void setRandomStatic(); |
|
83 |
void setRandomMission(); |
|
1215 | 84 |
void themeSelected(int currentRow); |
1790 | 85 |
void addInfoToPreview(QPixmap image); |
1802 | 86 |
void templateFilterChanged(int filter); |
4519 | 87 |
void seedEdited(const QString & seed); |
164 | 88 |
|
89 |
protected: |
|
90 |
virtual void resizeEvent ( QResizeEvent * event ); |
|
91 |
||
92 |
private: |
|
1209 | 93 |
QGridLayout mainLayout; |
164 | 94 |
QPushButton* imageButt; |
249 | 95 |
QComboBox* chooseMap; |
1209 | 96 |
IconedGroupBox* gbThemes; |
97 |
QListWidget* lwThemes; |
|
169
a78d4a552500
new more working, but still not completely working version :)
displacer
parents:
168
diff
changeset
|
98 |
HWMap* pMap; |
164 | 99 |
QString m_seed; |
4519 | 100 |
QLineEdit* seedEdit; |
1790 | 101 |
int hhLimit; |
1797 | 102 |
int templateFilter; |
1790 | 103 |
QPixmap hhSmall; |
1802 | 104 |
QLabel* lblFilter; |
105 |
QComboBox* CB_TemplateFilter; |
|
3133 | 106 |
QLabel *maze_size_label; |
107 |
QComboBox *maze_size_selection; |
|
108 |
MapGenerator mapgen; |
|
4489 | 109 |
QByteArray drawnMapData; |
4337 | 110 |
int numMissions; |
3133 | 111 |
int maze_size; |
331 | 112 |
|
113 |
void loadMap(int index); |
|
164 | 114 |
}; |
115 |
||
116 |
#endif // _HWMAP_CONTAINER_INCLUDED |