author | smxx |
Wed, 10 Feb 2010 17:13:49 +0000 | |
changeset 2794 | befd3808c63a |
parent 2776 | 9572aae13d49 |
child 2881 | 70d7976fa829 |
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; |
|
2776 | 218 |
QCheckBox *CBEnableFrontendSound; |
2443
fececcbc2189
Smaxx patch for fixing all sound related issues on any system
koda
parents:
2428
diff
changeset
|
219 |
#ifdef _WIN32 |
2392
a55dbef5cf31
Smaxx's patch fixing openal sound issues with poor card drivers
koda
parents:
2377
diff
changeset
|
220 |
QCheckBox *CBHardwareSound; |
2443
fececcbc2189
Smaxx patch for fixing all sound related issues on any system
koda
parents:
2428
diff
changeset
|
221 |
#endif |
1129 | 222 |
QCheckBox *CBEnableMusic; |
2776 | 223 |
QCheckBox *CBEnableFrontendMusic; |
184 | 224 |
QCheckBox *CBFullscreen; |
1162 | 225 |
QCheckBox *CBFrontendFullscreen; |
297 | 226 |
QCheckBox *CBShowFPS; |
529 | 227 |
QCheckBox *CBAltDamage; |
1487
b4cc59a6d50a
Add an option to name records with current date and time
unc0rr
parents:
1443
diff
changeset
|
228 |
QCheckBox *CBNameWithDate; |
2261 | 229 |
#ifdef __APPLE__ |
230 |
QCheckBox *CBAutoUpdate; |
|
231 |
#endif |
|
2377 | 232 |
|
297 | 233 |
FPSEdit *fpsedit; |
184 | 234 |
QPushButton *BtnSaveOptions; |
647 | 235 |
QLabel *labelNN; |
1777 | 236 |
QSpinBox * volumeBox; |
647 | 237 |
QLineEdit *editNetNick; |
1812 | 238 |
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
|
239 |
QCheckBox *CBFrontendEffects; |
184 | 240 |
}; |
241 |
||
1153 | 242 |
class PageNet : public AbstractPage |
184 | 243 |
{ |
244 |
Q_OBJECT |
|
245 |
||
246 |
public: |
|
247 |
PageNet(QWidget* parent = 0); |
|
248 |
||
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
249 |
QPushButton* BtnUpdateSList; |
665 | 250 |
QTableView * tvServersList; |
653
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
251 |
QPushButton * BtnBack; |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
252 |
QPushButton * BtnNetConnect; |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
253 |
QPushButton * BtnNetSvrStart; |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
254 |
QPushButton * BtnSpecifyServer; |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
255 |
|
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
256 |
private: |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
257 |
QGroupBox * ConnGroupBox; |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
258 |
QGridLayout * GBClayout; |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
259 |
|
646 | 260 |
private slots: |
261 |
void slotConnect(); |
|
262 |
||
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
612
diff
changeset
|
263 |
public slots: |
646 | 264 |
void updateServersList(); |
265 |
||
266 |
signals: |
|
665 | 267 |
void connectClicked(const QString & host, quint16 port); |
646 | 268 |
}; |
269 |
||
1153 | 270 |
class PageNetServer : public AbstractPage |
646 | 271 |
{ |
272 |
Q_OBJECT |
|
273 |
||
274 |
public: |
|
275 |
PageNetServer(QWidget* parent = 0); |
|
276 |
||
277 |
QPushButton *BtnBack; |
|
278 |
QPushButton *BtnStart; |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
279 |
QPushButton *BtnDefault; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
280 |
QLabel *labelSD; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
281 |
QLineEdit *leServerDescr; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
282 |
QLabel *labelPort; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
283 |
QSpinBox *sbPort; |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
284 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
285 |
private slots: |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
286 |
void setDefaultPort(); |
184 | 287 |
}; |
288 |
||
1153 | 289 |
class PageNetGame : public AbstractPage |
184 | 290 |
{ |
291 |
Q_OBJECT |
|
292 |
||
293 |
public: |
|
2773
e94f240a8a41
Have game beep when someone joins lobby/room. Controlled by Sound option
nemo
parents:
2762
diff
changeset
|
294 |
PageNetGame(QWidget* parent, QSettings * config, SDLInteraction * sdli); |
184 | 295 |
|
296 |
QPushButton *BtnBack; |
|
297 |
QPushButton *BtnGo; |
|
1409
d1cbe4a57ebf
Add button for controlling room options (no usefull yet)
unc0rr
parents:
1399
diff
changeset
|
298 |
QPushButton *BtnMaster; |
1951 | 299 |
QPushButton *BtnStart; |
2377 | 300 |
|
1409
d1cbe4a57ebf
Add button for controlling room options (no usefull yet)
unc0rr
parents:
1399
diff
changeset
|
301 |
QAction * restrictJoins; |
d1cbe4a57ebf
Add button for controlling room options (no usefull yet)
unc0rr
parents:
1399
diff
changeset
|
302 |
QAction * restrictTeamAdds; |
461 | 303 |
|
304 |
HWChatWidget* pChatWidget; |
|
322 | 305 |
|
306 |
TeamSelWidget* pNetTeamsWidget; |
|
307 |
GameCFGWidget* pGameCFG; |
|
1648 | 308 |
|
309 |
public slots: |
|
310 |
void setReadyStatus(bool isReady); |
|
1649 | 311 |
void setMasterMode(bool isMaster); |
184 | 312 |
}; |
313 |
||
1153 | 314 |
class PageInfo : public AbstractPage |
187 | 315 |
{ |
316 |
Q_OBJECT |
|
317 |
||
318 |
public: |
|
319 |
PageInfo(QWidget* parent = 0); |
|
320 |
||
321 |
QPushButton *BtnBack; |
|
322 |
About *about; |
|
323 |
}; |
|
324 |
||
1150 | 325 |
class PageSinglePlayer : public AbstractPage |
586 | 326 |
{ |
327 |
Q_OBJECT |
|
328 |
||
329 |
public: |
|
330 |
PageSinglePlayer(QWidget* parent = 0); |
|
331 |
||
332 |
QPushButton *BtnSimpleGamePage; |
|
333 |
QPushButton *BtnTrainPage; |
|
1150 | 334 |
QPushButton *BtnMultiplayer; |
335 |
QPushButton *BtnLoad; |
|
336 |
QPushButton *BtnDemos; |
|
586 | 337 |
QPushButton *BtnBack; |
338 |
GameCFGWidget *gameCFG; |
|
339 |
}; |
|
340 |
||
1153 | 341 |
class PageTraining : public AbstractPage |
587 | 342 |
{ |
343 |
Q_OBJECT |
|
344 |
||
345 |
public: |
|
346 |
PageTraining(QWidget* parent = 0); |
|
347 |
||
348 |
QPushButton *BtnStartTrain; |
|
349 |
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
|
350 |
QComboBox *CBSelect; |
587 | 351 |
}; |
352 |
||
684 | 353 |
class PageSelectWeapon : public AbstractPage |
600 | 354 |
{ |
355 |
Q_OBJECT |
|
356 |
||
357 |
public: |
|
358 |
PageSelectWeapon(QWidget* parent = 0); |
|
359 |
||
683 | 360 |
QPushButton *BtnSave; |
361 |
QPushButton *BtnDefault; |
|
718 | 362 |
QPushButton *BtnDelete; |
600 | 363 |
QPushButton *BtnBack; |
1312 | 364 |
SelWeaponWidget* pWeapons; |
600 | 365 |
}; |
306 | 366 |
|
686 | 367 |
class PageInGame : public AbstractPage |
368 |
{ |
|
369 |
Q_OBJECT |
|
370 |
||
371 |
public: |
|
372 |
PageInGame(QWidget* parent = 0); |
|
373 |
}; |
|
374 |
||
1311 | 375 |
class PageRoomsList : public AbstractPage |
376 |
{ |
|
377 |
Q_OBJECT |
|
378 |
||
379 |
public: |
|
2773
e94f240a8a41
Have game beep when someone joins lobby/room. Controlled by Sound option
nemo
parents:
2762
diff
changeset
|
380 |
PageRoomsList(QWidget* parent, QSettings * config, SDLInteraction * sdli); |
1312 | 381 |
|
1314 | 382 |
QLineEdit * roomName; |
1399 | 383 |
QTableWidget * roomsList; |
1312 | 384 |
QPushButton * BtnBack; |
385 |
QPushButton * BtnCreate; |
|
386 |
QPushButton * BtnJoin; |
|
387 |
QPushButton * BtnRefresh; |
|
1856
e71dbf958c87
Enable admin button when have privilege. Button does nothing yet.
unc0rr
parents:
1840
diff
changeset
|
388 |
QPushButton * BtnAdmin; |
1522 | 389 |
HWChatWidget * chatWidget; |
2377 | 390 |
|
1313
f4c54e9e1b8c
- Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents:
1312
diff
changeset
|
391 |
public slots: |
f4c54e9e1b8c
- Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents:
1312
diff
changeset
|
392 |
void setRoomsList(const QStringList & list); |
1856
e71dbf958c87
Enable admin button when have privilege. Button does nothing yet.
unc0rr
parents:
1840
diff
changeset
|
393 |
void setAdmin(bool); |
1314 | 394 |
|
395 |
private slots: |
|
396 |
void onCreateClick(); |
|
397 |
void onJoinClick(); |
|
1315 | 398 |
void onRefreshClick(); |
2377 | 399 |
|
1313
f4c54e9e1b8c
- Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents:
1312
diff
changeset
|
400 |
signals: |
f4c54e9e1b8c
- Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents:
1312
diff
changeset
|
401 |
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
|
402 |
void askForJoinRoom(const QString &); |
1315 | 403 |
void askForRoomList(); |
1311 | 404 |
}; |
405 |
||
1800 | 406 |
class PageConnecting : public AbstractPage |
407 |
{ |
|
408 |
Q_OBJECT |
|
409 |
||
410 |
public: |
|
411 |
PageConnecting(QWidget* parent = 0); |
|
412 |
}; |
|
413 |
||
1884 | 414 |
class PageScheme : public AbstractPage |
415 |
{ |
|
416 |
Q_OBJECT |
|
417 |
||
418 |
public: |
|
419 |
PageScheme(QWidget* parent = 0); |
|
1885 | 420 |
|
1887 | 421 |
QPushButton * BtnBack; |
1889 | 422 |
QPushButton * BtnNew; |
1902
aeadb10c2d77
Add delete button and scheme selection combobox to scheme edit page
unc0rr
parents:
1895
diff
changeset
|
423 |
QPushButton * BtnDelete; |
1887 | 424 |
QPushButton * BtnSave; |
425 |
||
426 |
void setModel(QAbstractItemModel * model); |
|
1885 | 427 |
|
428 |
private: |
|
1887 | 429 |
QDataWidgetMapper * mapper; |
1932 | 430 |
ToggleButtonWidget * TBW_mode_Forts; |
431 |
ToggleButtonWidget * TBW_teamsDivide; |
|
432 |
ToggleButtonWidget * TBW_solid; |
|
433 |
ToggleButtonWidget * TBW_border; |
|
434 |
ToggleButtonWidget * TBW_lowGravity; |
|
435 |
ToggleButtonWidget * TBW_laserSight; |
|
436 |
ToggleButtonWidget * TBW_invulnerable; |
|
437 |
ToggleButtonWidget * TBW_mines; |
|
2017 | 438 |
ToggleButtonWidget * TBW_vampiric; |
439 |
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
|
440 |
ToggleButtonWidget * TBW_artillery; |
2703 | 441 |
ToggleButtonWidget * TBW_randomorder; |
2726 | 442 |
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
|
443 |
ToggleButtonWidget * TBW_placehog; |
1895 | 444 |
|
445 |
QSpinBox * SB_DamageModifier; |
|
1885 | 446 |
QSpinBox * SB_TurnTime; |
447 |
QSpinBox * SB_InitHealth; |
|
448 |
QSpinBox * SB_SuddenDeath; |
|
449 |
FreqSpinBox * SB_CaseProb; |
|
2031
b6f3e56fb100
david_ac's game scheme options for mine delay/quantity, tweaks to sniper rifle
nemo
parents:
2023
diff
changeset
|
450 |
QSpinBox * SB_MinesTime; |
b6f3e56fb100
david_ac's game scheme options for mine delay/quantity, tweaks to sniper rifle
nemo
parents:
2023
diff
changeset
|
451 |
QSpinBox * SB_Mines; |
1885 | 452 |
QLineEdit * LE_name; |
1902
aeadb10c2d77
Add delete button and scheme selection combobox to scheme edit page
unc0rr
parents:
1895
diff
changeset
|
453 |
QComboBox * selectScheme; |
1889 | 454 |
|
1984 | 455 |
QGroupBox * gbGameModes; |
456 |
QGroupBox * gbBasicSettings; |
|
457 |
||
1889 | 458 |
private slots: |
459 |
void newRow(); |
|
1902
aeadb10c2d77
Add delete button and scheme selection combobox to scheme edit page
unc0rr
parents:
1895
diff
changeset
|
460 |
void deleteRow(); |
1984 | 461 |
void schemeSelected(int); |
1884 | 462 |
}; |
463 |
||
1905 | 464 |
class PageAdmin : public AbstractPage |
465 |
{ |
|
466 |
Q_OBJECT |
|
467 |
||
468 |
public: |
|
469 |
PageAdmin(QWidget* parent = 0); |
|
470 |
||
471 |
QPushButton * BtnBack; |
|
2155
d897222d3339
Implement ability for server admin to clear accounts cache
unc0rr
parents:
2098
diff
changeset
|
472 |
QPushButton * pbClearAccountsCache; |
1924 | 473 |
|
474 |
private: |
|
475 |
QLineEdit * leServerMessage; |
|
476 |
QPushButton * pbSetSM; |
|
477 |
||
478 |
private slots: |
|
479 |
void smChanged(); |
|
480 |
||
481 |
public slots: |
|
482 |
void serverMessage(const QString & str); |
|
483 |
||
484 |
signals: |
|
485 |
void setServerMessage(const QString & str); |
|
1905 | 486 |
}; |
487 |
||
1950 | 488 |
|
489 |
class PageNetType : public AbstractPage |
|
490 |
{ |
|
491 |
Q_OBJECT |
|
492 |
||
493 |
public: |
|
494 |
PageNetType(QWidget* parent = 0); |
|
495 |
||
496 |
QPushButton * BtnBack; |
|
497 |
QPushButton * BtnLAN; |
|
498 |
QPushButton * BtnOfficialServer; |
|
499 |
}; |
|
500 |
||
184 | 501 |
#endif // PAGES_H |