equal
deleted
inserted
replaced
22 #include <QLabel> |
22 #include <QLabel> |
23 #include <QLineEdit> |
23 #include <QLineEdit> |
24 #include <QDir> |
24 #include <QDir> |
25 #include <QStack> |
25 #include <QStack> |
26 |
26 |
|
27 #include "netserver.h" |
27 #include "game.h" |
28 #include "game.h" |
28 #include "ui_hwform.h" |
29 #include "ui_hwform.h" |
29 |
30 |
30 class HWGame; |
31 class HWGame; |
31 class HWTeam; |
32 class HWTeam; |
32 class HWNet; |
33 class HWNewNet; |
33 class GameUIConfig; |
34 class GameUIConfig; |
34 |
35 |
35 class HWForm : public QMainWindow |
36 class HWForm : public QMainWindow |
36 { |
37 { |
37 Q_OBJECT |
38 Q_OBJECT |
56 void TeamSave(); |
57 void TeamSave(); |
57 void TeamDiscard(); |
58 void TeamDiscard(); |
58 void SimpleGame(); |
59 void SimpleGame(); |
59 void PlayDemo(); |
60 void PlayDemo(); |
60 void NetConnect(); |
61 void NetConnect(); |
|
62 void NetStartServer(); |
61 void NetDisconnect(); |
63 void NetDisconnect(); |
62 void NetJoin(); |
64 void NetJoin(); |
63 void NetCreate(); |
65 void NetCreate(); |
64 void AddGame(const QString & chan); |
66 void AddGame(const QString & chan); |
65 void NetAddTeam(); |
67 void NetAddTeam(); |
69 void StartMPGame(); |
71 void StartMPGame(); |
70 void GameStateChanged(GameState gameState); |
72 void GameStateChanged(GameState gameState); |
71 void GameStats(char type, const QString & info); |
73 void GameStats(char type, const QString & info); |
72 |
74 |
73 private: |
75 private: |
|
76 void _NetConnect(const QString & hostName, quint16 port, const QString & nick); |
74 void UpdateTeamsLists(); |
77 void UpdateTeamsLists(); |
|
78 void CreateGame(GameCFGWidget * gamecfg); |
75 enum PageIDs { |
79 enum PageIDs { |
76 ID_PAGE_SINGLEPLAYER = 0, |
80 ID_PAGE_SINGLEPLAYER = 0, |
77 ID_PAGE_SETUP_TEAM = 1, |
81 ID_PAGE_SETUP_TEAM = 1, |
78 ID_PAGE_SETUP = 2, |
82 ID_PAGE_SETUP = 2, |
79 ID_PAGE_MULTIPLAYER = 3, |
83 ID_PAGE_MULTIPLAYER = 3, |
85 ID_PAGE_MAIN = 9, |
89 ID_PAGE_MAIN = 9, |
86 ID_PAGE_GAMESTATS = 10 |
90 ID_PAGE_GAMESTATS = 10 |
87 }; |
91 }; |
88 HWGame * game; |
92 HWGame * game; |
89 HWTeam * editedTeam; |
93 HWTeam * editedTeam; |
90 HWNet * hwnet; |
94 HWNewNet * hwnet; |
91 GameUIConfig * config; |
95 GameUIConfig * config; |
92 QStack<quint8> PagesStack; |
96 QStack<quint8> PagesStack; |
93 |
97 HWNetServer* pnetserver; |
94 void CreateGame(GameCFGWidget * gamecfg); |
|
95 void AddStatText(const QString & msg); |
98 void AddStatText(const QString & msg); |
96 void OnPageShown(quint8 id); |
99 void OnPageShown(quint8 id); |
97 }; |
100 }; |
98 |
101 |
99 #endif |
102 #endif |