184
|
1 |
/*
|
|
2 |
* Hedgewars, a worms-like game
|
|
3 |
* Copyright (c) 2005, 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 HWFORM_H
|
|
20 |
#define HWFORM_H
|
|
21 |
|
|
22 |
#include <QLabel>
|
|
23 |
#include <QLineEdit>
|
|
24 |
#include <QDir>
|
289
|
25 |
#include <QStack>
|
184
|
26 |
|
306
|
27 |
#include "game.h"
|
184
|
28 |
#include "ui_hwform.h"
|
|
29 |
|
|
30 |
class HWGame;
|
|
31 |
class HWTeam;
|
|
32 |
class HWNet;
|
|
33 |
class GameUIConfig;
|
|
34 |
|
|
35 |
class HWForm : public QMainWindow
|
|
36 |
{
|
|
37 |
Q_OBJECT
|
|
38 |
|
|
39 |
public:
|
|
40 |
HWForm(QWidget *parent = 0);
|
|
41 |
Ui_HWForm ui;
|
|
42 |
|
|
43 |
private slots:
|
|
44 |
void GoToMain();
|
|
45 |
void GoToSinglePlayer();
|
|
46 |
void GoToSetup();
|
|
47 |
void GoToMultiplayer();
|
|
48 |
void GoToDemos();
|
|
49 |
void GoToNet();
|
|
50 |
void GoToNetChat();
|
187
|
51 |
void GoToInfo();
|
289
|
52 |
void GoToPage(quint8 id);
|
|
53 |
void GoBack();
|
184
|
54 |
void NewTeam();
|
|
55 |
void EditTeam();
|
|
56 |
void TeamSave();
|
|
57 |
void TeamDiscard();
|
|
58 |
void SimpleGame();
|
|
59 |
void PlayDemo();
|
|
60 |
void NetConnect();
|
|
61 |
void NetDisconnect();
|
|
62 |
void NetJoin();
|
|
63 |
void NetCreate();
|
|
64 |
void AddGame(const QString & chan);
|
|
65 |
void NetAddTeam();
|
|
66 |
void NetGameEnter();
|
|
67 |
void NetStartGame();
|
|
68 |
void ChangeInNetTeams(const QStringList & teams);
|
|
69 |
void StartMPGame();
|
306
|
70 |
void GameStateChanged(GameState gameState);
|
|
71 |
void GameStats(char type, const QString & info);
|
184
|
72 |
|
|
73 |
private:
|
245
|
74 |
void UpdateTeamsLists();
|
187
|
75 |
enum PageIDs {
|
|
76 |
ID_PAGE_SINGLEPLAYER = 0,
|
|
77 |
ID_PAGE_SETUP_TEAM = 1,
|
|
78 |
ID_PAGE_SETUP = 2,
|
|
79 |
ID_PAGE_MULTIPLAYER = 3,
|
|
80 |
ID_PAGE_DEMOS = 4,
|
|
81 |
ID_PAGE_NET = 5,
|
|
82 |
ID_PAGE_NETCHAT = 6,
|
|
83 |
ID_PAGE_NETCFG = 7,
|
|
84 |
ID_PAGE_INFO = 8,
|
306
|
85 |
ID_PAGE_MAIN = 9,
|
|
86 |
ID_PAGE_GAMESTATS = 10
|
187
|
87 |
};
|
184
|
88 |
HWGame * game;
|
245
|
89 |
HWTeam * editedTeam;
|
184
|
90 |
HWNet * hwnet;
|
|
91 |
GameUIConfig * config;
|
289
|
92 |
QStack<quint8> PagesStack;
|
306
|
93 |
|
|
94 |
void CreateGame(GameCFGWidget * gamecfg);
|
184
|
95 |
};
|
|
96 |
|
|
97 |
#endif
|