author | nemo |
Tue, 09 Feb 2010 01:47:50 +0000 | |
changeset 2773 | e94f240a8a41 |
parent 2762 | 2fbc8d35eb52 |
child 2776 | 9572aae13d49 |
permissions | -rw-r--r-- |
184 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
1395 | 3 |
* Copyright (c) 2006-2008 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> |
|
684 | 23 |
#include <QPushButton> |
24 |
#include <QFont> |
|
25 |
#include <QGridLayout> |
|
1840 | 26 |
#include <QSignalMapper> |
184 | 27 |
|
28 |
#include "binds.h" |
|
2515
51d3f4b6293a
revert audio to use SDL_mixer -- also frontend uses it, so it needs sdlmixer sources
koda
parents:
2468
diff
changeset
|
29 |
#include "hwform.h" |
322 | 30 |
#include "mapContainer.h" |
1932 | 31 |
#include "togglebutton.h" |
184 | 32 |
|
33 |
class QPushButton; |
|
34 |
class QGroupBox; |
|
35 |
class QComboBox; |
|
36 |
class QLabel; |
|
37 |
class QToolBox; |
|
38 |
class QLineEdit; |
|
665 | 39 |
class QListWidget; |
40 |
class QCheckBox; |
|
41 |
class QSpinBox; |
|
42 |
class QTextEdit; |
|
43 |
class QRadioButton; |
|
44 |
class QTableView; |
|
1377 | 45 |
class QTextBrowser; |
1399 | 46 |
class QTableWidget; |
1409
d1cbe4a57ebf
Add button for controlling room options (no usefull yet)
unc0rr
parents:
1399
diff
changeset
|
47 |
class QAction; |
1885 | 48 |
class QDataWidgetMapper; |
1887 | 49 |
class QAbstractItemModel; |
2773
e94f240a8a41
Have game beep when someone joins lobby/room. Controlled by Sound option
nemo
parents:
2762
diff
changeset
|
50 |
class QSettings; |
665 | 51 |
|
52 |
class GameCFGWidget; |
|
184 | 53 |
class TeamSelWidget; |
54 |
class DemosList; |
|
55 |
class SquareLabel; |
|
187 | 56 |
class About; |
297 | 57 |
class FPSEdit; |
461 | 58 |
class HWChatWidget; |
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
600
diff
changeset
|
59 |
class SelWeaponWidget; |
1192 | 60 |
class IconedGroupBox; |
1885 | 61 |
class FreqSpinBox; |
184 | 62 |
|
684 | 63 |
class AbstractPage : public QWidget |
64 |
{ |
|
1885 | 65 |
Q_OBJECT |
66 |
||
684 | 67 |
public: |
68 |
||
69 |
protected: |
|
70 |
AbstractPage(QWidget* parent = 0) { |
|
71 |
font14 = new QFont("MS Shell Dlg", 14); |
|
72 |
} |
|
73 |
virtual ~AbstractPage() {}; |
|
74 |
||
1152
c72b939c00df
Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents:
1150
diff
changeset
|
75 |
QPushButton* addButton(QString btname, QGridLayout* grid, int wy, int wx, bool iconed = false) { |
684 | 76 |
QPushButton* butt = new QPushButton(this); |
1152
c72b939c00df
Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents:
1150
diff
changeset
|
77 |
if (!iconed) { |
1148 | 78 |
butt->setFont(*font14); |
79 |
butt->setText(btname); |
|
1409
d1cbe4a57ebf
Add button for controlling room options (no usefull yet)
unc0rr
parents:
1399
diff
changeset
|
80 |
//butt->setStyleSheet("background-color: #0d0544"); |
1148 | 81 |
} else { |
82 |
const QIcon& lp=QIcon(btname); |
|
1152
c72b939c00df
Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents:
1150
diff
changeset
|
83 |
QSize sz = lp.actualSize(QSize(65535, 65535)); |
1148 | 84 |
butt->setIcon(lp); |
1152
c72b939c00df
Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents:
1150
diff
changeset
|
85 |
butt->setFixedSize(sz); |
1148 | 86 |
butt->setIconSize(sz); |
87 |
butt->setFlat(true); |
|
1149 | 88 |
butt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); |
1148 | 89 |
} |
684 | 90 |
grid->addWidget(butt, wy, wx); |
91 |
return butt; |
|
92 |
}; |
|
93 |
||
1152
c72b939c00df
Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents:
1150
diff
changeset
|
94 |
QPushButton* addButton(QString btname, QGridLayout* grid, int wy, int wx, int rowSpan, int columnSpan, bool iconed = false) { |
692 | 95 |
QPushButton* butt = new QPushButton(this); |
1152
c72b939c00df
Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents:
1150
diff
changeset
|
96 |
if (!iconed) { |
1148 | 97 |
butt->setFont(*font14); |
98 |
butt->setText(btname); |
|
99 |
} else { |
|
100 |
const QIcon& lp=QIcon(btname); |
|
1152
c72b939c00df
Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents:
1150
diff
changeset
|
101 |
QSize sz = lp.actualSize(QSize(65535, 65535)); |
1148 | 102 |
butt->setIcon(lp); |
1152
c72b939c00df
Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents:
1150
diff
changeset
|
103 |
butt->setFixedSize(sz); |
1148 | 104 |
butt->setIconSize(sz); |
105 |
butt->setFlat(true); |
|
1149 | 106 |
butt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); |
1148 | 107 |
} |
692 | 108 |
grid->addWidget(butt, wy, wx, rowSpan, columnSpan); |
109 |
return butt; |
|
110 |
}; |
|
111 |
||
1443 | 112 |
QPushButton* addButton(QString btname, QBoxLayout* box, int where, bool iconed = false) { |
684 | 113 |
QPushButton* butt = new QPushButton(this); |
1443 | 114 |
if (!iconed) { |
115 |
butt->setFont(*font14); |
|
116 |
butt->setText(btname); |
|
117 |
} else { |
|
118 |
const QIcon& lp=QIcon(btname); |
|
119 |
QSize sz = lp.actualSize(QSize(65535, 65535)); |
|
120 |
butt->setIcon(lp); |
|
121 |
butt->setFixedSize(sz); |
|
122 |
butt->setIconSize(sz); |
|
123 |
butt->setFlat(true); |
|
124 |
butt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); |
|
125 |
} |
|
684 | 126 |
box->addWidget(butt, where); |
127 |
return butt; |
|
128 |
}; |
|
129 |
||
130 |
QFont * font14; |
|
131 |
}; |
|
132 |
||
133 |
class PageMain : public AbstractPage |
|
184 | 134 |
{ |
135 |
Q_OBJECT |
|
136 |
||
137 |
public: |
|
138 |
PageMain(QWidget* parent = 0); |
|
139 |
||
140 |
QPushButton *BtnSinglePlayer; |
|
141 |
QPushButton *BtnNet; |
|
142 |
QPushButton *BtnSetup; |
|
187 | 143 |
QPushButton *BtnInfo; |
184 | 144 |
QPushButton *BtnExit; |
145 |
}; |
|
146 |
||
692 | 147 |
class PageEditTeam : public AbstractPage |
184 | 148 |
{ |
149 |
Q_OBJECT |
|
150 |
||
151 |
public: |
|
2516 | 152 |
PageEditTeam(QWidget* parent, SDLInteraction * sdli); |
1840 | 153 |
QSignalMapper* signalMapper; |
184 | 154 |
QGroupBox *GBoxHedgehogs; |
155 |
QGroupBox *GBoxTeam; |
|
156 |
QGroupBox *GBoxFort; |
|
157 |
QComboBox *CBFort; |
|
158 |
SquareLabel *FortPreview; |
|
159 |
QComboBox *CBGrave; |
|
2747 | 160 |
QComboBox *CBFlag; |
336 | 161 |
QComboBox *CBTeamLvl; |
1659 | 162 |
QComboBox *CBVoicepack; |
184 | 163 |
QGroupBox *GBoxBinds; |
164 |
QToolBox *BindsBox; |
|
165 |
QPushButton *BtnTeamDiscard; |
|
166 |
QPushButton *BtnTeamSave; |
|
1684 | 167 |
QPushButton * BtnTestSound; |
184 | 168 |
QLineEdit * TeamNameEdit; |
169 |
QLineEdit * HHNameEdit[8]; |
|
1236 | 170 |
QComboBox * HHHats[8]; |
1840 | 171 |
QPushButton * randButton[8]; |
184 | 172 |
QComboBox * CBBind[BINDS_NUMBER]; |
1840 | 173 |
QPushButton * randTeamButton; |
184 | 174 |
|
2516 | 175 |
private: |
176 |
SDLInteraction * mySdli; |
|
177 |
||
184 | 178 |
public slots: |
179 |
void CBFort_activated(const QString & gravename); |
|
180 |
||
1684 | 181 |
private slots: |
2516 | 182 |
void testSound(); |
184 | 183 |
}; |
184 |
||
692 | 185 |
class PageMultiplayer : public AbstractPage |
184 | 186 |
{ |
187 |
Q_OBJECT |
|
188 |
||
189 |
public: |
|
190 |
PageMultiplayer(QWidget* parent = 0); |
|
191 |
||
192 |
QPushButton *BtnBack; |
|
193 |
GameCFGWidget *gameCFG; |
|
194 |
TeamSelWidget *teamsSelect; |
|
195 |
QPushButton *BtnStartMPGame; |
|
196 |
}; |
|
197 |
||
692 | 198 |
class PageOptions : public AbstractPage |
184 | 199 |
{ |
200 |
Q_OBJECT |
|
201 |
||
202 |
public: |
|
203 |
PageOptions(QWidget* parent = 0); |
|
204 |
||
2747 | 205 |
QPushButton *WeaponsButt; |
206 |
QPushButton *WeaponEdit; |
|
207 |
QComboBox *WeaponsName; |
|
208 |
QCheckBox *WeaponTooltip; |
|
693 | 209 |
|
184 | 210 |
QPushButton *BtnBack; |
1194 | 211 |
IconedGroupBox *teamsBox; |
184 | 212 |
QPushButton *BtnNewTeam; |
213 |
QPushButton *BtnEditTeam; |
|
214 |
QComboBox *CBTeamName; |
|
1193 | 215 |
IconedGroupBox *AGGroupBox; |
184 | 216 |
QComboBox *CBResolution; |
217 |
QCheckBox *CBEnableSound; |
|
2443
fececcbc2189
Smaxx patch for fixing all sound related issues on any system
koda
parents:
2428
diff
changeset
|
218 |
#ifdef _WIN32 |
2392
a55dbef5cf31
Smaxx's patch fixing openal sound issues with poor card drivers
koda
parents:
2377
diff
changeset
|
219 |
QCheckBox *CBHardwareSound; |
2443
fececcbc2189
Smaxx patch for fixing all sound related issues on any system
koda
parents:
2428
diff
changeset
|
220 |
#endif |
1129 | 221 |
QCheckBox *CBEnableMusic; |
184 | 222 |
QCheckBox *CBFullscreen; |
1162 | 223 |
QCheckBox *CBFrontendFullscreen; |
297 | 224 |
QCheckBox *CBShowFPS; |
529 | 225 |
QCheckBox *CBAltDamage; |
1487
b4cc59a6d50a
Add an option to name records with current date and time
unc0rr
parents:
1443
diff
changeset
|
226 |
QCheckBox *CBNameWithDate; |
2261 | 227 |
#ifdef __APPLE__ |
228 |
QCheckBox *CBAutoUpdate; |
|
229 |
#endif |
|
2377 | 230 |
|
297 | 231 |
FPSEdit *fpsedit; |
184 | 232 |
QPushButton *BtnSaveOptions; |
647 | 233 |
QLabel *labelNN; |
1777 | 234 |
QSpinBox * volumeBox; |
647 | 235 |
QLineEdit *editNetNick; |
1812 | 236 |
QCheckBox *CBReduceQuality; |
2098
c977d7f2aa09
Toggle for stars ("frontend effects") - also turns off optimisations for stars that were causing problems onone machine
nemo
parents:
2031
diff
changeset
|
237 |
QCheckBox *CBFrontendEffects; |
184 | 238 |
}; |
239 |
||
1153 | 240 |
class PageNet : public AbstractPage |
184 | 241 |
{ |
242 |
Q_OBJECT |
|
243 |
||
244 |
public: |
|
245 |
PageNet(QWidget* parent = 0); |
|
246 |
||
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
247 |
QPushButton* BtnUpdateSList; |
665 | 248 |
QTableView * tvServersList; |
653
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
249 |
QPushButton * BtnBack; |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
250 |
QPushButton * BtnNetConnect; |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
251 |
QPushButton * BtnNetSvrStart; |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
252 |
QPushButton * BtnSpecifyServer; |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
253 |
|
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
254 |
private: |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
255 |
QGroupBox * ConnGroupBox; |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
256 |
QGridLayout * GBClayout; |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
257 |
|
646 | 258 |
private slots: |
259 |
void slotConnect(); |
|
260 |
||
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
261 |
public slots: |
646 | 262 |
void updateServersList(); |
263 |
||
264 |
signals: |
|
665 | 265 |
void connectClicked(const QString & host, quint16 port); |
646 | 266 |
}; |
267 |
||
1153 | 268 |
class PageNetServer : public AbstractPage |
646 | 269 |
{ |
270 |
Q_OBJECT |
|
271 |
||
272 |
public: |
|
273 |
PageNetServer(QWidget* parent = 0); |
|
274 |
||
275 |
QPushButton *BtnBack; |
|
276 |
QPushButton *BtnStart; |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
277 |
QPushButton *BtnDefault; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
278 |
QLabel *labelSD; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
279 |
QLineEdit *leServerDescr; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
280 |
QLabel *labelPort; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
281 |
QSpinBox *sbPort; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
282 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
283 |
private slots: |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
284 |
void setDefaultPort(); |
184 | 285 |
}; |
286 |
||
1153 | 287 |
class PageNetGame : public AbstractPage |
184 | 288 |
{ |
289 |
Q_OBJECT |
|
290 |
||
291 |
public: |
|
2773
e94f240a8a41
Have game beep when someone joins lobby/room. Controlled by Sound option
nemo
parents:
2762
diff
changeset
|
292 |
PageNetGame(QWidget* parent, QSettings * config, SDLInteraction * sdli); |
184 | 293 |
|
294 |
QPushButton *BtnBack; |
|
295 |
QPushButton *BtnGo; |
|
1409
d1cbe4a57ebf
Add button for controlling room options (no usefull yet)
unc0rr
parents:
1399
diff
changeset
|
296 |
QPushButton *BtnMaster; |
1951 | 297 |
QPushButton *BtnStart; |
2377 | 298 |
|
1409
d1cbe4a57ebf
Add button for controlling room options (no usefull yet)
unc0rr
parents:
1399
diff
changeset
|
299 |
QAction * restrictJoins; |
d1cbe4a57ebf
Add button for controlling room options (no usefull yet)
unc0rr
parents:
1399
diff
changeset
|
300 |
QAction * restrictTeamAdds; |
461 | 301 |
|
302 |
HWChatWidget* pChatWidget; |
|
322 | 303 |
|
304 |
TeamSelWidget* pNetTeamsWidget; |
|
305 |
GameCFGWidget* pGameCFG; |
|
1648 | 306 |
|
307 |
public slots: |
|
308 |
void setReadyStatus(bool isReady); |
|
1649 | 309 |
void setMasterMode(bool isMaster); |
184 | 310 |
}; |
311 |
||
1153 | 312 |
class PageInfo : public AbstractPage |
187 | 313 |
{ |
314 |
Q_OBJECT |
|
315 |
||
316 |
public: |
|
317 |
PageInfo(QWidget* parent = 0); |
|
318 |
||
319 |
QPushButton *BtnBack; |
|
320 |
About *about; |
|
321 |
}; |
|
322 |
||
1150 | 323 |
class PageSinglePlayer : public AbstractPage |
586 | 324 |
{ |
325 |
Q_OBJECT |
|
326 |
||
327 |
public: |
|
328 |
PageSinglePlayer(QWidget* parent = 0); |
|
329 |
||
330 |
QPushButton *BtnSimpleGamePage; |
|
331 |
QPushButton *BtnTrainPage; |
|
1150 | 332 |
QPushButton *BtnMultiplayer; |
333 |
QPushButton *BtnLoad; |
|
334 |
QPushButton *BtnDemos; |
|
586 | 335 |
QPushButton *BtnBack; |
336 |
GameCFGWidget *gameCFG; |
|
337 |
}; |
|
338 |
||
1153 | 339 |
class PageTraining : public AbstractPage |
587 | 340 |
{ |
341 |
Q_OBJECT |
|
342 |
||
343 |
public: |
|
344 |
PageTraining(QWidget* parent = 0); |
|
345 |
||
346 |
QPushButton *BtnStartTrain; |
|
347 |
QPushButton *BtnBack; |
|
2468
0b62498c201a
openal fix, training map selection and rcplane adjustments from Smaxx (untested, but look reasonable). Bunch of new graphics from Tiy, new translation for pt-pt from inu_
nemo
parents:
2443
diff
changeset
|
348 |
QComboBox *CBSelect; |
587 | 349 |
}; |
350 |
||
684 | 351 |
class PageSelectWeapon : public AbstractPage |
600 | 352 |
{ |
353 |
Q_OBJECT |
|
354 |
||
355 |
public: |
|
356 |
PageSelectWeapon(QWidget* parent = 0); |
|
357 |
||
683 | 358 |
QPushButton *BtnSave; |
359 |
QPushButton *BtnDefault; |
|
718 | 360 |
QPushButton *BtnDelete; |
600 | 361 |
QPushButton *BtnBack; |
1312 | 362 |
SelWeaponWidget* pWeapons; |
600 | 363 |
}; |
306 | 364 |
|
686 | 365 |
class PageInGame : public AbstractPage |
366 |
{ |
|
367 |
Q_OBJECT |
|
368 |
||
369 |
public: |
|
370 |
PageInGame(QWidget* parent = 0); |
|
371 |
}; |
|
372 |
||
1311 | 373 |
class PageRoomsList : public AbstractPage |
374 |
{ |
|
375 |
Q_OBJECT |
|
376 |
||
377 |
public: |
|
2773
e94f240a8a41
Have game beep when someone joins lobby/room. Controlled by Sound option
nemo
parents:
2762
diff
changeset
|
378 |
PageRoomsList(QWidget* parent, QSettings * config, SDLInteraction * sdli); |
1312 | 379 |
|
1314 | 380 |
QLineEdit * roomName; |
1399 | 381 |
QTableWidget * roomsList; |
1312 | 382 |
QPushButton * BtnBack; |
383 |
QPushButton * BtnCreate; |
|
384 |
QPushButton * BtnJoin; |
|
385 |
QPushButton * BtnRefresh; |
|
1856
e71dbf958c87
Enable admin button when have privilege. Button does nothing yet.
unc0rr
parents:
1840
diff
changeset
|
386 |
QPushButton * BtnAdmin; |
1522 | 387 |
HWChatWidget * chatWidget; |
2377 | 388 |
|
1313
f4c54e9e1b8c
- Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents:
1312
diff
changeset
|
389 |
public slots: |
f4c54e9e1b8c
- Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents:
1312
diff
changeset
|
390 |
void setRoomsList(const QStringList & list); |
1856
e71dbf958c87
Enable admin button when have privilege. Button does nothing yet.
unc0rr
parents:
1840
diff
changeset
|
391 |
void setAdmin(bool); |
1314 | 392 |
|
393 |
private slots: |
|
394 |
void onCreateClick(); |
|
395 |
void onJoinClick(); |
|
1315 | 396 |
void onRefreshClick(); |
2377 | 397 |
|
1313
f4c54e9e1b8c
- Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents:
1312
diff
changeset
|
398 |
signals: |
f4c54e9e1b8c
- Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents:
1312
diff
changeset
|
399 |
void askForCreateRoom(const QString &); |
f4c54e9e1b8c
- Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents:
1312
diff
changeset
|
400 |
void askForJoinRoom(const QString &); |
1315 | 401 |
void askForRoomList(); |
1311 | 402 |
}; |
403 |
||
1800 | 404 |
class PageConnecting : public AbstractPage |
405 |
{ |
|
406 |
Q_OBJECT |
|
407 |
||
408 |
public: |
|
409 |
PageConnecting(QWidget* parent = 0); |
|
410 |
}; |
|
411 |
||
1884 | 412 |
class PageScheme : public AbstractPage |
413 |
{ |
|
414 |
Q_OBJECT |
|
415 |
||
416 |
public: |
|
417 |
PageScheme(QWidget* parent = 0); |
|
1885 | 418 |
|
1887 | 419 |
QPushButton * BtnBack; |
1889 | 420 |
QPushButton * BtnNew; |
1902
aeadb10c2d77
Add delete button and scheme selection combobox to scheme edit page
unc0rr
parents:
1895
diff
changeset
|
421 |
QPushButton * BtnDelete; |
1887 | 422 |
QPushButton * BtnSave; |
423 |
||
424 |
void setModel(QAbstractItemModel * model); |
|
1885 | 425 |
|
426 |
private: |
|
1887 | 427 |
QDataWidgetMapper * mapper; |
1932 | 428 |
ToggleButtonWidget * TBW_mode_Forts; |
429 |
ToggleButtonWidget * TBW_teamsDivide; |
|
430 |
ToggleButtonWidget * TBW_solid; |
|
431 |
ToggleButtonWidget * TBW_border; |
|
432 |
ToggleButtonWidget * TBW_lowGravity; |
|
433 |
ToggleButtonWidget * TBW_laserSight; |
|
434 |
ToggleButtonWidget * TBW_invulnerable; |
|
435 |
ToggleButtonWidget * TBW_mines; |
|
2017 | 436 |
ToggleButtonWidget * TBW_vampiric; |
437 |
ToggleButtonWidget * TBW_karma; |
|
2023
41d3afaa20c7
Artillery mode, sniper rifle, speech bubble tweaks, fix of rope bug introduced by enabling hats in jump
nemo
parents:
2017
diff
changeset
|
438 |
ToggleButtonWidget * TBW_artillery; |
2703 | 439 |
ToggleButtonWidget * TBW_randomorder; |
2726 | 440 |
ToggleButtonWidget * TBW_king; |
2762
2fbc8d35eb52
Mode to place hogs at start of game. Will probably need a bit more testing.
nemo
parents:
2747
diff
changeset
|
441 |
ToggleButtonWidget * TBW_placehog; |
1895 | 442 |
|
443 |
QSpinBox * SB_DamageModifier; |
|
1885 | 444 |
QSpinBox * SB_TurnTime; |
445 |
QSpinBox * SB_InitHealth; |
|
446 |
QSpinBox * SB_SuddenDeath; |
|
447 |
FreqSpinBox * SB_CaseProb; |
|
2031
b6f3e56fb100
david_ac's game scheme options for mine delay/quantity, tweaks to sniper rifle
nemo
parents:
2023
diff
changeset
|
448 |
QSpinBox * SB_MinesTime; |
b6f3e56fb100
david_ac's game scheme options for mine delay/quantity, tweaks to sniper rifle
nemo
parents:
2023
diff
changeset
|
449 |
QSpinBox * SB_Mines; |
1885 | 450 |
QLineEdit * LE_name; |
1902
aeadb10c2d77
Add delete button and scheme selection combobox to scheme edit page
unc0rr
parents:
1895
diff
changeset
|
451 |
QComboBox * selectScheme; |
1889 | 452 |
|
1984 | 453 |
QGroupBox * gbGameModes; |
454 |
QGroupBox * gbBasicSettings; |
|
455 |
||
1889 | 456 |
private slots: |
457 |
void newRow(); |
|
1902
aeadb10c2d77
Add delete button and scheme selection combobox to scheme edit page
unc0rr
parents:
1895
diff
changeset
|
458 |
void deleteRow(); |
1984 | 459 |
void schemeSelected(int); |
1884 | 460 |
}; |
461 |
||
1905 | 462 |
class PageAdmin : public AbstractPage |
463 |
{ |
|
464 |
Q_OBJECT |
|
465 |
||
466 |
public: |
|
467 |
PageAdmin(QWidget* parent = 0); |
|
468 |
||
469 |
QPushButton * BtnBack; |
|
2155
d897222d3339
Implement ability for server admin to clear accounts cache
unc0rr
parents:
2098
diff
changeset
|
470 |
QPushButton * pbClearAccountsCache; |
1924 | 471 |
|
472 |
private: |
|
473 |
QLineEdit * leServerMessage; |
|
474 |
QPushButton * pbSetSM; |
|
475 |
||
476 |
private slots: |
|
477 |
void smChanged(); |
|
478 |
||
479 |
public slots: |
|
480 |
void serverMessage(const QString & str); |
|
481 |
||
482 |
signals: |
|
483 |
void setServerMessage(const QString & str); |
|
1905 | 484 |
}; |
485 |
||
1950 | 486 |
|
487 |
class PageNetType : public AbstractPage |
|
488 |
{ |
|
489 |
Q_OBJECT |
|
490 |
||
491 |
public: |
|
492 |
PageNetType(QWidget* parent = 0); |
|
493 |
||
494 |
QPushButton * BtnBack; |
|
495 |
QPushButton * BtnLAN; |
|
496 |
QPushButton * BtnOfficialServer; |
|
497 |
}; |
|
498 |
||
184 | 499 |
#endif // PAGES_H |