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