author | displacer |
Mon, 15 Jan 2007 19:11:31 +0000 | |
changeset 340 | f5d4db927eba |
parent 339 | 7535ab6c3820 |
child 341 | 184230eb4151 |
permissions | -rw-r--r-- |
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 |
|
314 | 27 |
#include "netserver.h" |
306 | 28 |
#include "game.h" |
184 | 29 |
#include "ui_hwform.h" |
30 |
||
31 |
class HWGame; |
|
32 |
class HWTeam; |
|
314 | 33 |
class HWNewNet; |
184 | 34 |
class GameUIConfig; |
35 |
||
36 |
class HWForm : public QMainWindow |
|
37 |
{ |
|
38 |
Q_OBJECT |
|
39 |
||
40 |
public: |
|
41 |
HWForm(QWidget *parent = 0); |
|
42 |
Ui_HWForm ui; |
|
43 |
||
44 |
private slots: |
|
45 |
void GoToMain(); |
|
46 |
void GoToSinglePlayer(); |
|
47 |
void GoToSetup(); |
|
48 |
void GoToMultiplayer(); |
|
49 |
void GoToDemos(); |
|
50 |
void GoToNet(); |
|
51 |
void GoToNetChat(); |
|
187 | 52 |
void GoToInfo(); |
289 | 53 |
void GoToPage(quint8 id); |
54 |
void GoBack(); |
|
184 | 55 |
void NewTeam(); |
56 |
void EditTeam(); |
|
57 |
void TeamSave(); |
|
58 |
void TeamDiscard(); |
|
59 |
void SimpleGame(); |
|
60 |
void PlayDemo(); |
|
61 |
void NetConnect(); |
|
314 | 62 |
void NetStartServer(); |
184 | 63 |
void NetDisconnect(); |
64 |
void NetJoin(); |
|
65 |
void NetCreate(); |
|
66 |
void AddGame(const QString & chan); |
|
67 |
void NetGameEnter(); |
|
68 |
void NetStartGame(); |
|
339
7535ab6c3820
Run game message added, team and config info provided for net game
displacer
parents:
338
diff
changeset
|
69 |
void AddNetTeam(const HWTeam& team); |
184 | 70 |
void StartMPGame(); |
306 | 71 |
void GameStateChanged(GameState gameState); |
72 |
void GameStats(char type, const QString & info); |
|
184 | 73 |
|
74 |
private: |
|
314 | 75 |
void _NetConnect(const QString & hostName, quint16 port, const QString & nick); |
245 | 76 |
void UpdateTeamsLists(); |
314 | 77 |
void CreateGame(GameCFGWidget * gamecfg); |
187 | 78 |
enum PageIDs { |
79 |
ID_PAGE_SINGLEPLAYER = 0, |
|
80 |
ID_PAGE_SETUP_TEAM = 1, |
|
81 |
ID_PAGE_SETUP = 2, |
|
82 |
ID_PAGE_MULTIPLAYER = 3, |
|
83 |
ID_PAGE_DEMOS = 4, |
|
84 |
ID_PAGE_NET = 5, |
|
85 |
ID_PAGE_NETCHAT = 6, |
|
86 |
ID_PAGE_NETCFG = 7, |
|
87 |
ID_PAGE_INFO = 8, |
|
306 | 88 |
ID_PAGE_MAIN = 9, |
89 |
ID_PAGE_GAMESTATS = 10 |
|
187 | 90 |
}; |
184 | 91 |
HWGame * game; |
245 | 92 |
HWTeam * editedTeam; |
314 | 93 |
HWNewNet * hwnet; |
184 | 94 |
GameUIConfig * config; |
289 | 95 |
QStack<quint8> PagesStack; |
314 | 96 |
HWNetServer* pnetserver; |
307 | 97 |
void AddStatText(const QString & msg); |
311 | 98 |
void OnPageShown(quint8 id); |
184 | 99 |
}; |
100 |
||
101 |
#endif |