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