|
1 /* |
|
2 * Hedgewars, a free turn based strategy game |
|
3 * Copyright (c) 2006-2011 Andrey Korotaev <unC0Rr@gmail.com> |
|
4 * |
|
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 |
|
8 * |
|
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. |
|
13 * |
|
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 |
|
17 */ |
|
18 |
|
19 #ifndef GAMECONFIGWIDGET_H |
|
20 #define GAMECONFIGWIDGET_H |
|
21 |
|
22 #include <QWidget> |
|
23 #include <QStringList> |
|
24 #include <QGroupBox> |
|
25 #include <QSpinBox> |
|
26 #include <QRegExp> |
|
27 |
|
28 #include "mapContainer.h" |
|
29 |
|
30 class QCheckBox; |
|
31 class QVBoxLayout; |
|
32 class QLabel; |
|
33 class QTableView; |
|
34 |
|
35 class GameCFGWidget : public QGroupBox |
|
36 { |
|
37 Q_OBJECT |
|
38 |
|
39 public: |
|
40 GameCFGWidget(QWidget* parent); |
|
41 quint32 getGameFlags() const; |
|
42 quint32 getInitHealth() const; |
|
43 QByteArray getFullConfig() const; |
|
44 QComboBox * Scripts; |
|
45 QComboBox * GameSchemes; |
|
46 QComboBox * WeaponsName; |
|
47 HWMapContainer* pMapContainer; |
|
48 QTableView * tv; |
|
49 QVariant schemeData(int column) const; |
|
50 |
|
51 public slots: |
|
52 void setParam(const QString & param, const QStringList & value); |
|
53 void fullNetConfig(); |
|
54 void resendSchemeData(); |
|
55 |
|
56 signals: |
|
57 void paramChanged(const QString & param, const QStringList & value); |
|
58 void goToSchemes(int); |
|
59 void goToWeapons(int); |
|
60 void goToDrawMap(); |
|
61 |
|
62 private slots: |
|
63 void ammoChanged(int index); |
|
64 void mapChanged(const QString &); |
|
65 void templateFilterChanged(int); |
|
66 void seedChanged(const QString &); |
|
67 void themeChanged(const QString &); |
|
68 void schemeChanged(int); |
|
69 void scriptChanged(int); |
|
70 void jumpToSchemes(); |
|
71 void jumpToWeapons(); |
|
72 void mapgenChanged(MapGenerator m); |
|
73 void maze_sizeChanged(int s); |
|
74 void onDrawnMapChanged(const QByteArray & data); |
|
75 |
|
76 private: |
|
77 QGridLayout mainLayout; |
|
78 QCheckBox * bindEntries; |
|
79 QString curNetAmmoName; |
|
80 QString curNetAmmo; |
|
81 QRegExp seedRegexp; |
|
82 |
|
83 void setNetAmmo(const QString& name, const QString& ammo); |
|
84 |
|
85 }; |
|
86 |
|
87 #endif // GAMECONFIGWIDGET_H |