author | unc0rr |
Thu, 06 Sep 2007 15:31:52 +0000 | |
changeset 585 | 7531ae5b146e |
parent 486 | 7ea71cd3acd5 |
child 1066 | 1f1b3686a2b0 |
permissions | -rw-r--r-- |
164 | 1 |
/* |
2 |
* Hedgewars, a worms-like 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 "hwmap.h" |
|
23 |
||
24 |
#include <QWidget> |
|
25 |
#include <QVBoxLayout> |
|
249 | 26 |
#include <QComboBox> |
164 | 27 |
|
28 |
class QPushButton; |
|
29 |
||
249 | 30 |
class MapFileErrorException |
31 |
{ |
|
32 |
}; |
|
33 |
||
164 | 34 |
class HWMapContainer : public QWidget |
35 |
{ |
|
36 |
Q_OBJECT |
|
320 | 37 |
|
164 | 38 |
public: |
39 |
HWMapContainer(QWidget * parent=0); |
|
40 |
QString getCurrentSeed() const; |
|
249 | 41 |
QString getCurrentMap() const; |
42 |
QString getCurrentTheme() const; |
|
164 | 43 |
|
44 |
public slots: |
|
45 |
void changeImage(); |
|
320 | 46 |
void setSeed(const QString & seed); |
47 |
void setMap(const QString & map); |
|
48 |
void setTheme(const QString & theme); |
|
164 | 49 |
|
325 | 50 |
signals: |
51 |
void seedChanged(const QString & seed); |
|
52 |
void mapChanged(const QString & map); |
|
53 |
void themeChanged(const QString & theme); |
|
54 |
||
55 |
||
164 | 56 |
private slots: |
57 |
void setImage(const QImage newImage); |
|
249 | 58 |
void mapChanged(int index); |
320 | 59 |
void setRandomSeed(); |
164 | 60 |
|
61 |
protected: |
|
62 |
virtual void resizeEvent ( QResizeEvent * event ); |
|
63 |
||
64 |
private: |
|
65 |
QVBoxLayout mainLayout; |
|
66 |
QPushButton* imageButt; |
|
249 | 67 |
QComboBox* chooseMap; |
169
a78d4a552500
new more working, but still not completely working version :)
displacer
parents:
168
diff
changeset
|
68 |
HWMap* pMap; |
164 | 69 |
QString m_seed; |
320 | 70 |
QString theme; |
331 | 71 |
|
72 |
void loadMap(int index); |
|
164 | 73 |
}; |
74 |
||
75 |
#endif // _HWMAP_CONTAINER_INCLUDED |