author | unc0rr |
Sat, 31 Jan 2009 15:39:53 +0000 | |
changeset 1782 | e7589e37a6d6 |
parent 1531 | f404233b6d9b |
child 1783 | 169ebeefd7ab |
permissions | -rw-r--r-- |
184 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
486 | 3 |
* Copyright (c) 2006, 2007 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> |
184 | 25 |
|
26 |
#include "mapContainer.h" |
|
27 |
||
311 | 28 |
class QCheckBox; |
29 |
class QVBoxLayout; |
|
30 |
class QSpinBox; |
|
31 |
class QLabel; |
|
32 |
||
1217 | 33 |
class GameCFGWidget : public QGroupBox |
184 | 34 |
{ |
35 |
Q_OBJECT |
|
36 |
||
37 |
public: |
|
349 | 38 |
GameCFGWidget(QWidget* parent, bool externalControl=false); |
318 | 39 |
quint32 getGameFlags() const; |
184 | 40 |
QString getCurrentSeed() const; |
249 | 41 |
QString getCurrentMap() const; |
42 |
QString getCurrentTheme() const; |
|
312 | 43 |
quint32 getInitHealth() const; |
44 |
quint32 getTurnTime() const; |
|
1782
e7589e37a6d6
Options for bonus box probability tuning and number of turn until sudden death
unc0rr
parents:
1531
diff
changeset
|
45 |
quint32 getSuddenDeathTurns() const; |
e7589e37a6d6
Options for bonus box probability tuning and number of turn until sudden death
unc0rr
parents:
1531
diff
changeset
|
46 |
quint32 getCaseProbability() const; |
318 | 47 |
QStringList getFullConfig() const; |
184 | 48 |
|
696 | 49 |
QComboBox* WeaponsName; |
50 |
||
320 | 51 |
public slots: |
52 |
void setSeed(const QString & seed); |
|
53 |
void setMap(const QString & map); |
|
54 |
void setTheme(const QString & theme); |
|
1427 | 55 |
void setInitHealth(int health); |
56 |
void setTurnTime(int time); |
|
1782
e7589e37a6d6
Options for bonus box probability tuning and number of turn until sudden death
unc0rr
parents:
1531
diff
changeset
|
57 |
void setSuddenDeathTurns(int turns); |
e7589e37a6d6
Options for bonus box probability tuning and number of turn until sudden death
unc0rr
parents:
1531
diff
changeset
|
58 |
void setCaseProbability(int prob); |
325 | 59 |
void setFortsMode(bool value); |
1427 | 60 |
void setTeamsDivide(bool value); |
1530 | 61 |
void setSolid(bool value); |
703 | 62 |
void setNetAmmo(const QString& name, const QString& ammo); |
325 | 63 |
|
64 |
signals: |
|
65 |
void seedChanged(const QString & seed); |
|
66 |
void mapChanged(const QString & map); |
|
67 |
void themeChanged(const QString & theme); |
|
1427 | 68 |
void initHealthChanged(int health); |
69 |
void turnTimeChanged(int time); |
|
1782
e7589e37a6d6
Options for bonus box probability tuning and number of turn until sudden death
unc0rr
parents:
1531
diff
changeset
|
70 |
void suddenDeathTurnsChanged(int turns); |
e7589e37a6d6
Options for bonus box probability tuning and number of turn until sudden death
unc0rr
parents:
1531
diff
changeset
|
71 |
void caseProbabilityChanged(int prob); |
325 | 72 |
void fortsModeChanged(bool value); |
1427 | 73 |
void teamsDivideChanged(bool value); |
1530 | 74 |
void solidChanged(bool value); |
1531 | 75 |
void newWeaponScheme(const QString & name, const QString & ammo); |
76 |
||
77 |
private slots: |
|
78 |
void ammoChanged(int index); |
|
184 | 79 |
|
80 |
private: |
|
81 |
QCheckBox * CB_mode_Forts; |
|
1427 | 82 |
QCheckBox * CB_teamsDivide; |
1530 | 83 |
QCheckBox * CB_solid; |
1217 | 84 |
QGridLayout mainLayout; |
184 | 85 |
HWMapContainer* pMapContainer; |
311 | 86 |
QSpinBox * SB_TurnTime; |
87 |
QSpinBox * SB_InitHealth; |
|
1782
e7589e37a6d6
Options for bonus box probability tuning and number of turn until sudden death
unc0rr
parents:
1531
diff
changeset
|
88 |
QSpinBox * SB_SuddenDeath; |
e7589e37a6d6
Options for bonus box probability tuning and number of turn until sudden death
unc0rr
parents:
1531
diff
changeset
|
89 |
QSpinBox * SB_CaseProb; |
311 | 90 |
QLabel * L_TurnTime; |
91 |
QLabel * L_InitHealth; |
|
1782
e7589e37a6d6
Options for bonus box probability tuning and number of turn until sudden death
unc0rr
parents:
1531
diff
changeset
|
92 |
QLabel * L_SuddenDeath; |
e7589e37a6d6
Options for bonus box probability tuning and number of turn until sudden death
unc0rr
parents:
1531
diff
changeset
|
93 |
QLabel * L_CaseProb; |
325 | 94 |
|
703 | 95 |
QString curNetAmmoName; |
697 | 96 |
QString curNetAmmo; |
184 | 97 |
}; |
98 |
||
99 |
#endif // GAMECONFIGWIDGET_H |