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;
|
318
|
45 |
QStringList getFullConfig() const;
|
184
|
46 |
|
696
|
47 |
QComboBox* WeaponsName;
|
|
48 |
|
320
|
49 |
public slots:
|
|
50 |
void setSeed(const QString & seed);
|
|
51 |
void setMap(const QString & map);
|
|
52 |
void setTheme(const QString & theme);
|
1427
|
53 |
void setInitHealth(int health);
|
|
54 |
void setTurnTime(int time);
|
325
|
55 |
void setFortsMode(bool value);
|
1427
|
56 |
void setTeamsDivide(bool value);
|
1530
|
57 |
void setSolid(bool value);
|
703
|
58 |
void setNetAmmo(const QString& name, const QString& ammo);
|
325
|
59 |
|
|
60 |
signals:
|
|
61 |
void seedChanged(const QString & seed);
|
|
62 |
void mapChanged(const QString & map);
|
|
63 |
void themeChanged(const QString & theme);
|
1427
|
64 |
void initHealthChanged(int health);
|
|
65 |
void turnTimeChanged(int time);
|
325
|
66 |
void fortsModeChanged(bool value);
|
1427
|
67 |
void teamsDivideChanged(bool value);
|
1530
|
68 |
void solidChanged(bool value);
|
697
|
69 |
void newWeaponsName(const QString& weapon);
|
184
|
70 |
|
|
71 |
private:
|
|
72 |
QCheckBox * CB_mode_Forts;
|
1427
|
73 |
QCheckBox * CB_teamsDivide;
|
1530
|
74 |
QCheckBox * CB_solid;
|
1217
|
75 |
QGridLayout mainLayout;
|
184
|
76 |
HWMapContainer* pMapContainer;
|
311
|
77 |
QSpinBox * SB_TurnTime;
|
|
78 |
QSpinBox * SB_InitHealth;
|
|
79 |
QLabel * L_TurnTime;
|
|
80 |
QLabel * L_InitHealth;
|
325
|
81 |
|
703
|
82 |
QString curNetAmmoName;
|
697
|
83 |
QString curNetAmmo;
|
184
|
84 |
};
|
|
85 |
|
|
86 |
#endif // GAMECONFIGWIDGET_H
|