|
1 /* |
|
2 * Hedgewars, a free turn based strategy game |
|
3 * Copyright (c) 2006-2011 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 PAGE_OPTIONS_H |
|
20 #define PAGE_OPTIONS_H |
|
21 |
|
22 #include "AbstractPage.h" |
|
23 |
|
24 class FPSEdit; |
|
25 class IconedGroupBox; |
|
26 |
|
27 class PageOptions : public AbstractPage |
|
28 { |
|
29 Q_OBJECT |
|
30 |
|
31 public: |
|
32 PageOptions(QWidget* parent = 0); |
|
33 |
|
34 QCheckBox *WeaponTooltip; |
|
35 QPushButton *WeaponNew; |
|
36 QPushButton *WeaponEdit; |
|
37 QPushButton *WeaponDelete; |
|
38 QComboBox *WeaponsName; |
|
39 QPushButton *SchemeNew; |
|
40 QPushButton *SchemeEdit; |
|
41 QPushButton *SchemeDelete; |
|
42 QComboBox *SchemesName; |
|
43 |
|
44 QComboBox *CBLanguage; |
|
45 |
|
46 IconedGroupBox *teamsBox;; |
|
47 QPushButton *BtnAssociateFiles; |
|
48 QComboBox *CBTeamName; |
|
49 IconedGroupBox *AGGroupBox; |
|
50 QComboBox *CBResolution; |
|
51 QComboBox *CBStereoMode; |
|
52 QCheckBox *CBEnableSound; |
|
53 QCheckBox *CBEnableFrontendSound; |
|
54 QCheckBox *CBEnableMusic; |
|
55 QCheckBox *CBEnableFrontendMusic; |
|
56 QCheckBox *CBFullscreen; |
|
57 QCheckBox *CBFrontendFullscreen; |
|
58 QCheckBox *CBShowFPS; |
|
59 QCheckBox *CBAltDamage; |
|
60 QCheckBox *CBNameWithDate; |
|
61 #ifdef __APPLE__ |
|
62 QCheckBox *CBAutoUpdate; |
|
63 #endif |
|
64 |
|
65 FPSEdit *fpsedit; |
|
66 QPushButton *btnSave; |
|
67 QLabel *labelNN; |
|
68 QLabel *labelNetPassword; |
|
69 QSpinBox * volumeBox; |
|
70 QLineEdit *editNetNick; |
|
71 QLineEdit *editNetPassword; |
|
72 QSlider *SLQuality; |
|
73 QCheckBox *CBFrontendEffects; |
|
74 |
|
75 void setTeamOptionsEnabled(bool enabled); |
|
76 |
|
77 signals: |
|
78 void newTeamRequested(); |
|
79 void editTeamRequested(const QString & teamName); |
|
80 void deleteTeamRequested(const QString & teamName); |
|
81 |
|
82 |
|
83 private: |
|
84 QLayout * bodyLayoutDefinition(); |
|
85 QLayout * footerLayoutDefinition(); |
|
86 void connectSignals(); |
|
87 |
|
88 bool previousFullscreenValue; |
|
89 int previousResolutionIndex; |
|
90 int previousQuality; |
|
91 QLabel *LblNoEditTeam; |
|
92 QPushButton *BtnNewTeam; |
|
93 QPushButton *BtnEditTeam; |
|
94 QPushButton *BtnDeleteTeam; |
|
95 |
|
96 private slots: |
|
97 void forceFullscreen(int index); |
|
98 void setFullscreen(int state); |
|
99 void setResolution(int state); |
|
100 void setQuality(int value); |
|
101 void trimNetNick(); |
|
102 void requestEditSelectedTeam(); |
|
103 void requestDeleteSelectedTeam(); |
|
104 }; |
|
105 |
|
106 #endif |
|
107 |