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