author | unc0rr |
Wed, 26 Dec 2007 22:16:22 +0000 | |
changeset 686 | 494b5880989a |
parent 684 | 257444d8429f |
child 692 | 07787e748831 |
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> |
665 | 32 |
#include <QTableView> |
671
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
33 |
#include <QMessageBox> |
673 | 34 |
#include <QHeaderView> |
184 | 35 |
|
36 |
#include "pages.h" |
|
37 |
#include "sdlkeys.h" |
|
38 |
#include "hwconsts.h" |
|
39 |
#include "gamecfgwidget.h" |
|
40 |
#include "teamselect.h" |
|
41 |
#include "gamecfgwidget.h" |
|
42 |
#include "SquareLabel.h" |
|
43 |
#include "mapContainer.h" |
|
187 | 44 |
#include "about.h" |
297 | 45 |
#include "fpsedit.h" |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
46 |
#include "netserverslist.h" |
412 | 47 |
#include "netudpwidget.h" |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
48 |
#include "netwwwwidget.h" |
461 | 49 |
#include "chatwidget.h" |
555 | 50 |
#include "SDLs.h" |
579 | 51 |
#include "playrecordpage.h" |
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
603
diff
changeset
|
52 |
#include "selectWeapon.h" |
184 | 53 |
|
684 | 54 |
PageMain::PageMain(QWidget* parent) : |
55 |
AbstractPage(parent) |
|
184 | 56 |
{ |
57 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
58 |
pageLayout->setMargin(25); |
|
59 |
pageLayout->setColumnStretch(0, 1); |
|
60 |
pageLayout->setColumnStretch(1, 2); |
|
61 |
pageLayout->setColumnStretch(2, 1); |
|
62 |
||
684 | 63 |
BtnSinglePlayer = addButton("Single Player", pageLayout, 0, 1); |
184 | 64 |
BtnSinglePlayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
65 |
||
684 | 66 |
BtnMultiplayer = addButton("Multiplayer", pageLayout, 1, 1); |
184 | 67 |
BtnMultiplayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
68 |
||
684 | 69 |
BtnNet = addButton("Net game", pageLayout, 2, 1); |
184 | 70 |
BtnNet->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
71 |
||
684 | 72 |
BtnLoad = addButton("Saved games", pageLayout, 3, 1); |
579 | 73 |
BtnLoad->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
74 |
||
684 | 75 |
BtnDemos = addButton("Demos", pageLayout, 4, 1); |
184 | 76 |
BtnDemos->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
77 |
||
684 | 78 |
BtnSetup = addButton("Setup", pageLayout, 5, 1); |
184 | 79 |
BtnSetup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
80 |
||
684 | 81 |
BtnInfo = addButton("About", pageLayout, 6, 1); |
187 | 82 |
BtnInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
83 |
||
684 | 84 |
BtnExit = addButton("Exit", pageLayout, 7, 1); |
184 | 85 |
BtnExit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
86 |
} |
|
87 |
||
684 | 88 |
PageSimpleGame::PageSimpleGame(QWidget* parent) : |
89 |
AbstractPage(parent) |
|
184 | 90 |
{ |
440 | 91 |
QVBoxLayout * pageLayout = new QVBoxLayout(this); |
92 |
QHBoxLayout * topLayout = new QHBoxLayout(); |
|
93 |
QHBoxLayout * bottomLayout = new QHBoxLayout(); |
|
94 |
pageLayout->addLayout(topLayout, 100); |
|
95 |
pageLayout->addLayout(bottomLayout, 0); |
|
96 |
||
684 | 97 |
BtnBack = addButton("Back", bottomLayout, 100); |
440 | 98 |
bottomLayout->addStretch(100); |
684 | 99 |
|
100 |
BtnSimpleGame = addButton("Simple Game", bottomLayout, 100); |
|
440 | 101 |
|
184 | 102 |
gameCFG = new GameCFGWidget(this); |
440 | 103 |
topLayout->addStretch(100); |
104 |
topLayout->addWidget(gameCFG); |
|
105 |
topLayout->addStretch(100); |
|
184 | 106 |
} |
107 |
||
108 |
PageEditTeam::PageEditTeam(QWidget* parent) : QWidget(parent) |
|
109 |
{ |
|
110 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
111 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
310 | 112 |
pageLayout->setColumnStretch(0, 1); |
184 | 113 |
pageLayout->setColumnMinimumWidth(0, 150); |
114 |
pageLayout->setColumnStretch(1, 100); |
|
336 | 115 |
pageLayout->setColumnMinimumWidth(1, 210); |
451 | 116 |
pageLayout->setColumnStretch(2, 75); |
336 | 117 |
pageLayout->setColumnMinimumWidth(2, 110); |
451 | 118 |
pageLayout->setColumnStretch(3, 75); |
336 | 119 |
pageLayout->setColumnMinimumWidth(3, 110); |
184 | 120 |
|
121 |
GBoxTeam = new QGroupBox(this); |
|
122 |
GBoxTeam->setTitle(QGroupBox::tr("Team")); |
|
123 |
GBoxTeam->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
124 |
QGridLayout * GBTLayout = new QGridLayout(GBoxTeam); |
|
125 |
TeamNameEdit = new QLineEdit(GBoxTeam); |
|
126 |
TeamNameEdit->setMaxLength(15); |
|
231 | 127 |
GBTLayout->addWidget(TeamNameEdit, 0, 0, 1, 0); |
128 |
||
184 | 129 |
pageLayout->addWidget(GBoxTeam, 0, 0); |
130 |
||
588 | 131 |
GBoxHedgehogs = new QGroupBox(this); |
184 | 132 |
GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members")); |
133 |
GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
134 |
QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs); |
|
135 |
for(int i = 0; i < 8; i++) |
|
136 |
{ |
|
137 |
HHNameEdit[i] = new QLineEdit(GBoxHedgehogs); |
|
138 |
HHNameEdit[i]->setGeometry(QRect(10, 20 + i * 30, 141, 20)); |
|
139 |
HHNameEdit[i]->setMaxLength(15); |
|
140 |
GBHLayout->addWidget(HHNameEdit[i]); |
|
141 |
} |
|
142 |
pageLayout->addWidget(GBoxHedgehogs, 1, 0, 2, 1); |
|
143 |
||
144 |
BtnTeamDiscard = new QPushButton(this); |
|
145 |
BtnTeamDiscard->setFont(*font14); |
|
146 |
BtnTeamDiscard->setText(QPushButton::tr("Discard")); |
|
147 |
pageLayout->addWidget(BtnTeamDiscard, 4, 0); |
|
148 |
||
588 | 149 |
GBoxBinds = new QGroupBox(this); |
184 | 150 |
GBoxBinds->setTitle(QGroupBox::tr("Key binds")); |
151 |
QGridLayout * GBBLayout = new QGridLayout(GBoxBinds); |
|
152 |
BindsBox = new QToolBox(GBoxBinds); |
|
153 |
BindsBox->setLineWidth(0); |
|
154 |
GBBLayout->addWidget(BindsBox); |
|
155 |
page_A = new QWidget(); |
|
156 |
BindsBox->addItem(page_A, QToolBox::tr("Actions")); |
|
157 |
page_W = new QWidget(); |
|
158 |
BindsBox->addItem(page_W, QToolBox::tr("Weapons")); |
|
159 |
page_WP = new QWidget(); |
|
160 |
BindsBox->addItem(page_WP, QToolBox::tr("Weapon properties")); |
|
161 |
page_O = new QWidget(); |
|
162 |
BindsBox->addItem(page_O, QToolBox::tr("Other")); |
|
163 |
pageLayout->addWidget(GBoxBinds, 0, 1, 5, 1); |
|
164 |
||
165 |
QStringList binds; |
|
166 |
for(int i = 0; strlen(sdlkeys[i][1]) > 0; i++) |
|
167 |
{ |
|
168 |
binds << sdlkeys[i][1]; |
|
169 |
} |
|
170 |
||
171 |
quint16 widind = 0, i = 0; |
|
172 |
while (i < BINDS_NUMBER) { |
|
173 |
quint16 num = 0; |
|
174 |
QGridLayout * pagelayout = new QGridLayout(BindsBox->widget(widind)); |
|
175 |
do { |
|
176 |
LBind[i] = new QLabel(BindsBox->widget(widind)); |
|
177 |
LBind[i]->setText(QApplication::translate("binds", cbinds[i].name)); |
|
178 |
LBind[i]->setAlignment(Qt::AlignRight); |
|
179 |
pagelayout->addWidget(LBind[i], num, 0); |
|
180 |
CBBind[i] = new QComboBox(BindsBox->widget(widind)); |
|
181 |
CBBind[i]->addItems(binds); |
|
182 |
pagelayout->addWidget(CBBind[i], num, 1); |
|
183 |
num++; |
|
184 |
} while (!cbinds[i++].chwidget); |
|
185 |
pagelayout->addWidget(new QWidget(BindsBox->widget(widind)), num, 0, 1, 2); |
|
186 |
widind++; |
|
187 |
} |
|
188 |
||
588 | 189 |
GBoxGrave = new QGroupBox(this); |
184 | 190 |
GBoxGrave->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
191 |
GBoxGrave->setTitle(QGroupBox::tr("Grave")); |
|
192 |
QGridLayout * GBGLayout = new QGridLayout(GBoxGrave); |
|
193 |
CBGrave = new QComboBox(GBoxGrave); |
|
194 |
CBGrave->setMaxCount(65535); |
|
195 |
GBGLayout->addWidget(CBGrave, 0, 0, 1, 3); |
|
196 |
GravePreview = new QLabel(GBoxGrave); |
|
197 |
GravePreview->setScaledContents(false); |
|
336 | 198 |
pageLayout->addWidget(GBoxGrave, 0, 3, 2, 1); |
184 | 199 |
GBGLayout->addWidget(GravePreview, 1, 1); |
336 | 200 |
|
201 |
GBoxTeamLvl = new QGroupBox(this); |
|
202 |
GBoxTeamLvl->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
203 |
GBoxTeamLvl->setTitle(QGroupBox::tr("Team level")); |
|
204 |
QGridLayout * GBTLLayout = new QGridLayout(GBoxTeamLvl); |
|
205 |
CBTeamLvl = new QComboBox(GBoxTeamLvl); |
|
206 |
CBTeamLvl->addItem(QComboBox::tr("Human")); |
|
427 | 207 |
CBTeamLvl->addItem(QComboBox::tr("Level 5")); |
208 |
CBTeamLvl->addItem(QComboBox::tr("Level 4")); |
|
336 | 209 |
CBTeamLvl->addItem(QComboBox::tr("Level 3")); |
427 | 210 |
CBTeamLvl->addItem(QComboBox::tr("Level 2")); |
211 |
CBTeamLvl->addItem(QComboBox::tr("Level 1")); |
|
336 | 212 |
CBTeamLvl->setMaxCount(6); |
213 |
GBTLLayout->addWidget(CBTeamLvl, 0, 0, 1, 3); |
|
214 |
LevelPict = new QLabel(GBoxTeamLvl); |
|
215 |
LevelPict->setScaledContents(false); |
|
216 |
LevelPict->setFixedSize(32, 32); |
|
217 |
pageLayout->addWidget(GBoxTeamLvl, 0, 2, 2, 1); |
|
218 |
GBTLLayout->addWidget(LevelPict, 1, 1); |
|
184 | 219 |
|
220 |
GBoxFort = new QGroupBox(this); |
|
221 |
GBoxFort->setTitle(QGroupBox::tr("Fort")); |
|
222 |
QGridLayout * GBFLayout = new QGridLayout(GBoxFort); |
|
223 |
CBFort = new QComboBox(GBoxFort); |
|
224 |
CBFort->setMaxCount(65535); |
|
225 |
GBFLayout->addWidget(CBFort, 0, 0); |
|
588 | 226 |
FortPreview = new SquareLabel(GBoxFort); |
310 | 227 |
FortPreview->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
184 | 228 |
FortPreview->setPixmap(QPixmap()); |
229 |
GBFLayout->addWidget(FortPreview, 1, 0); |
|
336 | 230 |
pageLayout->addWidget(GBoxFort, 2, 2, 1, 2); |
184 | 231 |
|
588 | 232 |
BtnTeamSave = new QPushButton(this); |
184 | 233 |
BtnTeamSave->setFont(*font14); |
234 |
BtnTeamSave->setText(QPushButton::tr("Save")); |
|
336 | 235 |
pageLayout->addWidget(BtnTeamSave, 4, 2, 1, 2); |
184 | 236 |
|
237 |
QDir tmpdir; |
|
238 |
tmpdir.cd(datadir->absolutePath()); |
|
239 |
tmpdir.cd("Forts"); |
|
240 |
tmpdir.setFilter(QDir::Files); |
|
241 |
||
603 | 242 |
CBFort->addItems(tmpdir.entryList(QStringList("*L.png")).replaceInStrings(QRegExp("^(.*)L\\.png"), "\\1")); |
184 | 243 |
tmpdir.cd("../Graphics/Graves"); |
244 |
QStringList list = tmpdir.entryList(QStringList("*.png")); |
|
245 |
for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) |
|
246 |
{ |
|
603 | 247 |
CBGrave->addItem((*it).replace(QRegExp("^(.*)\\.png"), "\\1")); |
184 | 248 |
} |
249 |
||
250 |
connect(CBGrave, SIGNAL(activated(const QString &)), this, SLOT(CBGrave_activated(const QString &))); |
|
336 | 251 |
connect(CBTeamLvl, SIGNAL(activated(int)), this, SLOT(CBTeamLvl_activated(int))); |
184 | 252 |
connect(CBFort, SIGNAL(activated(const QString &)), this, SLOT(CBFort_activated(const QString &))); |
253 |
} |
|
254 |
||
255 |
void PageEditTeam::CBGrave_activated(const QString & gravename) |
|
256 |
{ |
|
257 |
QPixmap pix(datadir->absolutePath() + "/Graphics/Graves/" + gravename + ".png"); |
|
258 |
GravePreview->setPixmap(pix.copy(0, 0, 32, 32)); |
|
259 |
} |
|
260 |
||
261 |
void PageEditTeam::CBFort_activated(const QString & fortname) |
|
262 |
{ |
|
263 |
QPixmap pix(datadir->absolutePath() + "/Forts/" + fortname + "L.png"); |
|
264 |
FortPreview->setPixmap(pix); |
|
265 |
} |
|
266 |
||
336 | 267 |
void PageEditTeam::CBTeamLvl_activated(int id) |
268 |
{ |
|
269 |
QPixmap pix(QString(":/res/botlevels/%1.png").arg(id)); |
|
270 |
LevelPict->setPixmap(pix); |
|
271 |
} |
|
272 |
||
184 | 273 |
PageMultiplayer::PageMultiplayer(QWidget* parent) : QWidget(parent) |
274 |
{ |
|
275 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
276 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
277 |
||
278 |
BtnBack = new QPushButton(this); |
|
279 |
BtnBack->setFont(*font14); |
|
280 |
BtnBack->setText(QPushButton::tr("Back")); |
|
281 |
pageLayout->addWidget(BtnBack, 1, 0); |
|
187 | 282 |
|
184 | 283 |
gameCFG = new GameCFGWidget(this); |
284 |
pageLayout->addWidget(gameCFG, 0, 0, 1, 2); |
|
285 |
teamsSelect = new TeamSelWidget(this); |
|
286 |
pageLayout->addWidget(teamsSelect, 0, 2, 1, 2); |
|
287 |
||
288 |
BtnStartMPGame = new QPushButton(this); |
|
289 |
BtnStartMPGame->setFont(*font14); |
|
290 |
BtnStartMPGame->setText(QPushButton::tr("Start")); |
|
291 |
pageLayout->addWidget(BtnStartMPGame, 1, 3); |
|
292 |
} |
|
293 |
||
294 |
PageOptions::PageOptions(QWidget* parent) : QWidget(parent) |
|
295 |
{ |
|
296 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
297 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
427 | 298 |
pageLayout->setColumnStretch(0, 100); |
299 |
pageLayout->setColumnStretch(1, 100); |
|
300 |
pageLayout->setColumnStretch(2, 100); |
|
301 |
pageLayout->setRowStretch(0, 0); |
|
302 |
pageLayout->setRowStretch(1, 0); |
|
303 |
pageLayout->setRowStretch(2, 100); |
|
304 |
pageLayout->setRowStretch(3, 0); |
|
305 |
||
184 | 306 |
groupBox = new QGroupBox(this); |
307 |
groupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
308 |
groupBox->setTitle(QGroupBox::tr("Teams")); |
|
309 |
pageLayout->addWidget(groupBox, 0, 0, 1, 3); |
|
310 |
||
311 |
QGridLayout * GBTlayout = new QGridLayout(groupBox); |
|
312 |
BtnNewTeam = new QPushButton(groupBox); |
|
313 |
BtnNewTeam->setFont(*font14); |
|
314 |
BtnNewTeam->setText(QPushButton::tr("New team")); |
|
315 |
GBTlayout->addWidget(BtnNewTeam, 0, 0); |
|
316 |
||
317 |
CBTeamName = new QComboBox(groupBox); |
|
318 |
GBTlayout->addWidget(CBTeamName, 0, 1); |
|
319 |
||
320 |
BtnEditTeam = new QPushButton(groupBox); |
|
321 |
BtnEditTeam->setFont(*font14); |
|
322 |
BtnEditTeam->setText(QPushButton::tr("Edit team")); |
|
323 |
GBTlayout->addWidget(BtnEditTeam, 0, 2); |
|
324 |
||
325 |
AGGroupBox = new QGroupBox(this); |
|
326 |
AGGroupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
327 |
AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options")); |
|
427 | 328 |
pageLayout->addWidget(AGGroupBox, 1, 1); |
184 | 329 |
|
427 | 330 |
QVBoxLayout * GBAlayout = new QVBoxLayout(AGGroupBox); |
436 | 331 |
QHBoxLayout * GBAreslayout = new QHBoxLayout(0); |
427 | 332 |
QLabel * resolution = new QLabel(AGGroupBox); |
333 |
resolution->setText(QLabel::tr("Resolution")); |
|
334 |
GBAreslayout->addWidget(resolution); |
|
335 |
||
184 | 336 |
CBResolution = new QComboBox(AGGroupBox); |
555 | 337 |
SDLInteraction sdli; |
338 |
CBResolution->addItems(sdli.getResolutions()); |
|
427 | 339 |
GBAreslayout->addWidget(CBResolution); |
340 |
GBAlayout->addLayout(GBAreslayout); |
|
341 |
||
436 | 342 |
QHBoxLayout * GBAfpslayout = new QHBoxLayout(0); |
427 | 343 |
QLabel * maxfps = new QLabel(AGGroupBox); |
344 |
maxfps->setText(QLabel::tr("FPS limit")); |
|
345 |
GBAfpslayout->addWidget(maxfps); |
|
346 |
GBAlayout->addLayout(GBAfpslayout); |
|
184 | 347 |
|
348 |
CBFullscreen = new QCheckBox(AGGroupBox); |
|
349 |
CBFullscreen->setText(QCheckBox::tr("Fullscreen")); |
|
427 | 350 |
GBAlayout->addWidget(CBFullscreen); |
184 | 351 |
|
352 |
CBEnableSound = new QCheckBox(AGGroupBox); |
|
353 |
CBEnableSound->setText(QCheckBox::tr("Enable sound")); |
|
427 | 354 |
GBAlayout->addWidget(CBEnableSound); |
184 | 355 |
|
297 | 356 |
CBShowFPS = new QCheckBox(AGGroupBox); |
357 |
CBShowFPS->setText(QCheckBox::tr("Show FPS")); |
|
427 | 358 |
GBAlayout->addWidget(CBShowFPS); |
297 | 359 |
|
529 | 360 |
CBAltDamage = new QCheckBox(AGGroupBox); |
361 |
CBAltDamage->setText(QCheckBox::tr("Alternative damage show")); |
|
362 |
GBAlayout->addWidget(CBAltDamage); |
|
363 |
||
297 | 364 |
fpsedit = new FPSEdit(AGGroupBox); |
427 | 365 |
GBAfpslayout->addWidget(fpsedit); |
184 | 366 |
|
367 |
BtnSaveOptions = new QPushButton(this); |
|
368 |
BtnSaveOptions->setFont(*font14); |
|
369 |
BtnSaveOptions->setText(QPushButton::tr("Save")); |
|
370 |
pageLayout->addWidget(BtnSaveOptions, 4, 2); |
|
371 |
||
372 |
BtnBack = new QPushButton(this); |
|
373 |
BtnBack->setFont(*font14); |
|
374 |
BtnBack->setText(QPushButton::tr("Back")); |
|
375 |
pageLayout->addWidget(BtnBack, 4, 0); |
|
597
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
376 |
|
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
377 |
WeaponsButt = new QPushButton(this); |
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
378 |
WeaponsButt->setFont(*font14); |
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
379 |
WeaponsButt->setText(QPushButton::tr("Weapons scheme")); |
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
380 |
pageLayout->addWidget(WeaponsButt, 1, 0); |
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
588
diff
changeset
|
381 |
|
647 | 382 |
NNGroupBox = new QGroupBox(this); |
383 |
NNGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); |
|
384 |
NNGroupBox->setTitle(QGroupBox::tr("Net options")); |
|
385 |
pageLayout->addWidget(NNGroupBox, 1, 2); |
|
386 |
||
387 |
QGridLayout * GBNlayout = new QGridLayout(NNGroupBox); |
|
388 |
labelNN = new QLabel(NNGroupBox); |
|
389 |
labelNN->setText(QLabel::tr("Net nick")); |
|
390 |
GBNlayout->addWidget(labelNN, 0, 0); |
|
391 |
||
392 |
editNetNick = new QLineEdit(NNGroupBox); |
|
393 |
editNetNick->setMaxLength(20); |
|
394 |
editNetNick->setText(QLineEdit::tr("unnamed")); |
|
395 |
GBNlayout->addWidget(editNetNick, 0, 1); |
|
184 | 396 |
} |
397 |
||
398 |
PageNet::PageNet(QWidget* parent) : QWidget(parent) |
|
399 |
{ |
|
400 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
401 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
402 |
pageLayout->setColumnStretch(0, 1); |
|
403 |
pageLayout->setColumnStretch(1, 1); |
|
617 | 404 |
pageLayout->setColumnStretch(2, 1); |
421 | 405 |
|
406 |
BtnNetSvrStart = new QPushButton(this); |
|
407 |
BtnNetSvrStart->setFont(*font14); |
|
408 |
BtnNetSvrStart->setText(QPushButton::tr("Start server")); |
|
617 | 409 |
pageLayout->addWidget(BtnNetSvrStart, 3, 2); |
184 | 410 |
|
636 | 411 |
QGroupBox * NetTypeGroupBox = new QGroupBox(this); |
412 |
NetTypeGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); |
|
668 | 413 |
NetTypeGroupBox->setTitle(QGroupBox::tr("Servers list")); |
636 | 414 |
pageLayout->addWidget(NetTypeGroupBox, 0, 1); |
415 |
||
416 |
QVBoxLayout * GBTlayout = new QVBoxLayout(NetTypeGroupBox); |
|
417 |
rbLocalGame = new QRadioButton(NetTypeGroupBox); |
|
668 | 418 |
rbLocalGame->setText(tr("Local")); |
636 | 419 |
rbLocalGame->setChecked(true); |
420 |
GBTlayout->addWidget(rbLocalGame); |
|
421 |
rbInternetGame = new QRadioButton(NetTypeGroupBox); |
|
668 | 422 |
rbInternetGame->setText(tr("Internet")); |
636 | 423 |
GBTlayout->addWidget(rbInternetGame); |
424 |
||
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
425 |
ConnGroupBox = new QGroupBox(this); |
421 | 426 |
ConnGroupBox->setTitle(QGroupBox::tr("Net game")); |
427 |
pageLayout->addWidget(ConnGroupBox, 2, 0, 1, 3); |
|
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
428 |
GBClayout = new QGridLayout(ConnGroupBox); |
646 | 429 |
GBClayout->setColumnStretch(0, 1); |
421 | 430 |
GBClayout->setColumnStretch(1, 1); |
431 |
GBClayout->setColumnStretch(2, 1); |
|
184 | 432 |
|
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
433 |
BtnNetConnect = new QPushButton(ConnGroupBox); |
184 | 434 |
BtnNetConnect->setFont(*font14); |
435 |
BtnNetConnect->setText(QPushButton::tr("Connect")); |
|
646 | 436 |
GBClayout->addWidget(BtnNetConnect, 2, 2); |
416 | 437 |
|
665 | 438 |
tvServersList = new QTableView(ConnGroupBox); |
671
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
439 |
tvServersList->setSelectionBehavior(QAbstractItemView::SelectRows); |
665 | 440 |
GBClayout->addWidget(tvServersList, 1, 0, 1, 3); |
421 | 441 |
|
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
442 |
BtnUpdateSList = new QPushButton(ConnGroupBox); |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
443 |
BtnUpdateSList->setFont(*font14); |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
444 |
BtnUpdateSList->setText(QPushButton::tr("Update")); |
646 | 445 |
GBClayout->addWidget(BtnUpdateSList, 2, 0); |
314 | 446 |
|
653
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
447 |
BtnSpecifyServer = new QPushButton(ConnGroupBox); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
448 |
BtnSpecifyServer->setFont(*font14); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
449 |
BtnSpecifyServer->setText(QPushButton::tr("Specify")); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
450 |
GBClayout->addWidget(BtnSpecifyServer, 2, 1); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
451 |
|
184 | 452 |
BtnBack = new QPushButton(this); |
453 |
BtnBack->setFont(*font14); |
|
454 |
BtnBack->setText(QPushButton::tr("Back")); |
|
412 | 455 |
pageLayout->addWidget(BtnBack, 3, 0); |
636 | 456 |
|
646 | 457 |
connect(rbLocalGame, SIGNAL(toggled(bool)), this, SLOT(updateServersList())); |
668 | 458 |
connect(BtnNetConnect, SIGNAL(clicked()), this, SLOT(slotConnect())); |
184 | 459 |
} |
460 |
||
646 | 461 |
void PageNet::updateServersList() |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
462 |
{ |
636 | 463 |
if (rbLocalGame->isChecked()) |
671
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
464 |
tvServersList->setModel(new HWNetUdpModel(tvServersList)); |
667 | 465 |
else |
671
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
466 |
tvServersList->setModel(new HWNetWwwModel(tvServersList)); |
659 | 467 |
|
673 | 468 |
tvServersList->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); |
469 |
||
665 | 470 |
static_cast<HWNetServersModel *>(tvServersList->model())->updateList(); |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
471 |
|
665 | 472 |
connect(BtnUpdateSList, SIGNAL(clicked()), static_cast<HWNetServersModel *>(tvServersList->model()), SLOT(updateList())); |
671
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
473 |
connect(tvServersList, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(slotConnect())); |
646 | 474 |
} |
475 |
||
476 |
void PageNet::slotConnect() |
|
477 |
{ |
|
671
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
478 |
HWNetServersModel * model = static_cast<HWNetServersModel *>(tvServersList->model()); |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
479 |
QModelIndex mi = tvServersList->currentIndex(); |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
480 |
if(!mi.isValid()) |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
481 |
{ |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
482 |
QMessageBox::information(this, tr("Error"), tr("Please, select server from the list above")); |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
483 |
return; |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
484 |
} |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
485 |
QString host = model->index(mi.row(), 1).data().toString(); |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
486 |
quint16 port = model->index(mi.row(), 2).data().toUInt(); |
672
08ed55ea1e2a
- Fix a bug when server fails to start, and then connecting to another server on the same host (strange, the fix won't work on my machine)
unc0rr
parents:
671
diff
changeset
|
487 |
|
08ed55ea1e2a
- Fix a bug when server fails to start, and then connecting to another server on the same host (strange, the fix won't work on my machine)
unc0rr
parents:
671
diff
changeset
|
488 |
emit connectClicked(host, port); |
646 | 489 |
} |
490 |
||
491 |
PageNetServer::PageNetServer(QWidget* parent) : QWidget(parent) |
|
492 |
{ |
|
493 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
494 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
495 |
pageLayout->setColumnStretch(0, 1); |
|
496 |
pageLayout->setColumnStretch(1, 1); |
|
497 |
pageLayout->setColumnStretch(2, 1); |
|
498 |
||
675 | 499 |
pageLayout->setRowStretch(0, 1); |
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
500 |
pageLayout->setRowStretch(1, 0); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
501 |
|
646 | 502 |
BtnBack = new QPushButton(this); |
503 |
BtnBack->setFont(*font14); |
|
504 |
BtnBack->setText(QPushButton::tr("Back")); |
|
675 | 505 |
pageLayout->addWidget(BtnBack, 1, 0); |
646 | 506 |
|
507 |
BtnStart = new QPushButton(this); |
|
508 |
BtnStart->setFont(*font14); |
|
509 |
BtnStart->setText(QPushButton::tr("Start")); |
|
675 | 510 |
pageLayout->addWidget(BtnStart, 1, 2); |
511 |
||
512 |
QWidget * wg = new QWidget(this); |
|
513 |
pageLayout->addWidget(wg, 0, 0, 1, 3); |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
514 |
|
675 | 515 |
QGridLayout * wgLayout = new QGridLayout(wg); |
516 |
wgLayout->setColumnStretch(0, 1); |
|
517 |
wgLayout->setColumnStretch(1, 3); |
|
518 |
wgLayout->setColumnStretch(2, 1); |
|
519 |
||
520 |
wgLayout->setRowStretch(0, 0); |
|
521 |
wgLayout->setRowStretch(1, 1); |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
522 |
|
675 | 523 |
QGroupBox * gb = new QGroupBox(wg); |
524 |
wgLayout->addWidget(gb, 0, 1); |
|
525 |
||
526 |
QGridLayout * gbLayout = new QGridLayout(gb); |
|
527 |
||
528 |
labelSD = new QLabel(gb); |
|
529 |
labelSD->setText(QLabel::tr("Server name:")); |
|
530 |
gbLayout->addWidget(labelSD, 0, 0); |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
531 |
|
675 | 532 |
leServerDescr = new QLineEdit(gb); |
533 |
gbLayout->addWidget(leServerDescr, 0, 1); |
|
534 |
||
535 |
labelPort = new QLabel(gb); |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
536 |
labelPort->setText(QLabel::tr("Server port:")); |
675 | 537 |
gbLayout->addWidget(labelPort, 1, 0); |
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
538 |
|
675 | 539 |
sbPort = new QSpinBox(gb); |
657
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); |
675 | 542 |
gbLayout->addWidget(sbPort, 1, 1); |
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
543 |
|
675 | 544 |
BtnDefault = new QPushButton(gb); |
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
545 |
BtnDefault->setText(QPushButton::tr("default")); |
675 | 546 |
gbLayout->addWidget(BtnDefault, 1, 2); |
657
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 |
||
684 | 673 |
PageSelectWeapon::PageSelectWeapon(QWidget* parent) : |
674 |
AbstractPage(parent) |
|
600 | 675 |
{ |
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 |
|
683 | 682 |
pWeapons=new SelWeaponWidget(20, this); |
683 |
pageLayout->addWidget(pWeapons, 0, 0, 1, 3); |
|
600 | 684 |
|
684 | 685 |
BtnBack = addButton("Back", pageLayout, 1, 0); |
686 |
BtnDefault = addButton("Default", pageLayout, 1, 1); |
|
687 |
BtnSave = addButton("Save", pageLayout, 1, 2); |
|
600 | 688 |
} |
689 |
||
686 | 690 |
PageInGame::PageInGame(QWidget* parent) : |
691 |
AbstractPage(parent) |
|
692 |
{ |
|
693 |
QLabel * label = new QLabel(this); |
|
694 |
label->setText("In game..."); |
|
695 |
} |