author | unc0rr |
Mon, 08 Sep 2008 18:30:16 +0000 | |
changeset 1249 | b6670a6ea2d0 |
parent 1240 | 16b85f292030 |
child 1252 | 2e2719c0a397 |
permissions | -rw-r--r-- |
184 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
1236 | 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 |
#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" |
579 | 50 |
#include "playrecordpage.h" |
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
603
diff
changeset
|
51 |
#include "selectWeapon.h" |
1192 | 52 |
#include "igbox.h" |
1238
914bd2a9a249
Add hat selection control to team editing page (it's empty combobox yet)
unc0rr
parents:
1236
diff
changeset
|
53 |
#include "hats.h" |
184 | 54 |
|
684 | 55 |
PageMain::PageMain(QWidget* parent) : |
56 |
AbstractPage(parent) |
|
184 | 57 |
{ |
58 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
1148 | 59 |
//pageLayout->setColumnStretch(0, 1); |
60 |
//pageLayout->setColumnStretch(1, 2); |
|
61 |
//pageLayout->setColumnStretch(2, 1); |
|
184 | 62 |
|
1199 | 63 |
//QPushButton* btnLogo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true); |
64 |
//pageLayout->setAlignment(btnLogo, Qt::AlignHCenter); |
|
1148 | 65 |
pageLayout->setRowStretch(0, 1); |
1150 | 66 |
pageLayout->setRowStretch(1, 1); |
67 |
pageLayout->setRowStretch(2, 0); |
|
68 |
pageLayout->setRowStretch(3, 1); |
|
1199 | 69 |
pageLayout->setRowStretch(4, 1); |
184 | 70 |
|
1152
c72b939c00df
Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents:
1151
diff
changeset
|
71 |
BtnSinglePlayer = addButton(":/res/LocalPlay.png", pageLayout, 2, 0, 1, 2, true); |
1150 | 72 |
pageLayout->setAlignment(BtnSinglePlayer, Qt::AlignHCenter); |
184 | 73 |
|
1152
c72b939c00df
Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents:
1151
diff
changeset
|
74 |
BtnNet = addButton(":/res/NetworkPlay.png", pageLayout, 2, 2, 1, 2, true); |
1150 | 75 |
pageLayout->setAlignment(BtnNet, Qt::AlignHCenter); |
579 | 76 |
|
1199 | 77 |
BtnSetup = addButton(":/res/Settings.png", pageLayout, 4, 3, true); |
184 | 78 |
|
1199 | 79 |
//BtnInfo = addButton(":/res/About.png", pageLayout, 3, 1, 1, 2, true); |
80 |
BtnInfo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true); |
|
1212 | 81 |
BtnInfo->setStyleSheet("border: transparent;background: transparent;"); |
1150 | 82 |
pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter); |
1199 | 83 |
//pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter); |
184 | 84 |
|
1199 | 85 |
BtnExit = addButton(":/res/Exit.png", pageLayout, 4, 0, 1, 1, true); |
184 | 86 |
} |
87 |
||
788
00720357601f
- Get rid of PageSimpleGame, now pressing 'quick game' just starts round
unc0rr
parents:
730
diff
changeset
|
88 |
PageEditTeam::PageEditTeam(QWidget* parent) : |
692 | 89 |
AbstractPage(parent) |
184 | 90 |
{ |
91 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
310 | 92 |
pageLayout->setColumnStretch(0, 1); |
1238
914bd2a9a249
Add hat selection control to team editing page (it's empty combobox yet)
unc0rr
parents:
1236
diff
changeset
|
93 |
pageLayout->setColumnMinimumWidth(0, 180); |
184 | 94 |
pageLayout->setColumnStretch(1, 100); |
336 | 95 |
pageLayout->setColumnMinimumWidth(1, 210); |
451 | 96 |
pageLayout->setColumnStretch(2, 75); |
336 | 97 |
pageLayout->setColumnMinimumWidth(2, 110); |
451 | 98 |
pageLayout->setColumnStretch(3, 75); |
336 | 99 |
pageLayout->setColumnMinimumWidth(3, 110); |
184 | 100 |
|
101 |
GBoxTeam = new QGroupBox(this); |
|
102 |
GBoxTeam->setTitle(QGroupBox::tr("Team")); |
|
103 |
GBoxTeam->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
104 |
QGridLayout * GBTLayout = new QGridLayout(GBoxTeam); |
|
105 |
TeamNameEdit = new QLineEdit(GBoxTeam); |
|
1216
df1b19976e28
Allow team and hh name length be up to 64 letters length
unc0rr
parents:
1212
diff
changeset
|
106 |
TeamNameEdit->setMaxLength(64); |
231 | 107 |
GBTLayout->addWidget(TeamNameEdit, 0, 0, 1, 0); |
108 |
||
184 | 109 |
pageLayout->addWidget(GBoxTeam, 0, 0); |
110 |
||
588 | 111 |
GBoxHedgehogs = new QGroupBox(this); |
184 | 112 |
GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members")); |
113 |
GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
114 |
QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs); |
|
1238
914bd2a9a249
Add hat selection control to team editing page (it's empty combobox yet)
unc0rr
parents:
1236
diff
changeset
|
115 |
|
914bd2a9a249
Add hat selection control to team editing page (it's empty combobox yet)
unc0rr
parents:
1236
diff
changeset
|
116 |
HatsModel * hatsModel = new HatsModel(GBoxHedgehogs); |
184 | 117 |
for(int i = 0; i < 8; i++) |
118 |
{ |
|
119 |
HHNameEdit[i] = new QLineEdit(GBoxHedgehogs); |
|
1216
df1b19976e28
Allow team and hh name length be up to 64 letters length
unc0rr
parents:
1212
diff
changeset
|
120 |
HHNameEdit[i]->setMaxLength(64); |
1238
914bd2a9a249
Add hat selection control to team editing page (it's empty combobox yet)
unc0rr
parents:
1236
diff
changeset
|
121 |
HHNameEdit[i]->setMinimumWidth(120); |
914bd2a9a249
Add hat selection control to team editing page (it's empty combobox yet)
unc0rr
parents:
1236
diff
changeset
|
122 |
GBHLayout->addWidget(HHNameEdit[i], i, 0); |
914bd2a9a249
Add hat selection control to team editing page (it's empty combobox yet)
unc0rr
parents:
1236
diff
changeset
|
123 |
|
914bd2a9a249
Add hat selection control to team editing page (it's empty combobox yet)
unc0rr
parents:
1236
diff
changeset
|
124 |
HHHats[i] = new QComboBox(GBoxHedgehogs); |
914bd2a9a249
Add hat selection control to team editing page (it's empty combobox yet)
unc0rr
parents:
1236
diff
changeset
|
125 |
HHHats[i]->setModel(hatsModel); |
1239 | 126 |
//HHHats[i]->setModelColumn(1); |
1240 | 127 |
//HHHats[i]->setMinimumWidth(132); |
1238
914bd2a9a249
Add hat selection control to team editing page (it's empty combobox yet)
unc0rr
parents:
1236
diff
changeset
|
128 |
GBHLayout->addWidget(HHHats[i], i, 1); |
184 | 129 |
} |
130 |
pageLayout->addWidget(GBoxHedgehogs, 1, 0, 2, 1); |
|
131 |
||
1153 | 132 |
BtnTeamDiscard = addButton(":/res/Exit.png", pageLayout, 4, 0, true); |
184 | 133 |
|
588 | 134 |
GBoxBinds = new QGroupBox(this); |
184 | 135 |
GBoxBinds->setTitle(QGroupBox::tr("Key binds")); |
136 |
QGridLayout * GBBLayout = new QGridLayout(GBoxBinds); |
|
137 |
BindsBox = new QToolBox(GBoxBinds); |
|
138 |
BindsBox->setLineWidth(0); |
|
139 |
GBBLayout->addWidget(BindsBox); |
|
140 |
page_A = new QWidget(); |
|
141 |
BindsBox->addItem(page_A, QToolBox::tr("Actions")); |
|
142 |
page_W = new QWidget(); |
|
143 |
BindsBox->addItem(page_W, QToolBox::tr("Weapons")); |
|
144 |
page_WP = new QWidget(); |
|
145 |
BindsBox->addItem(page_WP, QToolBox::tr("Weapon properties")); |
|
146 |
page_O = new QWidget(); |
|
147 |
BindsBox->addItem(page_O, QToolBox::tr("Other")); |
|
148 |
pageLayout->addWidget(GBoxBinds, 0, 1, 5, 1); |
|
149 |
||
150 |
QStringList binds; |
|
151 |
for(int i = 0; strlen(sdlkeys[i][1]) > 0; i++) |
|
152 |
{ |
|
153 |
binds << sdlkeys[i][1]; |
|
154 |
} |
|
155 |
||
156 |
quint16 widind = 0, i = 0; |
|
157 |
while (i < BINDS_NUMBER) { |
|
158 |
quint16 num = 0; |
|
159 |
QGridLayout * pagelayout = new QGridLayout(BindsBox->widget(widind)); |
|
160 |
do { |
|
161 |
LBind[i] = new QLabel(BindsBox->widget(widind)); |
|
162 |
LBind[i]->setText(QApplication::translate("binds", cbinds[i].name)); |
|
163 |
LBind[i]->setAlignment(Qt::AlignRight); |
|
164 |
pagelayout->addWidget(LBind[i], num, 0); |
|
165 |
CBBind[i] = new QComboBox(BindsBox->widget(widind)); |
|
166 |
CBBind[i]->addItems(binds); |
|
167 |
pagelayout->addWidget(CBBind[i], num, 1); |
|
168 |
num++; |
|
169 |
} while (!cbinds[i++].chwidget); |
|
170 |
pagelayout->addWidget(new QWidget(BindsBox->widget(widind)), num, 0, 1, 2); |
|
171 |
widind++; |
|
172 |
} |
|
173 |
||
588 | 174 |
GBoxGrave = new QGroupBox(this); |
184 | 175 |
GBoxGrave->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
176 |
GBoxGrave->setTitle(QGroupBox::tr("Grave")); |
|
177 |
QGridLayout * GBGLayout = new QGridLayout(GBoxGrave); |
|
178 |
CBGrave = new QComboBox(GBoxGrave); |
|
179 |
CBGrave->setMaxCount(65535); |
|
180 |
GBGLayout->addWidget(CBGrave, 0, 0, 1, 3); |
|
181 |
GravePreview = new QLabel(GBoxGrave); |
|
182 |
GravePreview->setScaledContents(false); |
|
336 | 183 |
pageLayout->addWidget(GBoxGrave, 0, 3, 2, 1); |
184 | 184 |
GBGLayout->addWidget(GravePreview, 1, 1); |
336 | 185 |
|
186 |
GBoxTeamLvl = new QGroupBox(this); |
|
187 |
GBoxTeamLvl->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
188 |
GBoxTeamLvl->setTitle(QGroupBox::tr("Team level")); |
|
189 |
QGridLayout * GBTLLayout = new QGridLayout(GBoxTeamLvl); |
|
190 |
CBTeamLvl = new QComboBox(GBoxTeamLvl); |
|
191 |
CBTeamLvl->addItem(QComboBox::tr("Human")); |
|
427 | 192 |
CBTeamLvl->addItem(QComboBox::tr("Level 5")); |
193 |
CBTeamLvl->addItem(QComboBox::tr("Level 4")); |
|
336 | 194 |
CBTeamLvl->addItem(QComboBox::tr("Level 3")); |
427 | 195 |
CBTeamLvl->addItem(QComboBox::tr("Level 2")); |
196 |
CBTeamLvl->addItem(QComboBox::tr("Level 1")); |
|
336 | 197 |
CBTeamLvl->setMaxCount(6); |
198 |
GBTLLayout->addWidget(CBTeamLvl, 0, 0, 1, 3); |
|
199 |
LevelPict = new QLabel(GBoxTeamLvl); |
|
200 |
LevelPict->setScaledContents(false); |
|
201 |
LevelPict->setFixedSize(32, 32); |
|
202 |
pageLayout->addWidget(GBoxTeamLvl, 0, 2, 2, 1); |
|
203 |
GBTLLayout->addWidget(LevelPict, 1, 1); |
|
184 | 204 |
|
205 |
GBoxFort = new QGroupBox(this); |
|
206 |
GBoxFort->setTitle(QGroupBox::tr("Fort")); |
|
207 |
QGridLayout * GBFLayout = new QGridLayout(GBoxFort); |
|
208 |
CBFort = new QComboBox(GBoxFort); |
|
209 |
CBFort->setMaxCount(65535); |
|
210 |
GBFLayout->addWidget(CBFort, 0, 0); |
|
588 | 211 |
FortPreview = new SquareLabel(GBoxFort); |
310 | 212 |
FortPreview->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
184 | 213 |
FortPreview->setPixmap(QPixmap()); |
214 |
GBFLayout->addWidget(FortPreview, 1, 0); |
|
336 | 215 |
pageLayout->addWidget(GBoxFort, 2, 2, 1, 2); |
184 | 216 |
|
1168 | 217 |
BtnTeamSave = addButton(":/res/Save.png", pageLayout, 4, 3, true);; |
184 | 218 |
|
219 |
QDir tmpdir; |
|
220 |
tmpdir.cd(datadir->absolutePath()); |
|
221 |
tmpdir.cd("Forts"); |
|
222 |
tmpdir.setFilter(QDir::Files); |
|
223 |
||
603 | 224 |
CBFort->addItems(tmpdir.entryList(QStringList("*L.png")).replaceInStrings(QRegExp("^(.*)L\\.png"), "\\1")); |
184 | 225 |
tmpdir.cd("../Graphics/Graves"); |
226 |
QStringList list = tmpdir.entryList(QStringList("*.png")); |
|
227 |
for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) |
|
228 |
{ |
|
603 | 229 |
CBGrave->addItem((*it).replace(QRegExp("^(.*)\\.png"), "\\1")); |
184 | 230 |
} |
231 |
||
232 |
connect(CBGrave, SIGNAL(activated(const QString &)), this, SLOT(CBGrave_activated(const QString &))); |
|
336 | 233 |
connect(CBTeamLvl, SIGNAL(activated(int)), this, SLOT(CBTeamLvl_activated(int))); |
184 | 234 |
connect(CBFort, SIGNAL(activated(const QString &)), this, SLOT(CBFort_activated(const QString &))); |
235 |
} |
|
236 |
||
237 |
void PageEditTeam::CBGrave_activated(const QString & gravename) |
|
238 |
{ |
|
239 |
QPixmap pix(datadir->absolutePath() + "/Graphics/Graves/" + gravename + ".png"); |
|
240 |
GravePreview->setPixmap(pix.copy(0, 0, 32, 32)); |
|
241 |
} |
|
242 |
||
243 |
void PageEditTeam::CBFort_activated(const QString & fortname) |
|
244 |
{ |
|
245 |
QPixmap pix(datadir->absolutePath() + "/Forts/" + fortname + "L.png"); |
|
246 |
FortPreview->setPixmap(pix); |
|
247 |
} |
|
248 |
||
336 | 249 |
void PageEditTeam::CBTeamLvl_activated(int id) |
250 |
{ |
|
251 |
QPixmap pix(QString(":/res/botlevels/%1.png").arg(id)); |
|
252 |
LevelPict->setPixmap(pix); |
|
253 |
} |
|
254 |
||
692 | 255 |
PageMultiplayer::PageMultiplayer(QWidget* parent) : |
256 |
AbstractPage(parent) |
|
184 | 257 |
{ |
258 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
259 |
||
1218 | 260 |
BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); |
187 | 261 |
|
184 | 262 |
gameCFG = new GameCFGWidget(this); |
263 |
pageLayout->addWidget(gameCFG, 0, 0, 1, 2); |
|
696 | 264 |
|
1218 | 265 |
pageLayout->setRowStretch(1, 1); |
266 |
||
184 | 267 |
teamsSelect = new TeamSelWidget(this); |
1218 | 268 |
pageLayout->addWidget(teamsSelect, 0, 2, 2, 2); |
184 | 269 |
|
1218 | 270 |
BtnStartMPGame = addButton(tr("Start"), pageLayout, 2, 3); |
184 | 271 |
} |
272 |
||
1249
b6670a6ea2d0
Remove 25pix margin on every page, so exit button is almost in the same place on all pages
unc0rr
parents:
1240
diff
changeset
|
273 |
PageOptions::PageOptions(QWidget* parent) : |
692 | 274 |
AbstractPage(parent) |
184 | 275 |
{ |
276 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
427 | 277 |
pageLayout->setColumnStretch(0, 100); |
278 |
pageLayout->setColumnStretch(1, 100); |
|
279 |
pageLayout->setColumnStretch(2, 100); |
|
280 |
pageLayout->setRowStretch(0, 0); |
|
281 |
pageLayout->setRowStretch(1, 0); |
|
719 | 282 |
pageLayout->setRowStretch(2, 0); |
283 |
pageLayout->setRowStretch(3, 100); |
|
284 |
pageLayout->setRowStretch(4, 0); |
|
427 | 285 |
|
1198 | 286 |
|
287 |
QGroupBox * gbTwoBoxes = new QGroupBox(this); |
|
288 |
pageLayout->addWidget(gbTwoBoxes, 0, 0, 1, 3); |
|
289 |
QHBoxLayout * gbTBLayout = new QHBoxLayout(gbTwoBoxes); |
|
290 |
{ |
|
291 |
teamsBox = new IconedGroupBox(this); |
|
292 |
teamsBox->setIcon(QIcon(":/res/teamicon.png")); |
|
293 |
teamsBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
|
294 |
teamsBox->setTitle(QGroupBox::tr("Teams")); |
|
295 |
||
296 |
QGridLayout * GBTlayout = new QGridLayout(teamsBox); |
|
297 |
||
298 |
BtnNewTeam = addButton(tr("New team"), GBTlayout, 1, 0); |
|
299 |
||
300 |
CBTeamName = new QComboBox(teamsBox); |
|
301 |
GBTlayout->addWidget(CBTeamName, 0, 0, 1, 2); |
|
184 | 302 |
|
1198 | 303 |
BtnEditTeam = addButton(tr("Edit team"), GBTlayout, 1, 1); |
1199 | 304 |
|
305 |
labelNN = new QLabel(teamsBox); |
|
306 |
labelNN->setText(QLabel::tr("Net nick")); |
|
307 |
GBTlayout->addWidget(labelNN, 2, 0, 1, 2); |
|
308 |
||
309 |
editNetNick = new QLineEdit(teamsBox); |
|
310 |
editNetNick->setMaxLength(20); |
|
311 |
editNetNick->setText(QLineEdit::tr("unnamed")); |
|
312 |
GBTlayout->addWidget(editNetNick, 3, 0, 1, 2); |
|
313 |
||
1198 | 314 |
gbTBLayout->addWidget(teamsBox); |
315 |
} |
|
184 | 316 |
|
1198 | 317 |
{ |
318 |
IconedGroupBox* groupWeapons = new IconedGroupBox(this); |
|
1199 | 319 |
groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
1198 | 320 |
groupWeapons->setIcon(QIcon(":/res/weaponsicon.png")); |
1199 | 321 |
//groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
1198 | 322 |
groupWeapons->setTitle(QGroupBox::tr("Weapons")); |
323 |
QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons); |
|
184 | 324 |
|
1198 | 325 |
WeaponsButt = addButton(tr("Weapons set"), WeaponsLayout, 1, 0); |
326 |
WeaponsName = new QComboBox(this); |
|
327 |
WeaponsLayout->addWidget(WeaponsName, 0, 0, 1, 2); |
|
328 |
WeaponEdit = addButton(tr("Edit"), WeaponsLayout, 1, 1); |
|
329 |
gbTBLayout->addWidget(groupWeapons); |
|
330 |
} |
|
184 | 331 |
|
1193 | 332 |
AGGroupBox = new IconedGroupBox(this); |
333 |
AGGroupBox->setIcon(QIcon(":/res/graphicsicon.png")); |
|
184 | 334 |
AGGroupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
335 |
AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options")); |
|
693 | 336 |
pageLayout->addWidget(AGGroupBox, 2, 1); |
184 | 337 |
|
427 | 338 |
QVBoxLayout * GBAlayout = new QVBoxLayout(AGGroupBox); |
436 | 339 |
QHBoxLayout * GBAreslayout = new QHBoxLayout(0); |
427 | 340 |
QLabel * resolution = new QLabel(AGGroupBox); |
341 |
resolution->setText(QLabel::tr("Resolution")); |
|
342 |
GBAreslayout->addWidget(resolution); |
|
343 |
||
184 | 344 |
CBResolution = new QComboBox(AGGroupBox); |
427 | 345 |
GBAreslayout->addWidget(CBResolution); |
346 |
GBAlayout->addLayout(GBAreslayout); |
|
347 |
||
436 | 348 |
QHBoxLayout * GBAfpslayout = new QHBoxLayout(0); |
427 | 349 |
QLabel * maxfps = new QLabel(AGGroupBox); |
350 |
maxfps->setText(QLabel::tr("FPS limit")); |
|
351 |
GBAfpslayout->addWidget(maxfps); |
|
352 |
GBAlayout->addLayout(GBAfpslayout); |
|
184 | 353 |
|
354 |
CBFullscreen = new QCheckBox(AGGroupBox); |
|
355 |
CBFullscreen->setText(QCheckBox::tr("Fullscreen")); |
|
427 | 356 |
GBAlayout->addWidget(CBFullscreen); |
184 | 357 |
|
1162 | 358 |
CBFrontendFullscreen = new QCheckBox(AGGroupBox); |
359 |
CBFrontendFullscreen->setText(QCheckBox::tr("Frontend fullscreen")); |
|
360 |
GBAlayout->addWidget(CBFrontendFullscreen); |
|
361 |
||
1157 | 362 |
CBEnableSound = new QCheckBox(AGGroupBox); |
184 | 363 |
CBEnableSound->setText(QCheckBox::tr("Enable sound")); |
427 | 364 |
GBAlayout->addWidget(CBEnableSound); |
184 | 365 |
|
1157 | 366 |
CBEnableMusic = new QCheckBox(AGGroupBox); |
1129 | 367 |
CBEnableMusic->setText(QCheckBox::tr("Enable music")); |
368 |
GBAlayout->addWidget(CBEnableMusic); |
|
369 |
||
297 | 370 |
CBShowFPS = new QCheckBox(AGGroupBox); |
371 |
CBShowFPS->setText(QCheckBox::tr("Show FPS")); |
|
427 | 372 |
GBAlayout->addWidget(CBShowFPS); |
297 | 373 |
|
529 | 374 |
CBAltDamage = new QCheckBox(AGGroupBox); |
375 |
CBAltDamage->setText(QCheckBox::tr("Alternative damage show")); |
|
376 |
GBAlayout->addWidget(CBAltDamage); |
|
377 |
||
297 | 378 |
fpsedit = new FPSEdit(AGGroupBox); |
427 | 379 |
GBAfpslayout->addWidget(fpsedit); |
184 | 380 |
|
1157 | 381 |
BtnSaveOptions = addButton(":/res/Save.png", pageLayout, 4, 2, true); |
184 | 382 |
|
1153 | 383 |
BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true); |
184 | 384 |
} |
385 |
||
1153 | 386 |
PageNet::PageNet(QWidget* parent) : AbstractPage(parent) |
184 | 387 |
{ |
388 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
389 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
390 |
pageLayout->setColumnStretch(0, 1); |
|
391 |
pageLayout->setColumnStretch(1, 1); |
|
617 | 392 |
pageLayout->setColumnStretch(2, 1); |
421 | 393 |
|
394 |
BtnNetSvrStart = new QPushButton(this); |
|
395 |
BtnNetSvrStart->setFont(*font14); |
|
396 |
BtnNetSvrStart->setText(QPushButton::tr("Start server")); |
|
617 | 397 |
pageLayout->addWidget(BtnNetSvrStart, 3, 2); |
184 | 398 |
|
636 | 399 |
QGroupBox * NetTypeGroupBox = new QGroupBox(this); |
400 |
NetTypeGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); |
|
668 | 401 |
NetTypeGroupBox->setTitle(QGroupBox::tr("Servers list")); |
636 | 402 |
pageLayout->addWidget(NetTypeGroupBox, 0, 1); |
403 |
||
404 |
QVBoxLayout * GBTlayout = new QVBoxLayout(NetTypeGroupBox); |
|
405 |
rbLocalGame = new QRadioButton(NetTypeGroupBox); |
|
668 | 406 |
rbLocalGame->setText(tr("Local")); |
636 | 407 |
rbLocalGame->setChecked(true); |
408 |
GBTlayout->addWidget(rbLocalGame); |
|
409 |
rbInternetGame = new QRadioButton(NetTypeGroupBox); |
|
668 | 410 |
rbInternetGame->setText(tr("Internet")); |
636 | 411 |
GBTlayout->addWidget(rbInternetGame); |
412 |
||
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
413 |
ConnGroupBox = new QGroupBox(this); |
421 | 414 |
ConnGroupBox->setTitle(QGroupBox::tr("Net game")); |
415 |
pageLayout->addWidget(ConnGroupBox, 2, 0, 1, 3); |
|
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
416 |
GBClayout = new QGridLayout(ConnGroupBox); |
646 | 417 |
GBClayout->setColumnStretch(0, 1); |
421 | 418 |
GBClayout->setColumnStretch(1, 1); |
419 |
GBClayout->setColumnStretch(2, 1); |
|
184 | 420 |
|
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
421 |
BtnNetConnect = new QPushButton(ConnGroupBox); |
184 | 422 |
BtnNetConnect->setFont(*font14); |
423 |
BtnNetConnect->setText(QPushButton::tr("Connect")); |
|
646 | 424 |
GBClayout->addWidget(BtnNetConnect, 2, 2); |
416 | 425 |
|
665 | 426 |
tvServersList = new QTableView(ConnGroupBox); |
671
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
427 |
tvServersList->setSelectionBehavior(QAbstractItemView::SelectRows); |
665 | 428 |
GBClayout->addWidget(tvServersList, 1, 0, 1, 3); |
421 | 429 |
|
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
430 |
BtnUpdateSList = new QPushButton(ConnGroupBox); |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
431 |
BtnUpdateSList->setFont(*font14); |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
432 |
BtnUpdateSList->setText(QPushButton::tr("Update")); |
646 | 433 |
GBClayout->addWidget(BtnUpdateSList, 2, 0); |
314 | 434 |
|
653
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
435 |
BtnSpecifyServer = new QPushButton(ConnGroupBox); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
436 |
BtnSpecifyServer->setFont(*font14); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
437 |
BtnSpecifyServer->setText(QPushButton::tr("Specify")); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
438 |
GBClayout->addWidget(BtnSpecifyServer, 2, 1); |
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
647
diff
changeset
|
439 |
|
1153 | 440 |
BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); |
636 | 441 |
|
646 | 442 |
connect(rbLocalGame, SIGNAL(toggled(bool)), this, SLOT(updateServersList())); |
668 | 443 |
connect(BtnNetConnect, SIGNAL(clicked()), this, SLOT(slotConnect())); |
184 | 444 |
} |
445 |
||
646 | 446 |
void PageNet::updateServersList() |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
447 |
{ |
636 | 448 |
if (rbLocalGame->isChecked()) |
671
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
449 |
tvServersList->setModel(new HWNetUdpModel(tvServersList)); |
667 | 450 |
else |
671
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
451 |
tvServersList->setModel(new HWNetWwwModel(tvServersList)); |
659 | 452 |
|
673 | 453 |
tvServersList->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); |
454 |
||
665 | 455 |
static_cast<HWNetServersModel *>(tvServersList->model())->updateList(); |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
456 |
|
665 | 457 |
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
|
458 |
connect(tvServersList, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(slotConnect())); |
646 | 459 |
} |
460 |
||
461 |
void PageNet::slotConnect() |
|
462 |
{ |
|
671
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
463 |
HWNetServersModel * model = static_cast<HWNetServersModel *>(tvServersList->model()); |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
464 |
QModelIndex mi = tvServersList->currentIndex(); |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
465 |
if(!mi.isValid()) |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
466 |
{ |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
467 |
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
|
468 |
return; |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
469 |
} |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
470 |
QString host = model->index(mi.row(), 1).data().toString(); |
a8970859f50e
Actually pass host and port values to NetConnect method
unc0rr
parents:
668
diff
changeset
|
471 |
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
|
472 |
|
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
|
473 |
emit connectClicked(host, port); |
646 | 474 |
} |
475 |
||
1153 | 476 |
PageNetServer::PageNetServer(QWidget* parent) : AbstractPage(parent) |
646 | 477 |
{ |
478 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
479 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
480 |
pageLayout->setColumnStretch(0, 1); |
|
481 |
pageLayout->setColumnStretch(1, 1); |
|
482 |
pageLayout->setColumnStretch(2, 1); |
|
483 |
||
675 | 484 |
pageLayout->setRowStretch(0, 1); |
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
485 |
pageLayout->setRowStretch(1, 0); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
486 |
|
1153 | 487 |
BtnBack =addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
646 | 488 |
|
489 |
BtnStart = new QPushButton(this); |
|
490 |
BtnStart->setFont(*font14); |
|
491 |
BtnStart->setText(QPushButton::tr("Start")); |
|
675 | 492 |
pageLayout->addWidget(BtnStart, 1, 2); |
493 |
||
494 |
QWidget * wg = new QWidget(this); |
|
495 |
pageLayout->addWidget(wg, 0, 0, 1, 3); |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
496 |
|
675 | 497 |
QGridLayout * wgLayout = new QGridLayout(wg); |
498 |
wgLayout->setColumnStretch(0, 1); |
|
499 |
wgLayout->setColumnStretch(1, 3); |
|
500 |
wgLayout->setColumnStretch(2, 1); |
|
501 |
||
502 |
wgLayout->setRowStretch(0, 0); |
|
503 |
wgLayout->setRowStretch(1, 1); |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
504 |
|
675 | 505 |
QGroupBox * gb = new QGroupBox(wg); |
506 |
wgLayout->addWidget(gb, 0, 1); |
|
507 |
||
508 |
QGridLayout * gbLayout = new QGridLayout(gb); |
|
509 |
||
510 |
labelSD = new QLabel(gb); |
|
511 |
labelSD->setText(QLabel::tr("Server name:")); |
|
512 |
gbLayout->addWidget(labelSD, 0, 0); |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
513 |
|
675 | 514 |
leServerDescr = new QLineEdit(gb); |
515 |
gbLayout->addWidget(leServerDescr, 0, 1); |
|
516 |
||
517 |
labelPort = new QLabel(gb); |
|
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
518 |
labelPort->setText(QLabel::tr("Server port:")); |
675 | 519 |
gbLayout->addWidget(labelPort, 1, 0); |
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
520 |
|
675 | 521 |
sbPort = new QSpinBox(gb); |
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
522 |
sbPort->setMinimum(0); |
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
523 |
sbPort->setMaximum(65535); |
675 | 524 |
gbLayout->addWidget(sbPort, 1, 1); |
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
525 |
|
675 | 526 |
BtnDefault = new QPushButton(gb); |
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
527 |
BtnDefault->setText(QPushButton::tr("default")); |
675 | 528 |
gbLayout->addWidget(BtnDefault, 1, 2); |
657
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
529 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
530 |
connect(BtnDefault, SIGNAL(clicked()), this, SLOT(setDefaultPort())); |
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 |
|
b34fc518a48a
Basic concept for net server options page (subject to change)
unc0rr
parents:
653
diff
changeset
|
533 |
void PageNetServer::setDefaultPort() |
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 |
sbPort->setValue(46631); |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
536 |
} |
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
617
diff
changeset
|
537 |
|
1153 | 538 |
PageNetGame::PageNetGame(QWidget* parent) : AbstractPage(parent) |
184 | 539 |
{ |
540 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
541 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
452 | 542 |
pageLayout->setSizeConstraint(QLayout::SetMinimumSize); |
461 | 543 |
//pageLayout->setSpacing(1); |
463 | 544 |
pageLayout->setColumnStretch(0, 50); |
545 |
pageLayout->setColumnStretch(1, 50); |
|
322 | 546 |
|
461 | 547 |
// chatwidget |
548 |
pChatWidget = new HWChatWidget(this); |
|
549 |
pageLayout->addWidget(pChatWidget, 1, 0); |
|
464 | 550 |
pageLayout->setRowStretch(1, 100); |
453 | 551 |
|
329
4c3aad46baa5
Send game parameters by net... Currently it leads to infinite loop, flooding traffic with messages about changes
unc0rr
parents:
323
diff
changeset
|
552 |
pGameCFG = new GameCFGWidget(this); |
322 | 553 |
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
|
554 |
|
4c3aad46baa5
Send game parameters by net... Currently it leads to infinite loop, flooding traffic with messages about changes
unc0rr
parents:
323
diff
changeset
|
555 |
pNetTeamsWidget = new TeamSelWidget(this); |
373 | 556 |
pNetTeamsWidget->setAcceptOuter(true); |
461 | 557 |
pageLayout->addWidget(pNetTeamsWidget, 0, 1, 2, 1); |
184 | 558 |
|
1153 | 559 |
BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); |
184 | 560 |
|
646 | 561 |
BtnGo = new QPushButton(this); |
184 | 562 |
BtnGo->setFont(*font14); |
563 |
BtnGo->setText(QPushButton::tr("Go!")); |
|
492 | 564 |
BtnGo->setEnabled(false); |
461 | 565 |
pageLayout->addWidget(BtnGo, 2, 1); |
184 | 566 |
} |
187 | 567 |
|
1153 | 568 |
PageInfo::PageInfo(QWidget* parent) : AbstractPage(parent) |
187 | 569 |
{ |
570 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
571 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
572 |
pageLayout->setColumnStretch(0, 1); |
|
573 |
pageLayout->setColumnStretch(1, 1); |
|
574 |
pageLayout->setColumnStretch(2, 1); |
|
575 |
||
1153 | 576 |
BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
187 | 577 |
|
578 |
about = new About(this); |
|
579 |
pageLayout->addWidget(about, 0, 0, 1, 3); |
|
580 |
} |
|
306 | 581 |
|
1153 | 582 |
PageGameStats::PageGameStats(QWidget* parent) : AbstractPage(parent) |
306 | 583 |
{ |
584 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
585 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
586 |
pageLayout->setColumnStretch(0, 1); |
|
587 |
pageLayout->setColumnStretch(1, 1); |
|
588 |
pageLayout->setColumnStretch(2, 1); |
|
589 |
||
1153 | 590 |
BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
306 | 591 |
|
307 | 592 |
labelGameStats = new QLabel(this); |
593 |
labelGameStats->setTextFormat(Qt::RichText); |
|
594 |
pageLayout->addWidget(labelGameStats, 0, 0, 1, 3); |
|
306 | 595 |
} |
586 | 596 |
|
1150 | 597 |
PageSinglePlayer::PageSinglePlayer(QWidget* parent) : AbstractPage(parent) |
586 | 598 |
{ |
599 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
600 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
601 |
pageLayout->setColumnStretch(0, 1); |
|
602 |
pageLayout->setColumnStretch(1, 2); |
|
603 |
pageLayout->setColumnStretch(2, 1); |
|
588 | 604 |
pageLayout->setRowStretch(0, 1); |
1150 | 605 |
pageLayout->setRowStretch(6, 1); |
586 | 606 |
|
1150 | 607 |
BtnSimpleGamePage = addButton(tr("Simple Game"), pageLayout, 1, 1); |
608 |
BtnTrainPage = addButton(tr("Training"), pageLayout, 2, 1); |
|
609 |
BtnMultiplayer = addButton(tr("Multiplayer"), pageLayout, 3, 1); |
|
610 |
BtnLoad = addButton(tr("Saved games"), pageLayout, 4, 1); |
|
611 |
BtnDemos = addButton(tr("Demos"), pageLayout, 5, 1); |
|
586 | 612 |
|
1153 | 613 |
BtnBack = addButton(":/res/Exit.png", pageLayout, 7, 0, true); |
586 | 614 |
} |
615 |
||
1153 | 616 |
PageTraining::PageTraining(QWidget* parent) : AbstractPage(parent) |
587 | 617 |
{ |
618 |
QFont * font14 = new QFont("MS Shell Dlg", 14); |
|
619 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
620 |
pageLayout->setColumnStretch(0, 1); |
|
621 |
pageLayout->setColumnStretch(1, 2); |
|
622 |
pageLayout->setColumnStretch(2, 1); |
|
623 |
||
624 |
BtnStartTrain = new QPushButton(this); |
|
625 |
BtnStartTrain->setFont(*font14); |
|
626 |
BtnStartTrain->setText(QPushButton::tr("Go!")); |
|
627 |
pageLayout->addWidget(BtnStartTrain, 1, 2); |
|
628 |
||
1153 | 629 |
BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
587 | 630 |
} |
631 |
||
923
b3d097097b54
Use default ammostore string size for weapons number instead of predefined const
unc0rr
parents:
788
diff
changeset
|
632 |
PageSelectWeapon::PageSelectWeapon(QWidget* parent) : |
684 | 633 |
AbstractPage(parent) |
600 | 634 |
{ |
635 |
QGridLayout * pageLayout = new QGridLayout(this); |
|
923
b3d097097b54
Use default ammostore string size for weapons number instead of predefined const
unc0rr
parents:
788
diff
changeset
|
636 |
|
1168 | 637 |
pWeapons = new SelWeaponWidget(cDefaultAmmoStore->size() - 10, this); |
718 | 638 |
pageLayout->addWidget(pWeapons, 0, 0, 1, 4); |
600 | 639 |
|
1168 | 640 |
BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
730 | 641 |
BtnDefault = addButton(tr("Default"), pageLayout, 1, 1); |
642 |
BtnDelete = addButton(tr("Delete"), pageLayout, 1, 2); |
|
1168 | 643 |
BtnSave = addButton(":/res/Save.png", pageLayout, 1, 3, true); |
600 | 644 |
} |
645 |
||
1249
b6670a6ea2d0
Remove 25pix margin on every page, so exit button is almost in the same place on all pages
unc0rr
parents:
1240
diff
changeset
|
646 |
PageInGame::PageInGame(QWidget* parent) : |
686 | 647 |
AbstractPage(parent) |
648 |
{ |
|
649 |
QLabel * label = new QLabel(this); |
|
650 |
label->setText("In game..."); |
|
651 |
} |