184
|
1 |
/*
|
|
2 |
* Hedgewars, a worms-like game
|
|
3 |
* Copyright (c) 2006 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>
|
318
|
23 |
#include <QStringList>
|
184
|
24 |
|
|
25 |
#include "mapContainer.h"
|
|
26 |
|
311
|
27 |
class QCheckBox;
|
|
28 |
class QVBoxLayout;
|
|
29 |
class QSpinBox;
|
|
30 |
class QLabel;
|
|
31 |
|
184
|
32 |
class GameCFGWidget : public QWidget
|
|
33 |
{
|
|
34 |
Q_OBJECT
|
|
35 |
|
|
36 |
public:
|
318
|
37 |
GameCFGWidget(QWidget* parent);
|
|
38 |
quint32 getGameFlags() const;
|
184
|
39 |
QString getCurrentSeed() const;
|
249
|
40 |
QString getCurrentMap() const;
|
|
41 |
QString getCurrentTheme() const;
|
312
|
42 |
quint32 getInitHealth() const;
|
|
43 |
quint32 getTurnTime() const;
|
318
|
44 |
QStringList getFullConfig() const;
|
184
|
45 |
|
320
|
46 |
public slots:
|
|
47 |
void setSeed(const QString & seed);
|
|
48 |
void setMap(const QString & map);
|
|
49 |
void setTheme(const QString & theme);
|
325
|
50 |
void setInitHealth(quint32 health);
|
|
51 |
void setTurnTime(quint32 time);
|
|
52 |
void setFortsMode(bool value);
|
|
53 |
|
|
54 |
signals:
|
|
55 |
void seedChanged(const QString & seed);
|
|
56 |
void mapChanged(const QString & map);
|
|
57 |
void themeChanged(const QString & theme);
|
|
58 |
void initHealthChanged(quint32 health);
|
|
59 |
void turnTimeChanged(quint32 time);
|
|
60 |
void fortsModeChanged(bool value);
|
184
|
61 |
|
|
62 |
private:
|
|
63 |
QCheckBox * CB_mode_Forts;
|
|
64 |
QVBoxLayout mainLayout;
|
|
65 |
HWMapContainer* pMapContainer;
|
311
|
66 |
QSpinBox * SB_TurnTime;
|
|
67 |
QSpinBox * SB_InitHealth;
|
|
68 |
QLabel * L_TurnTime;
|
|
69 |
QLabel * L_InitHealth;
|
325
|
70 |
|
|
71 |
private slots:
|
|
72 |
void onSeedChanged(const QString & seed);
|
|
73 |
void onMapChanged(const QString & map);
|
|
74 |
void onThemeChanged(const QString & theme);
|
|
75 |
void onInitHealthChanged(int health);
|
|
76 |
void onTurnTimeChanged(int time);
|
|
77 |
void onFortsModeChanged(bool value);
|
|
78 |
|
184
|
79 |
};
|
|
80 |
|
|
81 |
#endif // GAMECONFIGWIDGET_H
|