author | unc0rr |
Tue, 21 Oct 2008 16:53:34 +0000 | |
changeset 1391 | 735f6d43780b |
parent 1366 | eba12c22f8ca |
child 1790 | c84223511ca8 |
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> |
164 | 25 |
|
1210 | 26 |
#include "hwmap.h" |
27 |
||
164 | 28 |
class QPushButton; |
1209 | 29 |
class IconedGroupBox; |
30 |
class QListWidget; |
|
164 | 31 |
|
249 | 32 |
class MapFileErrorException |
33 |
{ |
|
34 |
}; |
|
35 |
||
164 | 36 |
class HWMapContainer : public QWidget |
37 |
{ |
|
38 |
Q_OBJECT |
|
320 | 39 |
|
164 | 40 |
public: |
41 |
HWMapContainer(QWidget * parent=0); |
|
42 |
QString getCurrentSeed() const; |
|
249 | 43 |
QString getCurrentMap() const; |
44 |
QString getCurrentTheme() const; |
|
164 | 45 |
|
46 |
public slots: |
|
47 |
void changeImage(); |
|
320 | 48 |
void setSeed(const QString & seed); |
49 |
void setMap(const QString & map); |
|
50 |
void setTheme(const QString & theme); |
|
164 | 51 |
|
325 | 52 |
signals: |
53 |
void seedChanged(const QString & seed); |
|
54 |
void mapChanged(const QString & map); |
|
55 |
void themeChanged(const QString & theme); |
|
56 |
||
57 |
||
164 | 58 |
private slots: |
59 |
void setImage(const QImage newImage); |
|
249 | 60 |
void mapChanged(int index); |
320 | 61 |
void setRandomSeed(); |
1318 | 62 |
void setRandomTheme(); |
1215 | 63 |
void themeSelected(int currentRow); |
164 | 64 |
|
65 |
protected: |
|
66 |
virtual void resizeEvent ( QResizeEvent * event ); |
|
67 |
||
68 |
private: |
|
1209 | 69 |
QGridLayout mainLayout; |
164 | 70 |
QPushButton* imageButt; |
249 | 71 |
QComboBox* chooseMap; |
1209 | 72 |
IconedGroupBox* gbThemes; |
73 |
QListWidget* lwThemes; |
|
169
a78d4a552500
new more working, but still not completely working version :)
displacer
parents:
168
diff
changeset
|
74 |
HWMap* pMap; |
164 | 75 |
QString m_seed; |
331 | 76 |
|
77 |
void loadMap(int index); |
|
164 | 78 |
}; |
79 |
||
80 |
#endif // _HWMAP_CONTAINER_INCLUDED |