|
1 /* |
|
2 * Hedgewars, a worms-like game |
|
3 * Copyright (c) 2006 Andrey Korotaev <unC0Rr@gmail.com> |
|
4 * |
|
5 * Distributed under the terms of the BSD-modified licence: |
|
6 * |
|
7 * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
8 * of this software and associated documentation files (the "Software"), to deal |
|
9 * with the Software without restriction, including without limitation the |
|
10 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
|
11 * sell copies of the Software, and to permit persons to whom the Software is |
|
12 * furnished to do so, subject to the following conditions: |
|
13 * |
|
14 * 1. Redistributions of source code must retain the above copyright notice, |
|
15 * this list of conditions and the following disclaimer. |
|
16 * 2. Redistributions in binary form must reproduce the above copyright notice, |
|
17 * this list of conditions and the following disclaimer in the documentation |
|
18 * and/or other materials provided with the distribution. |
|
19 * 3. The name of the author may not be used to endorse or promote products |
|
20 * derived from this software without specific prior written permission. |
|
21 * |
|
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
|
23 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
|
25 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|
27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
|
28 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
|
29 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
|
30 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
|
31 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
32 */ |
|
33 |
|
34 #ifndef PAGES_H |
|
35 #define PAGES_H |
|
36 |
|
37 #include <QWidget> |
|
38 |
|
39 #include "binds.h" |
|
40 |
|
41 class GameCFGWidget; |
|
42 class QPushButton; |
|
43 class QGroupBox; |
|
44 class QComboBox; |
|
45 class QLabel; |
|
46 class QToolBox; |
|
47 class QLineEdit; |
|
48 class TeamSelWidget; |
|
49 class DemosList; |
|
50 class QListWidget; |
|
51 class QCheckBox; |
|
52 |
|
53 class PageMain : public QWidget |
|
54 { |
|
55 Q_OBJECT |
|
56 |
|
57 public: |
|
58 PageMain(QWidget* parent = 0); |
|
59 |
|
60 QPushButton *BtnSinglePlayer; |
|
61 QPushButton *BtnMultiplayer; |
|
62 QPushButton *BtnNet; |
|
63 QPushButton *BtnSetup; |
|
64 QPushButton *BtnDemos; |
|
65 QPushButton *BtnExit; |
|
66 }; |
|
67 |
|
68 class PageLocalGame : public QWidget |
|
69 { |
|
70 Q_OBJECT |
|
71 |
|
72 public: |
|
73 PageLocalGame(QWidget* parent = 0); |
|
74 |
|
75 QPushButton *BtnSimpleGame; |
|
76 QPushButton *BtnBack; |
|
77 GameCFGWidget *gameCFG; |
|
78 }; |
|
79 |
|
80 class PageEditTeam : public QWidget |
|
81 { |
|
82 Q_OBJECT |
|
83 |
|
84 public: |
|
85 PageEditTeam(QWidget* parent = 0); |
|
86 QGroupBox *GBoxHedgehogs; |
|
87 QGroupBox *GBoxTeam; |
|
88 QGroupBox *GBoxFort; |
|
89 QComboBox *CBFort; |
|
90 QLabel *FortPreview; |
|
91 QGroupBox *GBoxGrave; |
|
92 QComboBox *CBGrave; |
|
93 QLabel *GravePreview; |
|
94 QGroupBox *GBoxBinds; |
|
95 QToolBox *BindsBox; |
|
96 QWidget *page_A; |
|
97 QWidget *page_W; |
|
98 QWidget *page_WP; |
|
99 QWidget *page_O; |
|
100 QPushButton *BtnTeamDiscard; |
|
101 QPushButton *BtnTeamSave; |
|
102 QLineEdit * TeamNameEdit; |
|
103 QLineEdit * HHNameEdit[8]; |
|
104 QComboBox * CBBind[BINDS_NUMBER]; |
|
105 |
|
106 public slots: |
|
107 void CBGrave_activated(const QString & gravename); |
|
108 void CBFort_activated(const QString & gravename); |
|
109 |
|
110 private: |
|
111 QLabel * LBind[BINDS_NUMBER]; |
|
112 }; |
|
113 |
|
114 class PageMultiplayer : public QWidget |
|
115 { |
|
116 Q_OBJECT |
|
117 |
|
118 public: |
|
119 PageMultiplayer(QWidget* parent = 0); |
|
120 |
|
121 QPushButton *BtnBack; |
|
122 GameCFGWidget *gameCFG; |
|
123 TeamSelWidget *teamsSelect; |
|
124 }; |
|
125 |
|
126 class PagePlayDemo : public QWidget |
|
127 { |
|
128 Q_OBJECT |
|
129 |
|
130 public: |
|
131 PagePlayDemo(QWidget* parent = 0); |
|
132 |
|
133 QPushButton *BtnBack; |
|
134 QPushButton *BtnPlayDemo; |
|
135 QListWidget *DemosList; |
|
136 }; |
|
137 |
|
138 class PageOptions : public QWidget |
|
139 { |
|
140 Q_OBJECT |
|
141 |
|
142 public: |
|
143 PageOptions(QWidget* parent = 0); |
|
144 |
|
145 QPushButton *BtnBack; |
|
146 QGroupBox *groupBox; |
|
147 QPushButton *BtnNewTeam; |
|
148 QPushButton *BtnEditTeam; |
|
149 QComboBox *CBTeamName; |
|
150 QComboBox *CBResolution; |
|
151 QCheckBox *CBEnableSound; |
|
152 QCheckBox *CBFullscreen; |
|
153 QLabel *label; |
|
154 QLineEdit *editNetNick; |
|
155 QPushButton *BtnSaveOptions; |
|
156 }; |
|
157 |
|
158 class PageNet : public QWidget |
|
159 { |
|
160 Q_OBJECT |
|
161 |
|
162 public: |
|
163 PageNet(QWidget* parent = 0); |
|
164 |
|
165 QPushButton *BtnBack; |
|
166 QPushButton *BtnNetConnect; |
|
167 }; |
|
168 |
|
169 class PageNetChat : public QWidget |
|
170 { |
|
171 Q_OBJECT |
|
172 |
|
173 public: |
|
174 PageNetChat(QWidget* parent = 0); |
|
175 |
|
176 QPushButton *BtnDisconnect; |
|
177 QListWidget *ChannelsList; |
|
178 QPushButton *BtnJoin; |
|
179 QPushButton *BtnCreate; |
|
180 }; |
|
181 |
|
182 class PageNetGame : public QWidget |
|
183 { |
|
184 Q_OBJECT |
|
185 |
|
186 public: |
|
187 PageNetGame(QWidget* parent = 0); |
|
188 |
|
189 QPushButton *BtnBack; |
|
190 QPushButton *BtnAddTeam; |
|
191 QPushButton *BtnGo; |
|
192 QListWidget *listNetTeams; |
|
193 }; |
|
194 |
|
195 #endif // PAGES_H |