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