author | unc0rr |
Sat, 15 Dec 2007 16:44:13 +0000 | |
changeset 662 | b2f914786d87 |
parent 659 | 5eafb20566f1 |
child 665 | 5c7bfc8bac6a |
permissions | -rw-r--r-- |
184 | 1 |
/* |
2 |
* Hedgewars, a worms-like game |
|
486 | 3 |
* Copyright (c) 2006, 2007 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 |
#include <QGridLayout> |
|
20 |
#include <QPushButton> |
|
21 |
#include <QGroupBox> |
|
22 |
#include <QComboBox> |
|
311 | 23 |
#include <QCheckBox> |
184 | 24 |
#include <QLabel> |
25 |
#include <QToolBox> |
|
26 |
#include <QLineEdit> |
|
27 |
#include <QListWidget> |
|
28 |
#include <QApplication> |
|
231 | 29 |
#include <QSpinBox> |
452 | 30 |
#include <QTextEdit> |
636 | 31 |
#include <QRadioButton> |
184 | 32 |
|
33 |
#include "pages.h" |
|
34 |
#include "sdlkeys.h" |
|
35 |
#include "hwconsts.h" |
|
36 |
#include "gamecfgwidget.h" |
|
37 |
#include "teamselect.h" |
|
38 |
#include "gamecfgwidget.h" |
|
39 |
#include "SquareLabel.h" |
|
40 |
#include "mapContainer.h" |
|
187 | 41 |
#include "about.h" |
297 | 42 |
#include "fpsedit.h" |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
43 |
#include "netserverslist.h" |
412 | 44 |
#include "netudpwidget.h" |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
45 |
#include "netwwwwidget.h" |
461 | 46 |
#include "chatwidget.h" |
555 | 47 |
#include "SDLs.h" |
579 | 48 |
#include "playrecordpage.h" |
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
603
diff
changeset
|
49 |
#include "selectWeapon.h" |
184 | 50 |
|
51 |
PageMain::PageMain(QWidget* parent) : QWidget(parent) |
|
52 |
{ |
|
53 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
54 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
55 |
pageLayout->setMargin(25); |
|
56 |
pageLayout->setColumnStretch(0, 1); |
|
57 |
pageLayout->setColumnStretch(1, 2); |
|
58 |
pageLayout->setColumnStretch(2, 1); |
|
59 |
||
60 |
BtnSinglePlayer = new QPushButton(this); |
|
61 |
BtnSinglePlayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
62 |
BtnSinglePlayer->setFont(*font14); |
|
63 |
BtnSinglePlayer->setText(QPushButton::tr("Single Player")); |
|
586 | 64 |
pageLayout->addWidget(BtnSinglePlayer, 0, 1); |
184 | 65 |
|
66 |
BtnMultiplayer = new QPushButton(this); |
|
67 |
BtnMultiplayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
68 |
BtnMultiplayer->setFont(*font14); |
|
69 |
BtnMultiplayer->setText(QPushButton::tr("Multiplayer")); |
|
586 | 70 |
pageLayout->addWidget(BtnMultiplayer, 1, 1); |
184 | 71 |
|
72 |
BtnNet = new QPushButton(this); |
|
73 |
BtnNet->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
74 |
BtnNet->setFont(*font14); |
|
75 |
BtnNet->setText(QPushButton::tr("Net game")); |
|
586 | 76 |
pageLayout->addWidget(BtnNet, 2, 1); |
184 | 77 |
|
579 | 78 |
BtnLoad = new QPushButton(this); |
79 |
BtnLoad->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
80 |
BtnLoad->setFont(*font14); |
|
81 |
BtnLoad->setText(QPushButton::tr("Load")); |
|
586 | 82 |
pageLayout->addWidget(BtnLoad, 3, 1); |
579 | 83 |
|
184 | 84 |
BtnDemos = new QPushButton(this); |
85 |
BtnDemos->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
86 |
BtnDemos->setFont(*font14); |
|
87 |
BtnDemos->setText(QPushButton::tr("Demos")); |
|
586 | 88 |
pageLayout->addWidget(BtnDemos, 4, 1); |
184 | 89 |
|
90 |
BtnSetup = new QPushButton(this); |
|
91 |
BtnSetup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
92 |
BtnSetup->setFont(*font14); |
|
93 |
BtnSetup->setText(QPushButton::tr("Setup")); |
|
586 | 94 |
pageLayout->addWidget(BtnSetup, 5, 1); |
184 | 95 |
|
187 | 96 |
BtnInfo = new QPushButton(this); |
97 |
BtnInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
98 |
BtnInfo->setFont(*font14); |
|
99 |
BtnInfo->setText(QPushButton::tr("About")); |
|
586 | 100 |
pageLayout->addWidget(BtnInfo, 6, 1); |
187 | 101 |
|
184 | 102 |
BtnExit = new QPushButton(parent); |
103 |
BtnExit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
|
104 |
BtnExit->setFont(*font14); |
|
105 |
BtnExit->setText(QPushButton::tr("Exit")); |
|
187 | 106 |
pageLayout->addWidget(BtnExit, 7, 1); |
184 | 107 |
} |
108 |
||
585
7531ae5b146e
Rename PageLocalGame -> PageSimpleGame due to future changes
unc0rr
parents:
579
diff
changeset
|
109 |
PageSimpleGame::PageSimpleGame(QWidget* parent) : QWidget(parent) |
184 | 110 |
{ |
111 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
440 | 112 |
QVBoxLayout * pageLayout = new QVBoxLayout(this); |
113 |
QHBoxLayout * topLayout = new QHBoxLayout(); |
|
114 |
QHBoxLayout * bottomLayout = new QHBoxLayout(); |
|
115 |
pageLayout->addLayout(topLayout, 100); |
|
116 |
pageLayout->addLayout(bottomLayout, 0); |
|
117 |
||
118 |
BtnBack = new QPushButton(this); |
|
184 | 119 |
BtnBack->setFont(*font14); |
120 |
BtnBack->setText(QPushButton::tr("Back")); |
|
440 | 121 |
bottomLayout->addWidget(BtnBack, 100); |
122 |
bottomLayout->addStretch(100); |
|
586 | 123 |
BtnSimpleGame = new QPushButton(this); |
184 | 124 |
BtnSimpleGame->setFont(*font14); |
125 |
BtnSimpleGame->setText(QPushButton::tr("Simple Game")); |
|
440 | 126 |
bottomLayout->addWidget(BtnSimpleGame, 100); |
127 |
||
184 | 128 |
gameCFG = new GameCFGWidget(this); |
440 | 129 |
topLayout->addStretch(100); |
130 |
topLayout->addWidget(gameCFG); |
|
131 |
topLayout->addStretch(100); |
|
184 | 132 |
} |
133 |
||
134 |
PageEditTeam::PageEditTeam(QWidget* parent) : QWidget(parent) |
|
135 |
{ |
|
136 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
137 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
310 | 138 |
pageLayout->setColumnStretch(0, 1); |
184 | 139 |
pageLayout->setColumnMinimumWidth(0, 150); |
140 |
pageLayout->setColumnStretch(1, 100); |
|
336 | 141 |
pageLayout->setColumnMinimumWidth(1, 210); |
451 | 142 |
pageLayout->setColumnStretch(2, 75); |
336 | 143 |
pageLayout->setColumnMinimumWidth(2, 110); |
451 | 144 |
pageLayout->setColumnStretch(3, 75); |
336 | 145 |
pageLayout->setColumnMinimumWidth(3, 110); |
184 | 146 |
|
147 |
GBoxTeam = new QGroupBox(this); |
|
148 |
GBoxTeam->setTitle(QGroupBox::tr("Team")); |
|
149 |
GBoxTeam->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
150 |
QGridLayout * GBTLayout = new QGridLayout(GBoxTeam); |
|
151 |
TeamNameEdit = new QLineEdit(GBoxTeam); |
|
152 |
TeamNameEdit->setMaxLength(15); |
|
231 | 153 |
GBTLayout->addWidget(TeamNameEdit, 0, 0, 1, 0); |
154 |
||
184 | 155 |
pageLayout->addWidget(GBoxTeam, 0, 0); |
156 |
||
588 | 157 |
GBoxHedgehogs = new QGroupBox(this); |
184 | 158 |
GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members")); |
159 |
GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
160 |
QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs); |
|
161 |
for(int i = 0; i < 8; i++) |
|
162 |
{ |
|
163 |
HHNameEdit[i] = new QLineEdit(GBoxHedgehogs); |
|
164 |
HHNameEdit[i]->setGeometry(QRect(10, 20 + i * 30, 141, 20)); |
|
165 |
HHNameEdit[i]->setMaxLength(15); |
|
166 |
GBHLayout->addWidget(HHNameEdit[i]); |
|
167 |
} |
|
168 |
pageLayout->addWidget(GBoxHedgehogs, 1, 0, 2, 1); |
|
169 |
||
170 |
BtnTeamDiscard = new QPushButton(this); |
|
171 |
BtnTeamDiscard->setFont(*font14); |
|
172 |
BtnTeamDiscard->setText(QPushButton::tr("Discard")); |
|
173 |
pageLayout->addWidget(BtnTeamDiscard, 4, 0); |
|
174 |
||
588 | 175 |
GBoxBinds = new QGroupBox(this); |
184 | 176 |
GBoxBinds->setTitle(QGroupBox::tr("Key binds")); |
177 |
QGridLayout * GBBLayout = new QGridLayout(GBoxBinds); |
|
178 |
BindsBox = new QToolBox(GBoxBinds); |
|
179 |
BindsBox->setLineWidth(0); |
|
180 |
GBBLayout->addWidget(BindsBox); |
|
181 |
page_A = new QWidget(); |
|
182 |
BindsBox->addItem(page_A, QToolBox::tr("Actions")); |
|
183 |
page_W = new QWidget(); |
|
184 |
BindsBox->addItem(page_W, QToolBox::tr("Weapons")); |
|
185 |
page_WP = new QWidget(); |
|
186 |
BindsBox->addItem(page_WP, QToolBox::tr("Weapon properties")); |
|
187 |
page_O = new QWidget(); |
|
188 |
BindsBox->addItem(page_O, QToolBox::tr("Other")); |
|
189 |
pageLayout->addWidget(GBoxBinds, 0, 1, 5, 1); |
|
190 |
||
191 |
QStringList binds; |
|
192 |
for(int i = 0; strlen(sdlkeys[i][1]) > 0; i++) |
|
193 |
{ |
|
194 |
binds << sdlkeys[i][1]; |
|
195 |
} |
|
196 |
||
197 |
quint16 widind = 0, i = 0; |
|
198 |
while (i < BINDS_NUMBER) { |
|
199 |
quint16 num = 0; |
|
200 |
QGridLayout * pagelayout = new QGridLayout(BindsBox->widget(widind)); |
|
201 |
do { |
|
202 |
LBind[i] = new QLabel(BindsBox->widget(widind)); |
|
203 |
LBind[i]->setText(QApplication::translate("binds", cbinds[i].name)); |
|
204 |
LBind[i]->setAlignment(Qt::AlignRight); |
|
205 |
pagelayout->addWidget(LBind[i], num, 0); |
|
206 |
CBBind[i] = new QComboBox(BindsBox->widget(widind)); |
|
207 |
CBBind[i]->addItems(binds); |
|
208 |
pagelayout->addWidget(CBBind[i], num, 1); |
|
209 |
num++; |
|
210 |
} while (!cbinds[i++].chwidget); |
|
211 |
pagelayout->addWidget(new QWidget(BindsBox->widget(widind)), num, 0, 1, 2); |
|
212 |
widind++; |
|
213 |
} |
|
214 |
||
588 | 215 |
GBoxGrave = new QGroupBox(this); |
184 | 216 |
GBoxGrave->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
217 |
GBoxGrave->setTitle(QGroupBox::tr("Grave")); |
|
218 |
QGridLayout * GBGLayout = new QGridLayout(GBoxGrave); |
|
219 |
CBGrave = new QComboBox(GBoxGrave); |
|
220 |
CBGrave->setMaxCount(65535); |
|
221 |
GBGLayout->addWidget(CBGrave, 0, 0, 1, 3); |
|
222 |
GravePreview = new QLabel(GBoxGrave); |
|
223 |
GravePreview->setScaledContents(false); |
|
336 | 224 |
pageLayout->addWidget(GBoxGrave, 0, 3, 2, 1); |
184 | 225 |
GBGLayout->addWidget(GravePreview, 1, 1); |
336 | 226 |
|
227 |
GBoxTeamLvl = new QGroupBox(this); |
|
228 |
GBoxTeamLvl->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
229 |
GBoxTeamLvl->setTitle(QGroupBox::tr("Team level")); |
|
230 |
QGridLayout * GBTLLayout = new QGridLayout(GBoxTeamLvl); |
|
231 |
CBTeamLvl = new QComboBox(GBoxTeamLvl); |
|
232 |
CBTeamLvl->addItem(QComboBox::tr("Human")); |
|
427 | 233 |
CBTeamLvl->addItem(QComboBox::tr("Level 5")); |
234 |
CBTeamLvl->addItem(QComboBox::tr("Level 4")); |
|
336 | 235 |
CBTeamLvl->addItem(QComboBox::tr("Level 3")); |
427 | 236 |
CBTeamLvl->addItem(QComboBox::tr("Level 2")); |
237 |
CBTeamLvl->addItem(QComboBox::tr("Level 1")); |
|
336 | 238 |
CBTeamLvl->setMaxCount(6); |
239 |
GBTLLayout->addWidget(CBTeamLvl, 0, 0, 1, 3); |
|
240 |
LevelPict = new QLabel(GBoxTeamLvl); |
|
241 |
LevelPict->setScaledContents(false); |
|
242 |
LevelPict->setFixedSize(32, 32); |
|
243 |
pageLayout->addWidget(GBoxTeamLvl, 0, 2, 2, 1); |
|
244 |
GBTLLayout->addWidget(LevelPict, 1, 1); |
|
184 | 245 |
|
246 |
GBoxFort = new QGroupBox(this); |
|
247 |
GBoxFort->setTitle(QGroupBox::tr("Fort")); |
|
248 |
QGridLayout * GBFLayout = new QGridLayout(GBoxFort); |
|
249 |
CBFort = new QComboBox(GBoxFort); |
|
250 |
CBFort->setMaxCount(65535); |
|
251 |
GBFLayout->addWidget(CBFort, 0, 0); |
|
588 | 252 |
FortPreview = new SquareLabel(GBoxFort); |
310 | 253 |
FortPreview->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
184 | 254 |
FortPreview->setPixmap(QPixmap()); |
255 |
GBFLayout->addWidget(FortPreview, 1, 0); |
|
336 | 256 |
pageLayout->addWidget(GBoxFort, 2, 2, 1, 2); |
184 | 257 |
|
588 | 258 |
BtnTeamSave = new QPushButton(this); |
184 | 259 |
BtnTeamSave->setFont(*font14); |
260 |
BtnTeamSave->setText(QPushButton::tr("Save")); |
|
336 | 261 |
pageLayout->addWidget(BtnTeamSave, 4, 2, 1, 2); |
184 | 262 |
|
263 |
QDir tmpdir; |
|
264 |
tmpdir.cd(datadir->absolutePath()); |
|
265 |
tmpdir.cd("Forts"); |
|
266 |
tmpdir.setFilter(QDir::Files); |
|
267 |
||
603 | 268 |
CBFort->addItems(tmpdir.entryList(QStringList("*L.png")).replaceInStrings(QRegExp("^(.*)L\\.png"), "\\1")); |
184 | 269 |
tmpdir.cd("../Graphics/Graves"); |
270 |
QStringList list = tmpdir.entryList(QStringList("*.png")); |
|
271 |
for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) |
|
272 |
{ |
|
603 | 273 |
CBGrave->addItem((*it).replace(QRegExp("^(.*)\\.png"), "\\1")); |
184 | 274 |
} |
275 |
||
276 |
connect(CBGrave, SIGNAL(activated(const QString &)), this, SLOT(CBGrave_activated(const QString &))); |
|
336 | 277 |
connect(CBTeamLvl, SIGNAL(activated(int)), this, SLOT(CBTeamLvl_activated(int))); |
184 | 278 |
connect(CBFort, SIGNAL(activated(const QString &)), this, SLOT(CBFort_activated(const QString &))); |
279 |
} |
|
280 |
||
281 |
void PageEditTeam::CBGrave_activated(const QString & gravename) |
|
282 |
{ |
|
283 |
QPixmap pix(datadir->absolutePath() + "/Graphics/Graves/" + gravename + ".png"); |
|
284 |
GravePreview->setPixmap(pix.copy(0, 0, 32, 32)); |
|
285 |
} |
|
286 |
||
287 |
void PageEditTeam::CBFort_activated(const QString & fortname) |
|
288 |
{ |
|
289 |
QPixmap pix(datadir->absolutePath() + "/Forts/" + fortname + "L.png"); |
|
290 |
FortPreview->setPixmap(pix); |
|
291 |
} |
|
292 |
||
336 | 293 |
void PageEditTeam::CBTeamLvl_activated(int id) |
294 |
{ |
|
295 |
QPixmap pix(QString(":/res/botlevels/%1.png").arg(id)); |
|
296 |
LevelPict->setPixmap(pix); |
|
297 |
} |
|
298 |
||
184 | 299 |
PageMultiplayer::PageMultiplayer(QWidget* parent) : QWidget(parent) |
300 |
{ |
|
301 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
302 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
303 |
||
304 |
BtnBack = new QPushButton(this); |
|
305 |
BtnBack->setFont(*font14); |
|
306 |
BtnBack->setText(QPushButton::tr("Back")); |
|
307 |
pageLayout->addWidget(BtnBack, 1, 0); |
|
187 | 308 |
|
184 | 309 |
gameCFG = new GameCFGWidget(this); |
310 |
pageLayout->addWidget(gameCFG, 0, 0, 1, 2); |
|
311 |
teamsSelect = new TeamSelWidget(this); |
|
312 |
pageLayout->addWidget(teamsSelect, 0, 2, 1, 2); |
|
313 |
||
314 |
BtnStartMPGame = new QPushButton(this); |
|
315 |
BtnStartMPGame->setFont(*font14); |
|
316 |
BtnStartMPGame->setText(QPushButton::tr("Start")); |
|
317 |
pageLayout->addWidget(BtnStartMPGame, 1, 3); |
|
318 |
} |
|
319 |
||
320 |
PageOptions::PageOptions(QWidget* parent) : QWidget(parent) |
|
321 |
{ |
|
322 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
323 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
427 | 324 |
pageLayout->setColumnStretch(0, 100); |
325 |
pageLayout->setColumnStretch(1, 100); |
|
326 |
pageLayout->setColumnStretch(2, 100); |
|
327 |
pageLayout->setRowStretch(0, 0); |
|
328 |
pageLayout->setRowStretch(1, 0); |
|
329 |
pageLayout->setRowStretch(2, 100); |
|
330 |
pageLayout->setRowStretch(3, 0); |
|
331 |
||
184 | 332 |
groupBox = new QGroupBox(this); |
333 |
groupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
334 |
groupBox->setTitle(QGroupBox::tr("Teams")); |
|
335 |
pageLayout->addWidget(groupBox, 0, 0, 1, 3); |
|
336 |
||
337 |
QGridLayout * GBTlayout = new QGridLayout(groupBox); |
|
338 |
BtnNewTeam = new QPushButton(groupBox); |
|
339 |
BtnNewTeam->setFont(*font14); |
|
340 |
BtnNewTeam->setText(QPushButton::tr("New team")); |
|
341 |
GBTlayout->addWidget(BtnNewTeam, 0, 0); |
|
342 |
||
343 |
CBTeamName = new QComboBox(groupBox); |
|
344 |
GBTlayout->addWidget(CBTeamName, 0, 1); |
|
345 |
||
346 |
BtnEditTeam = new QPushButton(groupBox); |
|
347 |
BtnEditTeam->setFont(*font14); |
|
348 |
BtnEditTeam->setText(QPushButton::tr("Edit team")); |
|
349 |
GBTlayout->addWidget(BtnEditTeam, 0, 2); |
|
350 |
||
351 |
AGGroupBox = new QGroupBox(this); |
|
352 |
AGGroupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
353 |
AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options")); |
|
427 | 354 |
pageLayout->addWidget(AGGroupBox, 1, 1); |
184 | 355 |
|
427 | 356 |
QVBoxLayout * GBAlayout = new QVBoxLayout(AGGroupBox); |
436 | 357 |
QHBoxLayout * GBAreslayout = new QHBoxLayout(0); |
427 | 358 |
QLabel * resolution = new QLabel(AGGroupBox); |
359 |
resolution->setText(QLabel::tr("Resolution")); |
|
360 |
GBAreslayout->addWidget(resolution); |
|
361 |
||
184 | 362 |
CBResolution = new QComboBox(AGGroupBox); |
555 | 363 |
SDLInteraction sdli; |
364 |
CBResolution->addItems(sdli.getResolutions()); |
|
427 | 365 |
GBAreslayout->addWidget(CBResolution); |
366 |
GBAlayout->addLayout(GBAreslayout); |
|
367 |
||
436 | 368 |
QHBoxLayout * GBAfpslayout = new QHBoxLayout(0); |
427 | 369 |
QLabel * maxfps = new QLabel(AGGroupBox); |
370 |
maxfps->setText(QLabel::tr("FPS limit")); |
|
371 |
GBAfpslayout->addWidget(maxfps); |
|
372 |
GBAlayout->addLayout(GBAfpslayout); |
|
184 | 373 |
|
374 |
CBFullscreen = new QCheckBox(AGGroupBox); |
|
375 |
CBFullscreen->setText(QCheckBox::tr("Fullscreen")); |
|
427 | 376 |
GBAlayout->addWidget(CBFullscreen); |
184 | 377 |
|
378 |
CBEnableSound = new QCheckBox(AGGroupBox); |
|
379 |
CBEnableSound->setText(QCheckBox::tr("Enable sound")); |
|
427 | 380 |
GBAlayout->addWidget(CBEnableSound); |
184 | 381 |
|
297 | 382 |
CBShowFPS = new QCheckBox(AGGroupBox); |
383 |
CBShowFPS->setText(QCheckBox::tr("Show FPS")); |
|
427 | 384 |
GBAlayout->addWidget(CBShowFPS); |
297 | 385 |
|
529 | 386 |
CBAltDamage = new QCheckBox(AGGroupBox); |
387 |
CBAltDamage->setText(QCheckBox::tr("Alternative damage show")); |
|
388 |
GBAlayout->addWidget(CBAltDamage); |
|
389 |
||
297 | 390 |
fpsedit = new FPSEdit(AGGroupBox); |
427 | 391 |
GBAfpslayout->addWidget(fpsedit); |
184 | 392 |
|
393 |
BtnSaveOptions = new QPushButton(this); |
|
394 |
BtnSaveOptions->setFont(*font14); |
|
395 |
BtnSaveOptions->setText(QPushButton::tr("Save")); |
|
396 |
pageLayout->addWidget(BtnSaveOptions, 4, 2); |
|
397 |
||
398 |
BtnBack = new QPushButton(this); |
|
399 |
BtnBack->setFont(*font14); |
|
400 |
BtnBack->setText(QPushButton::tr("Back")); |
|
401 |
pageLayout->addWidget(BtnBack, 4, 0); |
|
597
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
402 |
|
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
403 |
WeaponsButt = new QPushButton(this); |
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
404 |
WeaponsButt->setFont(*font14); |
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
405 |
WeaponsButt->setText(QPushButton::tr("Weapons scheme")); |
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
406 |
pageLayout->addWidget(WeaponsButt, 1, 0); |
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
407 |
|
647 | 408 |
NNGroupBox = new QGroupBox(this); |
409 |
NNGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); |
|
410 |
NNGroupBox->setTitle(QGroupBox::tr("Net options")); |
|
411 |
pageLayout->addWidget(NNGroupBox, 1, 2); |
|
412 |
||
413 |
QGridLayout * GBNlayout = new QGridLayout(NNGroupBox); |
|
414 |
labelNN = new QLabel(NNGroupBox); |
|
415 |
labelNN->setText(QLabel::tr("Net nick")); |
|
416 |
GBNlayout->addWidget(labelNN, 0, 0); |
|
417 |
||
418 |
editNetNick = new QLineEdit(NNGroupBox); |
|
419 |
editNetNick->setMaxLength(20); |
|
420 |
editNetNick->setText(QLineEdit::tr("unnamed")); |
|
421 |
GBNlayout->addWidget(editNetNick, 0, 1); |
|
184 | 422 |
} |
423 |
||
424 |
PageNet::PageNet(QWidget* parent) : QWidget(parent) |
|
425 |
{ |
|
426 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
427 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
428 |
pageLayout->setColumnStretch(0, 1); |
|
429 |
pageLayout->setColumnStretch(1, 1); |
|
617 | 430 |
pageLayout->setColumnStretch(2, 1); |
421 | 431 |
|
432 |
BtnNetSvrStart = new QPushButton(this); |
|
433 |
BtnNetSvrStart->setFont(*font14); |
|
434 |
BtnNetSvrStart->setText(QPushButton::tr("Start server")); |
|
617 | 435 |
pageLayout->addWidget(BtnNetSvrStart, 3, 2); |
184 | 436 |
|
636 | 437 |
QGroupBox * NetTypeGroupBox = new QGroupBox(this); |
438 |
NetTypeGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); |
|
439 |
NetTypeGroupBox->setTitle(QGroupBox::tr("Connection type")); |
|
440 |
pageLayout->addWidget(NetTypeGroupBox, 0, 1); |
|
441 |
||
442 |
QVBoxLayout * GBTlayout = new QVBoxLayout(NetTypeGroupBox); |
|
443 |
rbLocalGame = new QRadioButton(NetTypeGroupBox); |
|
444 |
rbLocalGame->setText(tr("Local game")); |
|
445 |
rbLocalGame->setChecked(true); |
|
446 |
GBTlayout->addWidget(rbLocalGame); |
|
447 |
rbInternetGame = new QRadioButton(NetTypeGroupBox); |
|
448 |
rbInternetGame->setText(tr("Internet game")); |
|
449 |
GBTlayout->addWidget(rbInternetGame); |
|
450 |
||
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
451 |
ConnGroupBox = new QGroupBox(this); |
421 | 452 |
ConnGroupBox->setTitle(QGroupBox::tr("Net game")); |
453 |
pageLayout->addWidget(ConnGroupBox, 2, 0, 1, 3); |
|
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
454 |
GBClayout = new QGridLayout(ConnGroupBox); |
646 | 455 |
GBClayout->setColumnStretch(0, 1); |
421 | 456 |
GBClayout->setColumnStretch(1, 1); |
457 |
GBClayout->setColumnStretch(2, 1); |
|
184 | 458 |
|
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
459 |
BtnNetConnect = new QPushButton(ConnGroupBox); |
184 | 460 |
BtnNetConnect->setFont(*font14); |
461 |
BtnNetConnect->setText(QPushButton::tr("Connect")); |
|
646 | 462 |
GBClayout->addWidget(BtnNetConnect, 2, 2); |
416 | 463 |
|
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
464 |
netServersWidget = 0; |
421 | 465 |
|
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
466 |
BtnUpdateSList = new QPushButton(ConnGroupBox); |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
467 |
BtnUpdateSList->setFont(*font14); |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
468 |
BtnUpdateSList->setText(QPushButton::tr("Update")); |
646 | 469 |
GBClayout->addWidget(BtnUpdateSList, 2, 0); |
314 | 470 |
|
653
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
471 |
BtnSpecifyServer = new QPushButton(ConnGroupBox); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
472 |
BtnSpecifyServer->setFont(*font14); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
473 |
BtnSpecifyServer->setText(QPushButton::tr("Specify")); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
474 |
GBClayout->addWidget(BtnSpecifyServer, 2, 1); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
475 |
|
184 | 476 |
BtnBack = new QPushButton(this); |
477 |
BtnBack->setFont(*font14); |
|
478 |
BtnBack->setText(QPushButton::tr("Back")); |
|
412 | 479 |
pageLayout->addWidget(BtnBack, 3, 0); |
636 | 480 |
|
646 | 481 |
connect(rbLocalGame, SIGNAL(toggled(bool)), this, SLOT(updateServersList())); |
184 | 482 |
} |
483 |
||
646 | 484 |
void PageNet::updateServersList() |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
485 |
{ |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
486 |
if (netServersWidget) delete netServersWidget; |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
487 |
|
636 | 488 |
if (rbLocalGame->isChecked()) |
489 |
netServersWidget = new HWNetUdpWidget(ConnGroupBox); |
|
490 |
else |
|
491 |
netServersWidget = new HWNetWwwWidget(ConnGroupBox); |
|
659 | 492 |
|
493 |
netServersWidget->updateList(); |
|
646 | 494 |
GBClayout->addWidget(netServersWidget, 1, 0, 1, 3); |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
495 |
|
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
496 |
connect(BtnUpdateSList, SIGNAL(clicked()), netServersWidget, SLOT(updateList())); |
646 | 497 |
connect(netServersWidget->serversList, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(slotConnect())); |
498 |
} |
|
499 |
||
500 |
void PageNet::slotConnect() |
|
501 |
{ |
|
502 |
emit connectClicked(); |
|
503 |
} |
|
504 |
||
505 |
PageNetServer::PageNetServer(QWidget* parent) : QWidget(parent) |
|
506 |
{ |
|
507 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
508 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
509 |
pageLayout->setColumnStretch(0, 1); |
|
510 |
pageLayout->setColumnStretch(1, 1); |
|
511 |
pageLayout->setColumnStretch(2, 1); |
|
512 |
||
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
513 |
pageLayout->setRowStretch(0, 0); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
514 |
pageLayout->setRowStretch(1, 0); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
515 |
pageLayout->setRowStretch(2, 1); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
516 |
pageLayout->setRowStretch(3, 0); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
517 |
|
646 | 518 |
BtnBack = new QPushButton(this); |
519 |
BtnBack->setFont(*font14); |
|
520 |
BtnBack->setText(QPushButton::tr("Back")); |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
521 |
pageLayout->addWidget(BtnBack, 3, 0); |
646 | 522 |
|
523 |
BtnStart = new QPushButton(this); |
|
524 |
BtnStart->setFont(*font14); |
|
525 |
BtnStart->setText(QPushButton::tr("Start")); |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
526 |
pageLayout->addWidget(BtnStart, 3, 2); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
527 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
528 |
labelSD = new QLabel(this); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
529 |
labelSD->setText(QLabel::tr("Server name:")); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
530 |
pageLayout->addWidget(labelSD, 0, 0); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
531 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
532 |
leServerDescr = new QLineEdit(this); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
533 |
pageLayout->addWidget(leServerDescr, 0, 1); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
534 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
535 |
labelPort = new QLabel(this); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
536 |
labelPort->setText(QLabel::tr("Server port:")); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
537 |
pageLayout->addWidget(labelPort, 1, 0); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
538 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
539 |
sbPort = new QSpinBox(this); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
540 |
sbPort->setMinimum(0); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
541 |
sbPort->setMaximum(65535); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
542 |
pageLayout->addWidget(sbPort, 1, 1); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
543 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
544 |
BtnDefault = new QPushButton(this); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
545 |
BtnDefault->setText(QPushButton::tr("default")); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
546 |
pageLayout->addWidget(BtnDefault, 1, 2); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
547 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
548 |
connect(BtnDefault, SIGNAL(clicked()), this, SLOT(setDefaultPort())); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
549 |
} |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
550 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
551 |
void PageNetServer::setDefaultPort() |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
552 |
{ |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
553 |
sbPort->setValue(46631); |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
554 |
} |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
555 |
|
184 | 556 |
PageNetGame::PageNetGame(QWidget* parent) : QWidget(parent) |
557 |
{ |
|
558 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
559 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
452 | 560 |
pageLayout->setSizeConstraint(QLayout::SetMinimumSize); |
461 | 561 |
//pageLayout->setSpacing(1); |
562 |
//pageLayout->setMargin(1); |
|
463 | 563 |
pageLayout->setColumnStretch(0, 50); |
564 |
pageLayout->setColumnStretch(1, 50); |
|
322 | 565 |
|
461 | 566 |
// chatwidget |
567 |
pChatWidget = new HWChatWidget(this); |
|
568 |
pageLayout->addWidget(pChatWidget, 1, 0); |
|
464 | 569 |
pageLayout->setRowStretch(1, 100); |
453 | 570 |
|
329
4c3aad46baa5
Send game parameters by net... Currently it leads to infinite loop, flooding traffic with messages about changes
unc0rr
parents:
323
diff
changeset
|
571 |
pGameCFG = new GameCFGWidget(this); |
322 | 572 |
pageLayout->addWidget(pGameCFG, 0, 0); |
329
4c3aad46baa5
Send game parameters by net... Currently it leads to infinite loop, flooding traffic with messages about changes
unc0rr
parents:
323
diff
changeset
|
573 |
|
4c3aad46baa5
Send game parameters by net... Currently it leads to infinite loop, flooding traffic with messages about changes
unc0rr
parents:
323
diff
changeset
|
574 |
pNetTeamsWidget = new TeamSelWidget(this); |
373 | 575 |
pNetTeamsWidget->setAcceptOuter(true); |
461 | 576 |
pageLayout->addWidget(pNetTeamsWidget, 0, 1, 2, 1); |
184 | 577 |
|
578 |
BtnBack = new QPushButton(this); |
|
579 |
BtnBack->setFont(*font14); |
|
580 |
BtnBack->setText(QPushButton::tr("Back")); |
|
461 | 581 |
pageLayout->addWidget(BtnBack, 2, 0); |
184 | 582 |
|
646 | 583 |
BtnGo = new QPushButton(this); |
184 | 584 |
BtnGo->setFont(*font14); |
585 |
BtnGo->setText(QPushButton::tr("Go!")); |
|
492 | 586 |
BtnGo->setEnabled(false); |
461 | 587 |
pageLayout->addWidget(BtnGo, 2, 1); |
184 | 588 |
} |
187 | 589 |
|
590 |
PageInfo::PageInfo(QWidget* parent) : QWidget(parent) |
|
591 |
{ |
|
592 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
593 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
594 |
pageLayout->setColumnStretch(0, 1); |
|
595 |
pageLayout->setColumnStretch(1, 1); |
|
596 |
pageLayout->setColumnStretch(2, 1); |
|
597 |
||
598 |
BtnBack = new QPushButton(this); |
|
599 |
BtnBack->setFont(*font14); |
|
600 |
BtnBack->setText(QPushButton::tr("Back")); |
|
601 |
pageLayout->addWidget(BtnBack, 1, 0); |
|
602 |
||
603 |
about = new About(this); |
|
604 |
pageLayout->addWidget(about, 0, 0, 1, 3); |
|
605 |
} |
|
306 | 606 |
|
607 |
PageGameStats::PageGameStats(QWidget* parent) : QWidget(parent) |
|
608 |
{ |
|
609 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
610 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
611 |
pageLayout->setColumnStretch(0, 1); |
|
612 |
pageLayout->setColumnStretch(1, 1); |
|
613 |
pageLayout->setColumnStretch(2, 1); |
|
614 |
||
615 |
BtnBack = new QPushButton(this); |
|
616 |
BtnBack->setFont(*font14); |
|
617 |
BtnBack->setText(QPushButton::tr("Back")); |
|
618 |
pageLayout->addWidget(BtnBack, 1, 0); |
|
619 |
||
307 | 620 |
labelGameStats = new QLabel(this); |
621 |
labelGameStats->setTextFormat(Qt::RichText); |
|
622 |
pageLayout->addWidget(labelGameStats, 0, 0, 1, 3); |
|
306 | 623 |
} |
586 | 624 |
|
625 |
PageSinglePlayer::PageSinglePlayer(QWidget* parent) : QWidget(parent) |
|
626 |
{ |
|
627 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
628 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
629 |
pageLayout->setMargin(25); |
|
630 |
pageLayout->setColumnStretch(0, 1); |
|
631 |
pageLayout->setColumnStretch(1, 2); |
|
632 |
pageLayout->setColumnStretch(2, 1); |
|
588 | 633 |
pageLayout->setRowStretch(0, 1); |
634 |
pageLayout->setRowStretch(3, 1); |
|
586 | 635 |
|
636 |
BtnSimpleGamePage = new QPushButton(this); |
|
637 |
BtnSimpleGamePage->setFont(*font14); |
|
638 |
BtnSimpleGamePage->setText(QPushButton::tr("Simple Game")); |
|
588 | 639 |
pageLayout->addWidget(BtnSimpleGamePage, 1, 1); |
586 | 640 |
|
641 |
BtnTrainPage = new QPushButton(this); |
|
642 |
BtnTrainPage->setFont(*font14); |
|
643 |
BtnTrainPage->setText(QPushButton::tr("Training")); |
|
588 | 644 |
pageLayout->addWidget(BtnTrainPage, 2, 1); |
586 | 645 |
|
646 |
BtnBack = new QPushButton(this); |
|
647 |
BtnBack->setFont(*font14); |
|
648 |
BtnBack->setText(QPushButton::tr("Back")); |
|
588 | 649 |
pageLayout->addWidget(BtnBack, 4, 0); |
586 | 650 |
|
651 |
} |
|
652 |
||
587 | 653 |
PageTraining::PageTraining(QWidget* parent) : QWidget(parent) |
654 |
{ |
|
655 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
656 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
657 |
pageLayout->setMargin(25); |
|
658 |
pageLayout->setColumnStretch(0, 1); |
|
659 |
pageLayout->setColumnStretch(1, 2); |
|
660 |
pageLayout->setColumnStretch(2, 1); |
|
661 |
||
662 |
BtnStartTrain = new QPushButton(this); |
|
663 |
BtnStartTrain->setFont(*font14); |
|
664 |
BtnStartTrain->setText(QPushButton::tr("Go!")); |
|
665 |
pageLayout->addWidget(BtnStartTrain, 1, 2); |
|
666 |
||
667 |
BtnBack = new QPushButton(this); |
|
668 |
BtnBack->setFont(*font14); |
|
669 |
BtnBack->setText(QPushButton::tr("Back")); |
|
670 |
pageLayout->addWidget(BtnBack, 1, 0); |
|
671 |
} |
|
672 |
||
600 | 673 |
PageSelectWeapon::PageSelectWeapon(QWidget* parent) : QWidget(parent) |
674 |
{ |
|
675 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
676 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
677 |
pageLayout->setMargin(25); |
|
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
603
diff
changeset
|
678 |
//pageLayout->setColumnStretch(0, 1); |
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
603
diff
changeset
|
679 |
//pageLayout->setColumnStretch(1, 2); |
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
603
diff
changeset
|
680 |
//pageLayout->setColumnStretch(2, 1); |
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
603
diff
changeset
|
681 |
|
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
603
diff
changeset
|
682 |
pWeapons=new SelWeaponWidget(this); |
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
603
diff
changeset
|
683 |
pageLayout->addWidget(pWeapons, 0, 0); |
600 | 684 |
|
685 |
BtnBack = new QPushButton(this); |
|
686 |
BtnBack->setFont(*font14); |
|
687 |
BtnBack->setText(QPushButton::tr("Back")); |
|
688 |
pageLayout->addWidget(BtnBack, 1, 0); |
|
689 |
} |
|
690 |