author | displacer |
Thu, 20 Dec 2007 10:54:42 +0000 | |
changeset 683 | 57d624f71e65 |
parent 665 | 5c7bfc8bac6a |
child 684 | 257444d8429f |
permissions | -rw-r--r-- |
184 | 1 |
/* |
2 |
* Hedgewars, a worms-like 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 PAGES_H |
|
20 |
#define PAGES_H |
|
21 |
||
22 |
#include <QWidget> |
|
23 |
||
24 |
#include "binds.h" |
|
322 | 25 |
#include "mapContainer.h" |
184 | 26 |
|
27 |
class QPushButton; |
|
28 |
class QGroupBox; |
|
29 |
class QComboBox; |
|
30 |
class QLabel; |
|
31 |
class QToolBox; |
|
32 |
class QLineEdit; |
|
665 | 33 |
class QListWidget; |
34 |
class QCheckBox; |
|
35 |
class QSpinBox; |
|
36 |
class QTextEdit; |
|
37 |
class QRadioButton; |
|
38 |
class QTableView; |
|
39 |
||
40 |
class GameCFGWidget; |
|
184 | 41 |
class TeamSelWidget; |
42 |
class DemosList; |
|
43 |
class SquareLabel; |
|
187 | 44 |
class About; |
297 | 45 |
class FPSEdit; |
461 | 46 |
class HWChatWidget; |
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
600
diff
changeset
|
47 |
class SelWeaponWidget; |
184 | 48 |
|
49 |
class PageMain : public QWidget |
|
50 |
{ |
|
51 |
Q_OBJECT |
|
52 |
||
53 |
public: |
|
54 |
PageMain(QWidget* parent = 0); |
|
55 |
||
56 |
QPushButton *BtnSinglePlayer; |
|
57 |
QPushButton *BtnMultiplayer; |
|
58 |
QPushButton *BtnNet; |
|
59 |
QPushButton *BtnSetup; |
|
579 | 60 |
QPushButton *BtnLoad; |
184 | 61 |
QPushButton *BtnDemos; |
187 | 62 |
QPushButton *BtnInfo; |
184 | 63 |
QPushButton *BtnExit; |
64 |
}; |
|
65 |
||
585
7531ae5b146e
Rename PageLocalGame -> PageSimpleGame due to future changes
unc0rr
parents:
579
diff
changeset
|
66 |
class PageSimpleGame : public QWidget |
184 | 67 |
{ |
68 |
Q_OBJECT |
|
69 |
||
70 |
public: |
|
585
7531ae5b146e
Rename PageLocalGame -> PageSimpleGame due to future changes
unc0rr
parents:
579
diff
changeset
|
71 |
PageSimpleGame(QWidget* parent = 0); |
184 | 72 |
|
73 |
QPushButton *BtnSimpleGame; |
|
74 |
QPushButton *BtnBack; |
|
75 |
GameCFGWidget *gameCFG; |
|
76 |
}; |
|
77 |
||
78 |
class PageEditTeam : public QWidget |
|
79 |
{ |
|
80 |
Q_OBJECT |
|
81 |
||
82 |
public: |
|
83 |
PageEditTeam(QWidget* parent = 0); |
|
84 |
QGroupBox *GBoxHedgehogs; |
|
85 |
QGroupBox *GBoxTeam; |
|
86 |
QGroupBox *GBoxFort; |
|
87 |
QComboBox *CBFort; |
|
88 |
SquareLabel *FortPreview; |
|
89 |
QGroupBox *GBoxGrave; |
|
90 |
QComboBox *CBGrave; |
|
91 |
QLabel *GravePreview; |
|
336 | 92 |
QGroupBox *GBoxTeamLvl; |
93 |
QComboBox *CBTeamLvl; |
|
94 |
QLabel *LevelPict; |
|
184 | 95 |
QGroupBox *GBoxBinds; |
96 |
QToolBox *BindsBox; |
|
97 |
QWidget *page_A; |
|
98 |
QWidget *page_W; |
|
99 |
QWidget *page_WP; |
|
100 |
QWidget *page_O; |
|
101 |
QPushButton *BtnTeamDiscard; |
|
102 |
QPushButton *BtnTeamSave; |
|
103 |
QLineEdit * TeamNameEdit; |
|
104 |
QLineEdit * HHNameEdit[8]; |
|
105 |
QComboBox * CBBind[BINDS_NUMBER]; |
|
106 |
||
107 |
public slots: |
|
108 |
void CBGrave_activated(const QString & gravename); |
|
109 |
void CBFort_activated(const QString & gravename); |
|
336 | 110 |
void CBTeamLvl_activated(int id); |
184 | 111 |
|
112 |
private: |
|
113 |
QLabel * LBind[BINDS_NUMBER]; |
|
114 |
}; |
|
115 |
||
116 |
class PageMultiplayer : public QWidget |
|
117 |
{ |
|
118 |
Q_OBJECT |
|
119 |
||
120 |
public: |
|
121 |
PageMultiplayer(QWidget* parent = 0); |
|
122 |
||
123 |
QPushButton *BtnBack; |
|
124 |
GameCFGWidget *gameCFG; |
|
125 |
TeamSelWidget *teamsSelect; |
|
126 |
QPushButton *BtnStartMPGame; |
|
127 |
}; |
|
128 |
||
129 |
class PageOptions : public QWidget |
|
130 |
{ |
|
131 |
Q_OBJECT |
|
132 |
||
133 |
public: |
|
134 |
PageOptions(QWidget* parent = 0); |
|
135 |
||
597
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
587
diff
changeset
|
136 |
QPushButton* WeaponsButt; |
184 | 137 |
QPushButton *BtnBack; |
138 |
QGroupBox *groupBox; |
|
139 |
QPushButton *BtnNewTeam; |
|
140 |
QPushButton *BtnEditTeam; |
|
141 |
QComboBox *CBTeamName; |
|
142 |
QGroupBox *AGGroupBox; |
|
143 |
QComboBox *CBResolution; |
|
144 |
QCheckBox *CBEnableSound; |
|
145 |
QCheckBox *CBFullscreen; |
|
297 | 146 |
QCheckBox *CBShowFPS; |
529 | 147 |
QCheckBox *CBAltDamage; |
297 | 148 |
FPSEdit *fpsedit; |
184 | 149 |
QPushButton *BtnSaveOptions; |
647 | 150 |
QGroupBox *NNGroupBox; |
151 |
QLabel *labelNN; |
|
152 |
QLineEdit *editNetNick; |
|
184 | 153 |
}; |
154 |
||
155 |
class PageNet : public QWidget |
|
156 |
{ |
|
157 |
Q_OBJECT |
|
158 |
||
159 |
public: |
|
160 |
PageNet(QWidget* parent = 0); |
|
161 |
||
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
162 |
QPushButton* BtnUpdateSList; |
665 | 163 |
QTableView * tvServersList; |
653
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
164 |
QPushButton * BtnBack; |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
165 |
QPushButton * BtnNetConnect; |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
166 |
QPushButton * BtnNetSvrStart; |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
167 |
QPushButton * BtnSpecifyServer; |
636 | 168 |
QRadioButton * rbLocalGame; |
169 |
QRadioButton * rbInternetGame; |
|
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
170 |
|
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
171 |
private: |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
172 |
QGroupBox * ConnGroupBox; |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
173 |
QGridLayout * GBClayout; |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
174 |
|
646 | 175 |
private slots: |
176 |
void slotConnect(); |
|
177 |
||
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
178 |
public slots: |
646 | 179 |
void updateServersList(); |
180 |
||
181 |
signals: |
|
665 | 182 |
void connectClicked(const QString & host, quint16 port); |
646 | 183 |
}; |
184 |
||
185 |
class PageNetServer : public QWidget |
|
186 |
{ |
|
187 |
Q_OBJECT |
|
188 |
||
189 |
public: |
|
190 |
PageNetServer(QWidget* parent = 0); |
|
191 |
||
192 |
QPushButton *BtnBack; |
|
193 |
QPushButton *BtnStart; |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
194 |
QPushButton *BtnDefault; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
195 |
QLabel *labelSD; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
196 |
QLineEdit *leServerDescr; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
197 |
QLabel *labelPort; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
198 |
QSpinBox *sbPort; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
199 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
200 |
private slots: |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
201 |
void setDefaultPort(); |
184 | 202 |
}; |
203 |
||
204 |
class PageNetGame : public QWidget |
|
205 |
{ |
|
206 |
Q_OBJECT |
|
207 |
||
208 |
public: |
|
209 |
PageNetGame(QWidget* parent = 0); |
|
210 |
||
211 |
QPushButton *BtnBack; |
|
212 |
QPushButton *BtnGo; |
|
461 | 213 |
|
214 |
HWChatWidget* pChatWidget; |
|
322 | 215 |
|
216 |
TeamSelWidget* pNetTeamsWidget; |
|
217 |
GameCFGWidget* pGameCFG; |
|
184 | 218 |
}; |
219 |
||
187 | 220 |
class PageInfo : public QWidget |
221 |
{ |
|
222 |
Q_OBJECT |
|
223 |
||
224 |
public: |
|
225 |
PageInfo(QWidget* parent = 0); |
|
226 |
||
227 |
QPushButton *BtnBack; |
|
228 |
About *about; |
|
229 |
}; |
|
230 |
||
306 | 231 |
class PageGameStats : public QWidget |
232 |
{ |
|
233 |
Q_OBJECT |
|
234 |
||
235 |
public: |
|
236 |
PageGameStats(QWidget* parent = 0); |
|
237 |
||
238 |
QPushButton *BtnBack; |
|
307 | 239 |
QLabel *labelGameStats; |
306 | 240 |
}; |
241 |
||
586 | 242 |
class PageSinglePlayer : public QWidget |
243 |
{ |
|
244 |
Q_OBJECT |
|
245 |
||
246 |
public: |
|
247 |
PageSinglePlayer(QWidget* parent = 0); |
|
248 |
||
249 |
QPushButton *BtnSimpleGamePage; |
|
250 |
QPushButton *BtnTrainPage; |
|
251 |
QPushButton *BtnBack; |
|
252 |
GameCFGWidget *gameCFG; |
|
253 |
}; |
|
254 |
||
587 | 255 |
class PageTraining : public QWidget |
256 |
{ |
|
257 |
Q_OBJECT |
|
258 |
||
259 |
public: |
|
260 |
PageTraining(QWidget* parent = 0); |
|
261 |
||
262 |
QPushButton *BtnStartTrain; |
|
263 |
QPushButton *BtnBack; |
|
264 |
}; |
|
265 |
||
600 | 266 |
class PageSelectWeapon : public QWidget |
267 |
{ |
|
268 |
Q_OBJECT |
|
269 |
||
270 |
public: |
|
271 |
PageSelectWeapon(QWidget* parent = 0); |
|
272 |
||
683 | 273 |
QPushButton *BtnSave; |
274 |
QPushButton *BtnDefault; |
|
600 | 275 |
QPushButton *BtnBack; |
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
600
diff
changeset
|
276 |
SelWeaponWidget* pWeapons; |
600 | 277 |
}; |
306 | 278 |
|
184 | 279 |
#endif // PAGES_H |