author | unc0rr |
Sun, 15 Feb 2009 14:38:02 +0000 | |
changeset 1797 | fedd8649fdd9 |
parent 1790 | c84223511ca8 |
child 1802 | dd148e2506e2 |
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; |
|
1790 | 45 |
int getCurrentHHLimit() const; |
164 | 46 |
|
47 |
public slots: |
|
48 |
void changeImage(); |
|
320 | 49 |
void setSeed(const QString & seed); |
50 |
void setMap(const QString & map); |
|
51 |
void setTheme(const QString & theme); |
|
1797 | 52 |
void setTemplateFilter(int); |
164 | 53 |
|
325 | 54 |
signals: |
55 |
void seedChanged(const QString & seed); |
|
56 |
void mapChanged(const QString & map); |
|
57 |
void themeChanged(const QString & theme); |
|
58 |
||
59 |
||
164 | 60 |
private slots: |
61 |
void setImage(const QImage newImage); |
|
1790 | 62 |
void setHHLimit(int hhLimit); |
249 | 63 |
void mapChanged(int index); |
320 | 64 |
void setRandomSeed(); |
1318 | 65 |
void setRandomTheme(); |
1215 | 66 |
void themeSelected(int currentRow); |
1790 | 67 |
void addInfoToPreview(QPixmap image); |
164 | 68 |
|
69 |
protected: |
|
70 |
virtual void resizeEvent ( QResizeEvent * event ); |
|
71 |
||
72 |
private: |
|
1209 | 73 |
QGridLayout mainLayout; |
164 | 74 |
QPushButton* imageButt; |
249 | 75 |
QComboBox* chooseMap; |
1209 | 76 |
IconedGroupBox* gbThemes; |
77 |
QListWidget* lwThemes; |
|
169
a78d4a552500
new more working, but still not completely working version :)
displacer
parents:
168
diff
changeset
|
78 |
HWMap* pMap; |
164 | 79 |
QString m_seed; |
1790 | 80 |
int hhLimit; |
1797 | 81 |
int templateFilter; |
1790 | 82 |
QPixmap hhSmall; |
331 | 83 |
|
84 |
void loadMap(int index); |
|
164 | 85 |
}; |
86 |
||
87 |
#endif // _HWMAP_CONTAINER_INCLUDED |