author | unc0rr |
Mon, 16 May 2011 22:08:28 +0400 | |
branch | cursor_issues |
changeset 5193 | 16eda3643fc3 |
parent 4976 | 088d40d8aba2 |
permissions | -rw-r--r-- |
184 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
4976 | 3 |
* Copyright (c) 2006-2011 Andrey Korotaev <unC0Rr@gmail.com> |
184 | 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> |
|
318 | 23 |
#include <QStringList> |
1217 | 24 |
#include <QGroupBox> |
1783 | 25 |
#include <QSpinBox> |
4936
d65d438acd23
Merge MAP, MAPGEN and SEED params into one on room join, so engine isn't spawned three times for a preview. Not tested as I'm unable to see my rooms (why?)
unc0rr
parents:
4560
diff
changeset
|
26 |
#include <QRegExp> |
184 | 27 |
|
28 |
#include "mapContainer.h" |
|
29 |
||
311 | 30 |
class QCheckBox; |
31 |
class QVBoxLayout; |
|
32 |
class QLabel; |
|
1887 | 33 |
class QTableView; |
311 | 34 |
|
1217 | 35 |
class GameCFGWidget : public QGroupBox |
184 | 36 |
{ |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
37 |
Q_OBJECT |
184 | 38 |
|
39 |
public: |
|
4560
5d6c7f88db73
- Some work on drawMap widget and scene to allow undo, clear, save and load operations
unc0rr
parents:
4525
diff
changeset
|
40 |
GameCFGWidget(QWidget* parent); |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
41 |
quint32 getGameFlags() const; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
42 |
quint32 getInitHealth() const; |
4494
9585435e20f7
Pass hardcoded drawn map from frontend into engine \o/
unc0rr
parents:
4416
diff
changeset
|
43 |
QByteArray getFullConfig() const; |
4513
1dd97c710f5a
added general scripts to multiplayer and added option for scripts to allow user set schemes or weapon sets.
Henek
parents:
4511
diff
changeset
|
44 |
QComboBox * Scripts; |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
45 |
QComboBox * GameSchemes; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
46 |
QComboBox * WeaponsName; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
47 |
HWMapContainer* pMapContainer; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
48 |
QTableView * tv; |
4406
beb4de0af990
Increase teams to 8 to match the 8 colours, fix issue #108, reenable rope length modifier
nemo
parents:
4337
diff
changeset
|
49 |
QVariant schemeData(int column) const; |
696 | 50 |
|
320 | 51 |
public slots: |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
52 |
void setParam(const QString & param, const QStringList & value); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
53 |
void fullNetConfig(); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
54 |
void resendSchemeData(); |
325 | 55 |
|
56 |
signals: |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
57 |
void paramChanged(const QString & param, const QStringList & value); |
4410
f9e38ce1e813
a Henek-koda production: nicer game config screen, fixed scheme-weapon lock, added scheme editing to config page and some minor stuff
Henek
parents:
4406
diff
changeset
|
58 |
void goToSchemes(int); |
4416
29d2d1548387
adding a combobox to weapon editor as scheme editor, added a few notices for deleting and some buttons in this area.
Henek
parents:
4410
diff
changeset
|
59 |
void goToWeapons(int); |
4511 | 60 |
void goToDrawMap(); |
1531 | 61 |
|
62 |
private slots: |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
63 |
void ammoChanged(int index); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
64 |
void mapChanged(const QString &); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
65 |
void templateFilterChanged(int); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
66 |
void seedChanged(const QString &); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
67 |
void themeChanged(const QString &); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
68 |
void schemeChanged(int); |
4513
1dd97c710f5a
added general scripts to multiplayer and added option for scripts to allow user set schemes or weapon sets.
Henek
parents:
4511
diff
changeset
|
69 |
void scriptChanged(int); |
4410
f9e38ce1e813
a Henek-koda production: nicer game config screen, fixed scheme-weapon lock, added scheme editing to config page and some minor stuff
Henek
parents:
4406
diff
changeset
|
70 |
void jumpToSchemes(); |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
71 |
void jumpToWeapons(); |
3133 | 72 |
void mapgenChanged(MapGenerator m); |
73 |
void maze_sizeChanged(int s); |
|
4525 | 74 |
void onDrawnMapChanged(const QByteArray & data); |
184 | 75 |
|
76 |
private: |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
77 |
QGridLayout mainLayout; |
4337 | 78 |
QCheckBox * bindEntries; |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
79 |
QString curNetAmmoName; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
80 |
QString curNetAmmo; |
4936
d65d438acd23
Merge MAP, MAPGEN and SEED params into one on room join, so engine isn't spawned three times for a preview. Not tested as I'm unable to see my rooms (why?)
unc0rr
parents:
4560
diff
changeset
|
81 |
QRegExp seedRegexp; |
1873
815a3ff1fe4b
Start refactoring some things. Frontend becomes temporarily unusable for network game
unc0rr
parents:
1802
diff
changeset
|
82 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2080
diff
changeset
|
83 |
void setNetAmmo(const QString& name, const QString& ammo); |
1890 | 84 |
|
184 | 85 |
}; |
86 |
||
87 |
#endif // GAMECONFIGWIDGET_H |