134 }; |
121 }; |
135 |
122 |
136 QFont * font14; |
123 QFont * font14; |
137 }; |
124 }; |
138 |
125 |
139 class PageMain : public AbstractPage |
|
140 { |
|
141 Q_OBJECT |
|
142 |
|
143 public: |
|
144 PageMain(QWidget* parent = 0); |
|
145 |
|
146 QPushButton *BtnSinglePlayer; |
|
147 QPushButton *BtnNet; |
|
148 QPushButton *BtnSetup; |
|
149 QPushButton *BtnInfo; |
|
150 QPushButton *BtnExit; |
|
151 QLabel *mainNote; |
|
152 }; |
|
153 |
|
154 class PageEditTeam : public AbstractPage |
|
155 { |
|
156 Q_OBJECT |
|
157 |
|
158 public: |
|
159 PageEditTeam(QWidget* parent, SDLInteraction * sdli); |
|
160 QSignalMapper* signalMapper; |
|
161 QGroupBox *GBoxHedgehogs; |
|
162 QGroupBox *GBoxTeam; |
|
163 QGroupBox *GBoxFort; |
|
164 QComboBox *CBFort; |
|
165 SquareLabel *FortPreview; |
|
166 QComboBox *CBGrave; |
|
167 QComboBox *CBFlag; |
|
168 QComboBox *CBTeamLvl; |
|
169 QComboBox *CBVoicepack; |
|
170 QGroupBox *GBoxBinds; |
|
171 QToolBox *BindsBox; |
|
172 QPushButton *BtnTeamDiscard; |
|
173 QPushButton *BtnTeamSave; |
|
174 QPushButton * BtnTestSound; |
|
175 QLineEdit * TeamNameEdit; |
|
176 QLineEdit * HHNameEdit[8]; |
|
177 QComboBox * HHHats[8]; |
|
178 QPushButton * randButton[8]; |
|
179 QComboBox * CBBind[BINDS_NUMBER]; |
|
180 QPushButton * randTeamButton; |
|
181 |
|
182 private: |
|
183 SDLInteraction * mySdli; |
|
184 |
|
185 public slots: |
|
186 void CBFort_activated(const QString & gravename); |
|
187 |
|
188 private slots: |
|
189 void testSound(); |
|
190 }; |
|
191 |
|
192 class PageMultiplayer : public AbstractPage |
|
193 { |
|
194 Q_OBJECT |
|
195 |
|
196 public: |
|
197 PageMultiplayer(QWidget* parent = 0); |
|
198 |
|
199 QPushButton *BtnBack; |
|
200 GameCFGWidget *gameCFG; |
|
201 TeamSelWidget *teamsSelect; |
|
202 QPushButton *BtnStartMPGame; |
|
203 |
|
204 signals: |
|
205 void SetupClicked(); |
|
206 }; |
|
207 |
|
208 class PageOptions : public AbstractPage |
|
209 { |
|
210 Q_OBJECT |
|
211 |
|
212 public: |
|
213 PageOptions(QWidget* parent = 0); |
|
214 |
|
215 QCheckBox *WeaponTooltip; |
|
216 QPushButton *WeaponNew; |
|
217 QPushButton *WeaponEdit; |
|
218 QPushButton *WeaponDelete; |
|
219 QComboBox *WeaponsName; |
|
220 QPushButton *SchemeNew; |
|
221 QPushButton *SchemeEdit; |
|
222 QPushButton *SchemeDelete; |
|
223 QComboBox *SchemesName; |
|
224 |
|
225 QComboBox *CBLanguage; |
|
226 |
|
227 QPushButton *BtnBack; |
|
228 IconedGroupBox *teamsBox; |
|
229 QPushButton *BtnNewTeam; |
|
230 QPushButton *BtnEditTeam; |
|
231 QPushButton *BtnDeleteTeam; |
|
232 QPushButton *BtnAssociateFiles; |
|
233 QLabel *LblNoEditTeam; |
|
234 QComboBox *CBTeamName; |
|
235 IconedGroupBox *AGGroupBox; |
|
236 QComboBox *CBResolution; |
|
237 QComboBox *CBStereoMode; |
|
238 QCheckBox *CBEnableSound; |
|
239 QCheckBox *CBEnableFrontendSound; |
|
240 QCheckBox *CBEnableMusic; |
|
241 QCheckBox *CBEnableFrontendMusic; |
|
242 QCheckBox *CBFullscreen; |
|
243 QCheckBox *CBFrontendFullscreen; |
|
244 QCheckBox *CBShowFPS; |
|
245 QCheckBox *CBAltDamage; |
|
246 QCheckBox *CBNameWithDate; |
|
247 #ifdef __APPLE__ |
|
248 QCheckBox *CBAutoUpdate; |
|
249 #endif |
|
250 |
|
251 FPSEdit *fpsedit; |
|
252 QPushButton *BtnSaveOptions; |
|
253 QLabel *labelNN; |
|
254 QSpinBox * volumeBox; |
|
255 QLineEdit *editNetNick; |
|
256 QSlider *SLQuality; |
|
257 QCheckBox *CBFrontendEffects; |
|
258 |
|
259 private: |
|
260 bool previousFullscreenValue; |
|
261 int previousResolutionIndex; |
|
262 int previousQuality; |
|
263 |
|
264 private slots: |
|
265 void forceFullscreen(int index); |
|
266 void setFullscreen(void); |
|
267 void trimNetNick(); |
|
268 }; |
|
269 |
|
270 class PageNet : public AbstractPage |
|
271 { |
|
272 Q_OBJECT |
|
273 |
|
274 public: |
|
275 PageNet(QWidget* parent = 0); |
|
276 |
|
277 QPushButton* BtnUpdateSList; |
|
278 QTableView * tvServersList; |
|
279 QPushButton * BtnBack; |
|
280 QPushButton * BtnNetConnect; |
|
281 QPushButton * BtnNetSvrStart; |
|
282 QPushButton * BtnSpecifyServer; |
|
283 |
|
284 private: |
|
285 QGroupBox * ConnGroupBox; |
|
286 QGridLayout * GBClayout; |
|
287 |
|
288 private slots: |
|
289 void slotConnect(); |
|
290 |
|
291 public slots: |
|
292 void updateServersList(); |
|
293 |
|
294 signals: |
|
295 void connectClicked(const QString & host, quint16 port); |
|
296 }; |
|
297 |
|
298 class PageNetServer : public AbstractPage |
|
299 { |
|
300 Q_OBJECT |
|
301 |
|
302 public: |
|
303 PageNetServer(QWidget* parent = 0); |
|
304 |
|
305 QPushButton *BtnBack; |
|
306 QPushButton *BtnStart; |
|
307 QPushButton *BtnDefault; |
|
308 QLabel *labelSD; |
|
309 QLineEdit *leServerDescr; |
|
310 QLabel *labelPort; |
|
311 QSpinBox *sbPort; |
|
312 |
|
313 private slots: |
|
314 void setDefaultPort(); |
|
315 }; |
|
316 |
|
317 class PageNetGame : public AbstractPage |
|
318 { |
|
319 Q_OBJECT |
|
320 |
|
321 public: |
|
322 PageNetGame(QWidget* parent, QSettings * config, SDLInteraction * sdli); |
|
323 |
|
324 QPushButton *BtnBack; |
|
325 QPushButton *BtnGo; |
|
326 QPushButton *BtnMaster; |
|
327 QPushButton *BtnStart; |
|
328 QPushButton *BtnUpdate; |
|
329 |
|
330 QLineEdit * leRoomName; |
|
331 |
|
332 QAction * restrictJoins; |
|
333 QAction * restrictTeamAdds; |
|
334 |
|
335 HWChatWidget* pChatWidget; |
|
336 |
|
337 TeamSelWidget* pNetTeamsWidget; |
|
338 GameCFGWidget* pGameCFG; |
|
339 |
|
340 public slots: |
|
341 void setReadyStatus(bool isReady); |
|
342 void onUpdateClick(); |
|
343 void setMasterMode(bool isMaster); |
|
344 |
|
345 signals: |
|
346 void SetupClicked(); |
|
347 void askForUpdateRoomName(const QString &); |
|
348 }; |
|
349 |
|
350 class PageInfo : public AbstractPage |
|
351 { |
|
352 Q_OBJECT |
|
353 |
|
354 public: |
|
355 PageInfo(QWidget* parent = 0); |
|
356 |
|
357 QPushButton *BtnBack; |
|
358 About *about; |
|
359 }; |
|
360 |
|
361 class PageSinglePlayer : public AbstractPage |
|
362 { |
|
363 Q_OBJECT |
|
364 |
|
365 public: |
|
366 PageSinglePlayer(QWidget* parent = 0); |
|
367 |
|
368 QPushButton *BtnSimpleGamePage; |
|
369 QPushButton *BtnTrainPage; |
|
370 QPushButton *BtnCampaignPage; |
|
371 QPushButton *BtnMultiplayer; |
|
372 QPushButton *BtnLoad; |
|
373 QPushButton *BtnDemos; |
|
374 QPushButton *BtnBack; |
|
375 GameCFGWidget *gameCFG; |
|
376 }; |
|
377 |
|
378 class PageTraining : public AbstractPage |
|
379 { |
|
380 Q_OBJECT |
|
381 |
|
382 public: |
|
383 PageTraining(QWidget* parent = 0); |
|
384 |
|
385 QPushButton *BtnStartTrain; |
|
386 QPushButton *BtnBack; |
|
387 QComboBox *CBSelect; |
|
388 }; |
|
389 |
|
390 class PageCampaign : public AbstractPage |
|
391 { |
|
392 Q_OBJECT |
|
393 |
|
394 public: |
|
395 PageCampaign(QWidget* parent = 0); |
|
396 |
|
397 QPushButton *BtnStartCampaign; |
|
398 QPushButton *BtnBack; |
|
399 QComboBox *CBSelect; |
|
400 QComboBox *CBTeam; |
|
401 }; |
|
402 |
|
403 class PageSelectWeapon : public AbstractPage |
|
404 { |
|
405 Q_OBJECT |
|
406 |
|
407 public: |
|
408 PageSelectWeapon(QWidget* parent = 0); |
|
409 |
|
410 QPushButton *BtnSave; |
|
411 QPushButton *BtnDefault; |
|
412 QPushButton *BtnDelete; |
|
413 QPushButton *BtnNew; |
|
414 QPushButton *BtnCopy; |
|
415 QPushButton *BtnBack; |
|
416 SelWeaponWidget* pWeapons; |
|
417 QComboBox* selectWeaponSet; |
|
418 }; |
|
419 |
|
420 class PageInGame : public AbstractPage |
|
421 { |
|
422 Q_OBJECT |
|
423 |
|
424 public: |
|
425 PageInGame(QWidget* parent = 0); |
|
426 }; |
|
427 |
|
428 class PageRoomsList : public AbstractPage |
|
429 { |
|
430 Q_OBJECT |
|
431 |
|
432 public: |
|
433 PageRoomsList(QWidget* parent, QSettings * config, SDLInteraction * sdli); |
|
434 |
|
435 QLineEdit * roomName; |
|
436 QLineEdit * searchText; |
|
437 QTableWidget * roomsList; |
|
438 QPushButton * BtnBack; |
|
439 QPushButton * BtnCreate; |
|
440 QPushButton * BtnJoin; |
|
441 QPushButton * BtnRefresh; |
|
442 QPushButton * BtnAdmin; |
|
443 QPushButton * BtnClear; |
|
444 QComboBox * CBState; |
|
445 QComboBox * CBRules; |
|
446 QComboBox * CBWeapons; |
|
447 HWChatWidget * chatWidget; |
|
448 |
|
449 private: |
|
450 bool gameInLobby; |
|
451 QString gameInLobbyName; |
|
452 QStringList listFromServer; |
|
453 AmmoSchemeModel * ammoSchemeModel; |
|
454 |
|
455 public slots: |
|
456 void setRoomsList(const QStringList & list); |
|
457 void setAdmin(bool); |
|
458 |
|
459 private slots: |
|
460 void onCreateClick(); |
|
461 void onJoinClick(); |
|
462 void onRefreshClick(); |
|
463 void onClearClick(); |
|
464 void onJoinConfirmation(const QString &); |
|
465 |
|
466 signals: |
|
467 void askForCreateRoom(const QString &); |
|
468 void askForJoinRoom(const QString &); |
|
469 void askForRoomList(); |
|
470 void askJoinConfirmation(const QString &); |
|
471 }; |
|
472 |
|
473 class PageConnecting : public AbstractPage |
|
474 { |
|
475 Q_OBJECT |
|
476 |
|
477 public: |
|
478 PageConnecting(QWidget* parent = 0); |
|
479 |
|
480 signals: |
|
481 void cancelConnection(); |
|
482 }; |
|
483 |
|
484 class PageScheme : public AbstractPage |
|
485 { |
|
486 Q_OBJECT |
|
487 |
|
488 public: |
|
489 PageScheme(QWidget* parent = 0); |
|
490 |
|
491 QPushButton * BtnBack; |
|
492 QPushButton * BtnCopy; |
|
493 QPushButton * BtnNew; |
|
494 QPushButton * BtnDelete; |
|
495 QPushButton * BtnSave; |
|
496 QComboBox * selectScheme; |
|
497 |
|
498 void setModel(QAbstractItemModel * model); |
|
499 |
|
500 public slots: |
|
501 void newRow(); |
|
502 void copyRow(); |
|
503 void deleteRow(); |
|
504 |
|
505 private: |
|
506 QDataWidgetMapper * mapper; |
|
507 ToggleButtonWidget * TBW_mode_Forts; |
|
508 ToggleButtonWidget * TBW_teamsDivide; |
|
509 ToggleButtonWidget * TBW_solid; |
|
510 ToggleButtonWidget * TBW_border; |
|
511 ToggleButtonWidget * TBW_lowGravity; |
|
512 ToggleButtonWidget * TBW_laserSight; |
|
513 ToggleButtonWidget * TBW_invulnerable; |
|
514 ToggleButtonWidget * TBW_resethealth; |
|
515 ToggleButtonWidget * TBW_vampiric; |
|
516 ToggleButtonWidget * TBW_karma; |
|
517 ToggleButtonWidget * TBW_artillery; |
|
518 ToggleButtonWidget * TBW_randomorder; |
|
519 ToggleButtonWidget * TBW_king; |
|
520 ToggleButtonWidget * TBW_placehog; |
|
521 ToggleButtonWidget * TBW_sharedammo; |
|
522 ToggleButtonWidget * TBW_disablegirders; |
|
523 ToggleButtonWidget * TBW_disablelandobjects; |
|
524 ToggleButtonWidget * TBW_aisurvival; |
|
525 ToggleButtonWidget * TBW_infattack; |
|
526 ToggleButtonWidget * TBW_resetweps; |
|
527 ToggleButtonWidget * TBW_perhogammo; |
|
528 ToggleButtonWidget * TBW_nowind; |
|
529 ToggleButtonWidget * TBW_morewind; |
|
530 ToggleButtonWidget * TBW_tagteam; |
|
531 |
|
532 QSpinBox * SB_DamageModifier; |
|
533 QSpinBox * SB_TurnTime; |
|
534 QSpinBox * SB_InitHealth; |
|
535 QSpinBox * SB_SuddenDeath; |
|
536 QSpinBox * SB_WaterRise; |
|
537 QSpinBox * SB_HealthDecrease; |
|
538 FreqSpinBox * SB_CaseProb; |
|
539 QSpinBox * SB_HealthCrates; |
|
540 QSpinBox * SB_CrateHealth; |
|
541 QSpinBox * SB_MinesTime; |
|
542 QSpinBox * SB_Mines; |
|
543 QSpinBox * SB_MineDuds; |
|
544 QSpinBox * SB_Explosives; |
|
545 QSpinBox * SB_RopeModifier; |
|
546 QSpinBox * SB_GetAwayTime; |
|
547 QLineEdit * LE_name; |
|
548 |
|
549 QGroupBox * gbGameModes; |
|
550 QGroupBox * gbBasicSettings; |
|
551 |
|
552 private slots: |
|
553 void schemeSelected(int); |
|
554 |
|
555 }; |
|
556 |
|
557 class PageAdmin : public AbstractPage |
|
558 { |
|
559 Q_OBJECT |
|
560 |
|
561 public: |
|
562 PageAdmin(QWidget* parent = 0); |
|
563 |
|
564 QPushButton * BtnBack; |
|
565 QPushButton * pbClearAccountsCache; |
|
566 |
|
567 private: |
|
568 QLineEdit * leServerMessageNew; |
|
569 QLineEdit * leServerMessageOld; |
|
570 QPushButton * pbSetSM; |
|
571 QPushButton * pbAsk; |
|
572 QSpinBox * sbProtocol; |
|
573 QTextBrowser * tb; |
|
574 |
|
575 private slots: |
|
576 void smChanged(); |
|
577 |
|
578 public slots: |
|
579 void serverMessageNew(const QString & str); |
|
580 void serverMessageOld(const QString & str); |
|
581 void protocol(int proto); |
|
582 |
|
583 signals: |
|
584 void setServerMessageNew(const QString & str); |
|
585 void setServerMessageOld(const QString & str); |
|
586 void setProtocol(int proto); |
|
587 void askServerVars(); |
|
588 }; |
|
589 |
|
590 |
|
591 class PageNetType : public AbstractPage |
|
592 { |
|
593 Q_OBJECT |
|
594 |
|
595 public: |
|
596 PageNetType(QWidget* parent = 0); |
|
597 |
|
598 QPushButton * BtnBack; |
|
599 QPushButton * BtnLAN; |
|
600 QPushButton * BtnOfficialServer; |
|
601 }; |
|
602 |
|
603 |
|
604 class PageDrawMap : public AbstractPage |
|
605 { |
|
606 Q_OBJECT |
|
607 |
|
608 public: |
|
609 PageDrawMap(QWidget* parent = 0); |
|
610 |
|
611 QPushButton * BtnBack; |
|
612 |
|
613 DrawMapWidget * drawMapWidget; |
|
614 |
|
615 private slots: |
|
616 void load(); |
|
617 void save(); |
|
618 }; |
|
619 |
|
620 #endif // PAGES_H |
126 #endif // PAGES_H |