130 QFont * font14; |
130 QFont * font14; |
131 }; |
131 }; |
132 |
132 |
133 class PageMain : public AbstractPage |
133 class PageMain : public AbstractPage |
134 { |
134 { |
135 Q_OBJECT |
135 Q_OBJECT |
136 |
136 |
137 public: |
137 public: |
138 PageMain(QWidget* parent = 0); |
138 PageMain(QWidget* parent = 0); |
139 |
139 |
140 QPushButton *BtnSinglePlayer; |
140 QPushButton *BtnSinglePlayer; |
141 QPushButton *BtnNet; |
141 QPushButton *BtnNet; |
142 QPushButton *BtnSetup; |
142 QPushButton *BtnSetup; |
143 QPushButton *BtnInfo; |
143 QPushButton *BtnInfo; |
144 QPushButton *BtnExit; |
144 QPushButton *BtnExit; |
145 }; |
145 }; |
146 |
146 |
147 class PageEditTeam : public AbstractPage |
147 class PageEditTeam : public AbstractPage |
148 { |
148 { |
149 Q_OBJECT |
149 Q_OBJECT |
150 |
150 |
151 public: |
151 public: |
152 PageEditTeam(QWidget* parent, SDLInteraction * sdli); |
152 PageEditTeam(QWidget* parent, SDLInteraction * sdli); |
153 QSignalMapper* signalMapper; |
153 QSignalMapper* signalMapper; |
154 QGroupBox *GBoxHedgehogs; |
154 QGroupBox *GBoxHedgehogs; |
155 QGroupBox *GBoxTeam; |
155 QGroupBox *GBoxTeam; |
156 QGroupBox *GBoxFort; |
156 QGroupBox *GBoxFort; |
157 QComboBox *CBFort; |
157 QComboBox *CBFort; |
158 SquareLabel *FortPreview; |
158 SquareLabel *FortPreview; |
159 QComboBox *CBGrave; |
159 QComboBox *CBGrave; |
160 QComboBox *CBFlag; |
160 QComboBox *CBFlag; |
161 QComboBox *CBTeamLvl; |
161 QComboBox *CBTeamLvl; |
162 QComboBox *CBVoicepack; |
162 QComboBox *CBVoicepack; |
163 QGroupBox *GBoxBinds; |
163 QGroupBox *GBoxBinds; |
164 QToolBox *BindsBox; |
164 QToolBox *BindsBox; |
165 QPushButton *BtnTeamDiscard; |
165 QPushButton *BtnTeamDiscard; |
166 QPushButton *BtnTeamSave; |
166 QPushButton *BtnTeamSave; |
167 QPushButton * BtnTestSound; |
167 QPushButton * BtnTestSound; |
168 QLineEdit * TeamNameEdit; |
168 QLineEdit * TeamNameEdit; |
169 QLineEdit * HHNameEdit[8]; |
169 QLineEdit * HHNameEdit[8]; |
170 QComboBox * HHHats[8]; |
170 QComboBox * HHHats[8]; |
171 QPushButton * randButton[8]; |
171 QPushButton * randButton[8]; |
172 QComboBox * CBBind[BINDS_NUMBER]; |
172 QComboBox * CBBind[BINDS_NUMBER]; |
173 QPushButton * randTeamButton; |
173 QPushButton * randTeamButton; |
174 |
174 |
175 private: |
175 private: |
176 SDLInteraction * mySdli; |
176 SDLInteraction * mySdli; |
177 |
177 |
178 public slots: |
178 public slots: |
179 void CBFort_activated(const QString & gravename); |
179 void CBFort_activated(const QString & gravename); |
180 |
180 |
181 private slots: |
181 private slots: |
182 void testSound(); |
182 void testSound(); |
183 }; |
183 }; |
184 |
184 |
185 class PageMultiplayer : public AbstractPage |
185 class PageMultiplayer : public AbstractPage |
186 { |
186 { |
187 Q_OBJECT |
187 Q_OBJECT |
188 |
188 |
189 public: |
189 public: |
190 PageMultiplayer(QWidget* parent = 0); |
190 PageMultiplayer(QWidget* parent = 0); |
191 |
191 |
192 QPushButton *BtnBack; |
192 QPushButton *BtnBack; |
193 GameCFGWidget *gameCFG; |
193 GameCFGWidget *gameCFG; |
194 TeamSelWidget *teamsSelect; |
194 TeamSelWidget *teamsSelect; |
195 QPushButton *BtnStartMPGame; |
195 QPushButton *BtnStartMPGame; |
196 }; |
196 }; |
197 |
197 |
198 class PageOptions : public AbstractPage |
198 class PageOptions : public AbstractPage |
199 { |
199 { |
200 Q_OBJECT |
200 Q_OBJECT |
201 |
201 |
202 public: |
202 public: |
203 PageOptions(QWidget* parent = 0); |
203 PageOptions(QWidget* parent = 0); |
204 |
204 |
205 QPushButton *WeaponsButt; |
205 QPushButton *WeaponsButt; |
206 QPushButton *WeaponEdit; |
206 QPushButton *WeaponEdit; |
207 QComboBox *WeaponsName; |
207 QComboBox *WeaponsName; |
208 QCheckBox *WeaponTooltip; |
208 QCheckBox *WeaponTooltip; |
209 QComboBox *CBLanguage; |
209 QComboBox *CBLanguage; |
210 |
210 |
211 QPushButton *BtnBack; |
211 QPushButton *BtnBack; |
212 IconedGroupBox *teamsBox; |
212 IconedGroupBox *teamsBox; |
213 QPushButton *BtnNewTeam; |
213 QPushButton *BtnNewTeam; |
214 QPushButton *BtnEditTeam; |
214 QPushButton *BtnEditTeam; |
215 QComboBox *CBTeamName; |
215 QComboBox *CBTeamName; |
216 IconedGroupBox *AGGroupBox; |
216 IconedGroupBox *AGGroupBox; |
217 QComboBox *CBResolution; |
217 QComboBox *CBResolution; |
218 QCheckBox *CBEnableSound; |
218 QCheckBox *CBEnableSound; |
219 QCheckBox *CBEnableFrontendSound; |
219 QCheckBox *CBEnableFrontendSound; |
220 #ifdef _WIN32 |
220 #ifdef _WIN32 |
221 QCheckBox *CBHardwareSound; |
221 QCheckBox *CBHardwareSound; |
222 #endif |
222 #endif |
223 QCheckBox *CBEnableMusic; |
223 QCheckBox *CBEnableMusic; |
224 QCheckBox *CBEnableFrontendMusic; |
224 QCheckBox *CBEnableFrontendMusic; |
225 QCheckBox *CBFullscreen; |
225 QCheckBox *CBFullscreen; |
226 QCheckBox *CBFrontendFullscreen; |
226 QCheckBox *CBFrontendFullscreen; |
227 QCheckBox *CBShowFPS; |
227 QCheckBox *CBShowFPS; |
228 QCheckBox *CBAltDamage; |
228 QCheckBox *CBAltDamage; |
229 QCheckBox *CBNameWithDate; |
229 QCheckBox *CBNameWithDate; |
230 #ifdef __APPLE__ |
230 #ifdef __APPLE__ |
231 QCheckBox *CBAutoUpdate; |
231 QCheckBox *CBAutoUpdate; |
232 #endif |
232 #endif |
233 |
233 |
234 FPSEdit *fpsedit; |
234 FPSEdit *fpsedit; |
235 QPushButton *BtnSaveOptions; |
235 QPushButton *BtnSaveOptions; |
236 QLabel *labelNN; |
236 QLabel *labelNN; |
237 QSpinBox * volumeBox; |
237 QSpinBox * volumeBox; |
238 QLineEdit *editNetNick; |
238 QLineEdit *editNetNick; |
239 QCheckBox *CBReduceQuality; |
239 QCheckBox *CBReduceQuality; |
240 QCheckBox *CBFrontendEffects; |
240 QCheckBox *CBFrontendEffects; |
241 }; |
241 }; |
242 |
242 |
243 class PageNet : public AbstractPage |
243 class PageNet : public AbstractPage |
244 { |
244 { |
245 Q_OBJECT |
245 Q_OBJECT |
246 |
246 |
247 public: |
247 public: |
248 PageNet(QWidget* parent = 0); |
248 PageNet(QWidget* parent = 0); |
249 |
249 |
250 QPushButton* BtnUpdateSList; |
250 QPushButton* BtnUpdateSList; |
251 QTableView * tvServersList; |
251 QTableView * tvServersList; |
252 QPushButton * BtnBack; |
252 QPushButton * BtnBack; |
253 QPushButton * BtnNetConnect; |
253 QPushButton * BtnNetConnect; |
254 QPushButton * BtnNetSvrStart; |
254 QPushButton * BtnNetSvrStart; |
255 QPushButton * BtnSpecifyServer; |
255 QPushButton * BtnSpecifyServer; |
256 |
256 |
257 private: |
257 private: |
258 QGroupBox * ConnGroupBox; |
258 QGroupBox * ConnGroupBox; |
259 QGridLayout * GBClayout; |
259 QGridLayout * GBClayout; |
260 |
260 |
261 private slots: |
261 private slots: |
262 void slotConnect(); |
262 void slotConnect(); |
263 |
263 |
264 public slots: |
264 public slots: |
265 void updateServersList(); |
265 void updateServersList(); |
266 |
266 |
267 signals: |
267 signals: |
268 void connectClicked(const QString & host, quint16 port); |
268 void connectClicked(const QString & host, quint16 port); |
269 }; |
269 }; |
270 |
270 |
271 class PageNetServer : public AbstractPage |
271 class PageNetServer : public AbstractPage |
272 { |
272 { |
273 Q_OBJECT |
273 Q_OBJECT |
274 |
274 |
275 public: |
275 public: |
276 PageNetServer(QWidget* parent = 0); |
276 PageNetServer(QWidget* parent = 0); |
277 |
277 |
278 QPushButton *BtnBack; |
278 QPushButton *BtnBack; |
279 QPushButton *BtnStart; |
279 QPushButton *BtnStart; |
280 QPushButton *BtnDefault; |
280 QPushButton *BtnDefault; |
281 QLabel *labelSD; |
281 QLabel *labelSD; |
282 QLineEdit *leServerDescr; |
282 QLineEdit *leServerDescr; |
283 QLabel *labelPort; |
283 QLabel *labelPort; |
284 QSpinBox *sbPort; |
284 QSpinBox *sbPort; |
285 |
285 |
286 private slots: |
286 private slots: |
287 void setDefaultPort(); |
287 void setDefaultPort(); |
288 }; |
288 }; |
289 |
289 |
290 class PageNetGame : public AbstractPage |
290 class PageNetGame : public AbstractPage |
291 { |
291 { |
292 Q_OBJECT |
292 Q_OBJECT |
293 |
293 |
294 public: |
294 public: |
295 PageNetGame(QWidget* parent, QSettings * config, SDLInteraction * sdli); |
295 PageNetGame(QWidget* parent, QSettings * config, SDLInteraction * sdli); |
296 |
296 |
297 QPushButton *BtnBack; |
297 QPushButton *BtnBack; |
298 QPushButton *BtnGo; |
298 QPushButton *BtnGo; |
299 QPushButton *BtnMaster; |
299 QPushButton *BtnMaster; |
300 QPushButton *BtnStart; |
300 QPushButton *BtnStart; |
301 |
301 |
302 QAction * restrictJoins; |
302 QAction * restrictJoins; |
303 QAction * restrictTeamAdds; |
303 QAction * restrictTeamAdds; |
304 |
304 |
305 HWChatWidget* pChatWidget; |
305 HWChatWidget* pChatWidget; |
306 |
306 |
307 TeamSelWidget* pNetTeamsWidget; |
307 TeamSelWidget* pNetTeamsWidget; |
308 GameCFGWidget* pGameCFG; |
308 GameCFGWidget* pGameCFG; |
309 |
309 |
310 public slots: |
310 public slots: |
311 void setReadyStatus(bool isReady); |
311 void setReadyStatus(bool isReady); |
312 void setMasterMode(bool isMaster); |
312 void setMasterMode(bool isMaster); |
313 }; |
313 }; |
314 |
314 |
315 class PageInfo : public AbstractPage |
315 class PageInfo : public AbstractPage |
316 { |
316 { |
317 Q_OBJECT |
317 Q_OBJECT |
318 |
318 |
319 public: |
319 public: |
320 PageInfo(QWidget* parent = 0); |
320 PageInfo(QWidget* parent = 0); |
321 |
321 |
322 QPushButton *BtnBack; |
322 QPushButton *BtnBack; |
323 About *about; |
323 About *about; |
324 }; |
324 }; |
325 |
325 |
326 class PageSinglePlayer : public AbstractPage |
326 class PageSinglePlayer : public AbstractPage |
327 { |
327 { |
328 Q_OBJECT |
328 Q_OBJECT |
329 |
329 |
330 public: |
330 public: |
331 PageSinglePlayer(QWidget* parent = 0); |
331 PageSinglePlayer(QWidget* parent = 0); |
332 |
332 |
333 QPushButton *BtnSimpleGamePage; |
333 QPushButton *BtnSimpleGamePage; |
334 QPushButton *BtnTrainPage; |
334 QPushButton *BtnTrainPage; |
335 QPushButton *BtnMultiplayer; |
335 QPushButton *BtnMultiplayer; |
336 QPushButton *BtnLoad; |
336 QPushButton *BtnLoad; |
337 QPushButton *BtnDemos; |
337 QPushButton *BtnDemos; |
338 QPushButton *BtnBack; |
338 QPushButton *BtnBack; |
339 GameCFGWidget *gameCFG; |
339 GameCFGWidget *gameCFG; |
340 }; |
340 }; |
341 |
341 |
342 class PageTraining : public AbstractPage |
342 class PageTraining : public AbstractPage |
343 { |
343 { |
344 Q_OBJECT |
344 Q_OBJECT |
345 |
345 |
346 public: |
346 public: |
347 PageTraining(QWidget* parent = 0); |
347 PageTraining(QWidget* parent = 0); |
348 |
348 |
349 QPushButton *BtnStartTrain; |
349 QPushButton *BtnStartTrain; |
350 QPushButton *BtnBack; |
350 QPushButton *BtnBack; |
351 QComboBox *CBSelect; |
351 QComboBox *CBSelect; |
352 }; |
352 }; |
353 |
353 |
354 class PageSelectWeapon : public AbstractPage |
354 class PageSelectWeapon : public AbstractPage |
355 { |
355 { |
356 Q_OBJECT |
356 Q_OBJECT |
357 |
357 |
358 public: |
358 public: |
359 PageSelectWeapon(QWidget* parent = 0); |
359 PageSelectWeapon(QWidget* parent = 0); |
360 |
360 |
361 QPushButton *BtnSave; |
361 QPushButton *BtnSave; |
362 QPushButton *BtnDefault; |
362 QPushButton *BtnDefault; |
363 QPushButton *BtnDelete; |
363 QPushButton *BtnDelete; |
364 QPushButton *BtnBack; |
364 QPushButton *BtnBack; |
365 SelWeaponWidget* pWeapons; |
365 SelWeaponWidget* pWeapons; |
366 }; |
366 }; |
367 |
367 |
368 class PageInGame : public AbstractPage |
368 class PageInGame : public AbstractPage |
369 { |
369 { |
370 Q_OBJECT |
370 Q_OBJECT |
371 |
371 |
372 public: |
372 public: |
373 PageInGame(QWidget* parent = 0); |
373 PageInGame(QWidget* parent = 0); |
374 }; |
374 }; |
375 |
375 |
376 class PageRoomsList : public AbstractPage |
376 class PageRoomsList : public AbstractPage |
377 { |
377 { |
378 Q_OBJECT |
378 Q_OBJECT |
379 |
379 |
380 public: |
380 public: |
381 PageRoomsList(QWidget* parent, QSettings * config, SDLInteraction * sdli); |
381 PageRoomsList(QWidget* parent, QSettings * config, SDLInteraction * sdli); |
382 |
382 |
383 QLineEdit * roomName; |
383 QLineEdit * roomName; |
384 QTableWidget * roomsList; |
384 QTableWidget * roomsList; |
385 QPushButton * BtnBack; |
385 QPushButton * BtnBack; |
386 QPushButton * BtnCreate; |
386 QPushButton * BtnCreate; |
387 QPushButton * BtnJoin; |
387 QPushButton * BtnJoin; |
388 QPushButton * BtnRefresh; |
388 QPushButton * BtnRefresh; |
389 QPushButton * BtnAdmin; |
389 QPushButton * BtnAdmin; |
390 HWChatWidget * chatWidget; |
390 HWChatWidget * chatWidget; |
391 |
391 |
392 public slots: |
392 public slots: |
393 void setRoomsList(const QStringList & list); |
393 void setRoomsList(const QStringList & list); |
394 void setAdmin(bool); |
394 void setAdmin(bool); |
395 |
395 |
396 private slots: |
396 private slots: |
397 void onCreateClick(); |
397 void onCreateClick(); |
398 void onJoinClick(); |
398 void onJoinClick(); |
399 void onRefreshClick(); |
399 void onRefreshClick(); |
400 |
400 |
401 signals: |
401 signals: |
402 void askForCreateRoom(const QString &); |
402 void askForCreateRoom(const QString &); |
403 void askForJoinRoom(const QString &); |
403 void askForJoinRoom(const QString &); |
404 void askForRoomList(); |
404 void askForRoomList(); |
405 }; |
405 }; |
406 |
406 |
407 class PageConnecting : public AbstractPage |
407 class PageConnecting : public AbstractPage |
408 { |
408 { |
409 Q_OBJECT |
409 Q_OBJECT |
410 |
410 |
411 public: |
411 public: |
412 PageConnecting(QWidget* parent = 0); |
412 PageConnecting(QWidget* parent = 0); |
413 }; |
413 }; |
414 |
414 |
415 class PageScheme : public AbstractPage |
415 class PageScheme : public AbstractPage |
416 { |
416 { |
417 Q_OBJECT |
417 Q_OBJECT |
418 |
418 |
419 public: |
419 public: |
420 PageScheme(QWidget* parent = 0); |
420 PageScheme(QWidget* parent = 0); |
421 |
421 |
422 QPushButton * BtnBack; |
422 QPushButton * BtnBack; |
423 QPushButton * BtnNew; |
423 QPushButton * BtnNew; |
424 QPushButton * BtnDelete; |
424 QPushButton * BtnDelete; |
425 QPushButton * BtnSave; |
425 QPushButton * BtnSave; |
426 |
426 |
427 void setModel(QAbstractItemModel * model); |
427 void setModel(QAbstractItemModel * model); |
428 |
428 |
429 private: |
429 private: |
430 QDataWidgetMapper * mapper; |
430 QDataWidgetMapper * mapper; |
431 ToggleButtonWidget * TBW_mode_Forts; |
431 ToggleButtonWidget * TBW_mode_Forts; |
432 ToggleButtonWidget * TBW_teamsDivide; |
432 ToggleButtonWidget * TBW_teamsDivide; |
433 ToggleButtonWidget * TBW_solid; |
433 ToggleButtonWidget * TBW_solid; |
434 ToggleButtonWidget * TBW_border; |
434 ToggleButtonWidget * TBW_border; |
435 ToggleButtonWidget * TBW_lowGravity; |
435 ToggleButtonWidget * TBW_lowGravity; |
436 ToggleButtonWidget * TBW_laserSight; |
436 ToggleButtonWidget * TBW_laserSight; |
437 ToggleButtonWidget * TBW_invulnerable; |
437 ToggleButtonWidget * TBW_invulnerable; |
438 ToggleButtonWidget * TBW_mines; |
438 ToggleButtonWidget * TBW_mines; |
439 ToggleButtonWidget * TBW_vampiric; |
439 ToggleButtonWidget * TBW_vampiric; |
440 ToggleButtonWidget * TBW_karma; |
440 ToggleButtonWidget * TBW_karma; |
441 ToggleButtonWidget * TBW_artillery; |
441 ToggleButtonWidget * TBW_artillery; |
442 ToggleButtonWidget * TBW_randomorder; |
442 ToggleButtonWidget * TBW_randomorder; |
443 ToggleButtonWidget * TBW_king; |
443 ToggleButtonWidget * TBW_king; |
444 ToggleButtonWidget * TBW_placehog; |
444 ToggleButtonWidget * TBW_placehog; |
445 ToggleButtonWidget * TBW_sharedammo; |
445 ToggleButtonWidget * TBW_sharedammo; |
446 ToggleButtonWidget * TBW_disablegirders; |
446 ToggleButtonWidget * TBW_disablegirders; |
447 |
447 |
448 QSpinBox * SB_DamageModifier; |
448 QSpinBox * SB_DamageModifier; |
449 QSpinBox * SB_TurnTime; |
449 QSpinBox * SB_TurnTime; |
450 QSpinBox * SB_InitHealth; |
450 QSpinBox * SB_InitHealth; |
451 QSpinBox * SB_SuddenDeath; |
451 QSpinBox * SB_SuddenDeath; |
452 FreqSpinBox * SB_CaseProb; |
452 FreqSpinBox * SB_CaseProb; |
453 QSpinBox * SB_MinesTime; |
453 QSpinBox * SB_MinesTime; |
454 QSpinBox * SB_Mines; |
454 QSpinBox * SB_Mines; |
455 QSpinBox * SB_MineDuds; |
455 QSpinBox * SB_MineDuds; |
456 QSpinBox * SB_Explosives; |
456 QSpinBox * SB_Explosives; |
457 QLineEdit * LE_name; |
457 QLineEdit * LE_name; |
458 QComboBox * selectScheme; |
458 QComboBox * selectScheme; |
459 |
459 |
460 QGroupBox * gbGameModes; |
460 QGroupBox * gbGameModes; |
461 QGroupBox * gbBasicSettings; |
461 QGroupBox * gbBasicSettings; |
462 |
462 |
463 private slots: |
463 private slots: |
464 void newRow(); |
464 void newRow(); |
465 void deleteRow(); |
465 void deleteRow(); |
466 void schemeSelected(int); |
466 void schemeSelected(int); |
467 }; |
467 }; |
468 |
468 |
469 class PageAdmin : public AbstractPage |
469 class PageAdmin : public AbstractPage |
470 { |
470 { |
471 Q_OBJECT |
471 Q_OBJECT |
472 |
472 |
473 public: |
473 public: |
474 PageAdmin(QWidget* parent = 0); |
474 PageAdmin(QWidget* parent = 0); |
475 |
475 |
476 QPushButton * BtnBack; |
476 QPushButton * BtnBack; |
477 QPushButton * pbClearAccountsCache; |
477 QPushButton * pbClearAccountsCache; |
478 |
478 |
479 private: |
479 private: |
480 QLineEdit * leServerMessage; |
480 QLineEdit * leServerMessage; |
481 QPushButton * pbSetSM; |
481 QPushButton * pbSetSM; |
482 |
482 |
483 private slots: |
483 private slots: |
484 void smChanged(); |
484 void smChanged(); |
485 |
485 |
486 public slots: |
486 public slots: |
487 void serverMessage(const QString & str); |
487 void serverMessage(const QString & str); |
488 |
488 |
489 signals: |
489 signals: |
490 void setServerMessage(const QString & str); |
490 void setServerMessage(const QString & str); |
491 }; |
491 }; |
492 |
492 |
493 |
493 |
494 class PageNetType : public AbstractPage |
494 class PageNetType : public AbstractPage |
495 { |
495 { |
496 Q_OBJECT |
496 Q_OBJECT |
497 |
497 |
498 public: |
498 public: |
499 PageNetType(QWidget* parent = 0); |
499 PageNetType(QWidget* parent = 0); |
500 |
500 |
501 QPushButton * BtnBack; |
501 QPushButton * BtnBack; |
502 QPushButton * BtnLAN; |
502 QPushButton * BtnLAN; |
503 QPushButton * BtnOfficialServer; |
503 QPushButton * BtnOfficialServer; |
504 }; |
504 }; |
505 |
505 |
506 #endif // PAGES_H |
506 #endif // PAGES_H |