87
|
1 |
/*
|
|
2 |
* Hedgewars, a worms-like game
|
|
3 |
* Copyright (c) 2006 Andrey Korotaev <unC0Rr@gmail.com>
|
|
4 |
*
|
|
5 |
* Distributed under the terms of the BSD-modified licence:
|
|
6 |
*
|
|
7 |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8 |
* of this software and associated documentation files (the "Software"), to deal
|
|
9 |
* with the Software without restriction, including without limitation the
|
|
10 |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
11 |
* sell copies of the Software, and to permit persons to whom the Software is
|
|
12 |
* furnished to do so, subject to the following conditions:
|
|
13 |
*
|
|
14 |
* 1. Redistributions of source code must retain the above copyright notice,
|
|
15 |
* this list of conditions and the following disclaimer.
|
|
16 |
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
17 |
* this list of conditions and the following disclaimer in the documentation
|
|
18 |
* and/or other materials provided with the distribution.
|
|
19 |
* 3. The name of the author may not be used to endorse or promote products
|
|
20 |
* derived from this software without specific prior written permission.
|
|
21 |
*
|
|
22 |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
23 |
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
24 |
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
25 |
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
26 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
27 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
28 |
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
29 |
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
30 |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
31 |
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32 |
*/
|
|
33 |
|
|
34 |
#include <QGridLayout>
|
|
35 |
#include <QDir>
|
|
36 |
#include <QPushButton>
|
|
37 |
#include <QGroupBox>
|
|
38 |
#include <QComboBox>
|
|
39 |
#include <QLabel>
|
|
40 |
#include <QToolBox>
|
|
41 |
#include <QLineEdit>
|
|
42 |
#include <QListWidget>
|
88
|
43 |
#include <QApplication>
|
87
|
44 |
|
|
45 |
#include "pages.h"
|
|
46 |
#include "sdlkeys.h"
|
|
47 |
#include "hwconsts.h"
|
|
48 |
#include "gamecfgwidget.h"
|
|
49 |
#include "teamselect.h"
|
|
50 |
#include "gamecfgwidget.h"
|
|
51 |
|
|
52 |
PageMain::PageMain(QWidget* parent) : QWidget(parent)
|
|
53 |
{
|
|
54 |
QFont * font14 = new QFont("MS Shell Dlg", 14);
|
|
55 |
QGridLayout * pageLayout = new QGridLayout(this);
|
|
56 |
pageLayout->setMargin(25);
|
|
57 |
pageLayout->setColumnStretch(0, 1);
|
|
58 |
pageLayout->setColumnStretch(1, 2);
|
|
59 |
pageLayout->setColumnStretch(2, 1);
|
|
60 |
|
|
61 |
BtnSinglePlayer = new QPushButton(this);
|
|
62 |
BtnSinglePlayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
63 |
BtnSinglePlayer->setFont(*font14);
|
|
64 |
BtnSinglePlayer->setText(QPushButton::tr("Single Player"));
|
|
65 |
pageLayout->addWidget(BtnSinglePlayer, 1, 1);
|
|
66 |
|
|
67 |
BtnMultiplayer = new QPushButton(this);
|
|
68 |
BtnMultiplayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
69 |
BtnMultiplayer->setFont(*font14);
|
|
70 |
BtnMultiplayer->setText(QPushButton::tr("Multiplayer"));
|
|
71 |
pageLayout->addWidget(BtnMultiplayer, 2, 1);
|
|
72 |
|
|
73 |
BtnNet = new QPushButton(this);
|
|
74 |
BtnNet->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
75 |
BtnNet->setFont(*font14);
|
|
76 |
BtnNet->setText(QPushButton::tr("Net game"));
|
|
77 |
pageLayout->addWidget(BtnNet, 3, 1);
|
|
78 |
|
|
79 |
BtnDemos = new QPushButton(this);
|
|
80 |
BtnDemos->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
81 |
BtnDemos->setFont(*font14);
|
|
82 |
BtnDemos->setText(QPushButton::tr("Demos"));
|
|
83 |
pageLayout->addWidget(BtnDemos, 4, 1);
|
|
84 |
|
|
85 |
BtnSetup = new QPushButton(this);
|
|
86 |
BtnSetup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
87 |
BtnSetup->setFont(*font14);
|
|
88 |
BtnSetup->setText(QPushButton::tr("Setup"));
|
|
89 |
pageLayout->addWidget(BtnSetup, 5, 1);
|
|
90 |
|
|
91 |
BtnExit = new QPushButton(parent);
|
|
92 |
BtnExit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
93 |
BtnExit->setFont(*font14);
|
|
94 |
BtnExit->setText(QPushButton::tr("Exit"));
|
|
95 |
pageLayout->addWidget(BtnExit, 6, 1);
|
|
96 |
}
|
|
97 |
|
|
98 |
PageLocalGame::PageLocalGame(QWidget* parent) : QWidget(parent)
|
|
99 |
{
|
|
100 |
QFont * font14 = new QFont("MS Shell Dlg", 14);
|
|
101 |
QGridLayout * pageLayout = new QGridLayout(this);
|
|
102 |
BtnBack = new QPushButton(this);
|
|
103 |
BtnBack->setFont(*font14);
|
|
104 |
BtnBack->setText(QPushButton::tr("Back"));
|
|
105 |
pageLayout->addWidget(BtnBack, 1, 0);
|
|
106 |
BtnSimpleGame = new QPushButton(this);
|
|
107 |
BtnSimpleGame->setFont(*font14);
|
|
108 |
BtnSimpleGame->setText(QPushButton::tr("Simple Game"));
|
|
109 |
pageLayout->addWidget(BtnSimpleGame, 1, 3);
|
|
110 |
gameCFG = new GameCFGWidget(this);
|
|
111 |
pageLayout->addWidget(gameCFG, 0, 0, 1, 2);
|
|
112 |
}
|
|
113 |
|
|
114 |
PageEditTeam::PageEditTeam(QWidget* parent) : QWidget(parent)
|
|
115 |
{
|
|
116 |
QFont * font14 = new QFont("MS Shell Dlg", 14);
|
90
|
117 |
QGridLayout * pageLayout = new QGridLayout(this);
|
|
118 |
pageLayout->setColumnStretch(0, 100);
|
|
119 |
pageLayout->setColumnMinimumWidth(0, 150);
|
|
120 |
pageLayout->setColumnStretch(1, 100);
|
|
121 |
pageLayout->setColumnMinimumWidth(1, 200);
|
|
122 |
pageLayout->setColumnStretch(2, 250);
|
|
123 |
pageLayout->setColumnMinimumWidth(2, 250);
|
|
124 |
|
87
|
125 |
GBoxTeam = new QGroupBox(this);
|
|
126 |
GBoxTeam->setTitle(QGroupBox::tr("Team"));
|
90
|
127 |
GBoxTeam->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
|
128 |
QGridLayout * GBTLayout = new QGridLayout(GBoxTeam);
|
|
129 |
TeamNameEdit = new QLineEdit(GBoxTeam);
|
|
130 |
TeamNameEdit->setMaxLength(15);
|
|
131 |
GBTLayout->addWidget(TeamNameEdit);
|
|
132 |
pageLayout->addWidget(GBoxTeam, 0, 0);
|
|
133 |
|
|
134 |
GBoxHedgehogs = new QGroupBox(this);
|
|
135 |
GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members"));
|
|
136 |
GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
|
137 |
QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs);
|
|
138 |
for(int i = 0; i < 8; i++)
|
|
139 |
{
|
|
140 |
HHNameEdit[i] = new QLineEdit(GBoxHedgehogs);
|
|
141 |
HHNameEdit[i]->setGeometry(QRect(10, 20 + i * 30, 141, 20));
|
|
142 |
HHNameEdit[i]->setMaxLength(15);
|
|
143 |
GBHLayout->addWidget(HHNameEdit[i]);
|
|
144 |
}
|
|
145 |
pageLayout->addWidget(GBoxHedgehogs, 1, 0, 2, 1);
|
|
146 |
|
|
147 |
BtnTeamDiscard = new QPushButton(this);
|
|
148 |
BtnTeamDiscard->setFont(*font14);
|
|
149 |
BtnTeamDiscard->setText(QPushButton::tr("Discard"));
|
|
150 |
pageLayout->addWidget(BtnTeamDiscard, 4, 0);
|
|
151 |
|
87
|
152 |
GBoxBinds = new QGroupBox(this);
|
|
153 |
GBoxBinds->setTitle(QGroupBox::tr("Key binds"));
|
90
|
154 |
QGridLayout * GBBLayout = new QGridLayout(GBoxBinds);
|
87
|
155 |
BindsBox = new QToolBox(GBoxBinds);
|
|
156 |
BindsBox->setLineWidth(0);
|
90
|
157 |
GBBLayout->addWidget(BindsBox);
|
87
|
158 |
page_A = new QWidget();
|
|
159 |
BindsBox->addItem(page_A, QToolBox::tr("Actions"));
|
|
160 |
page_W = new QWidget();
|
|
161 |
BindsBox->addItem(page_W, QToolBox::tr("Weapons"));
|
|
162 |
page_WP = new QWidget();
|
|
163 |
BindsBox->addItem(page_WP, QToolBox::tr("Weapon properties"));
|
|
164 |
page_O = new QWidget();
|
|
165 |
BindsBox->addItem(page_O, QToolBox::tr("Other"));
|
90
|
166 |
pageLayout->addWidget(GBoxBinds, 0, 1, 5, 1);
|
87
|
167 |
|
|
168 |
QStringList binds;
|
|
169 |
for(int i = 0; strlen(sdlkeys[i][1]) > 0; i++)
|
|
170 |
{
|
|
171 |
binds << sdlkeys[i][1];
|
|
172 |
}
|
|
173 |
|
90
|
174 |
quint16 widind = 0, i = 0;
|
|
175 |
while (i < BINDS_NUMBER) {
|
|
176 |
quint16 num = 0;
|
|
177 |
QGridLayout * pagelayout = new QGridLayout(BindsBox->widget(widind));
|
|
178 |
do {
|
|
179 |
LBind[i] = new QLabel(BindsBox->widget(widind));
|
|
180 |
LBind[i]->setText(QApplication::translate("binds", cbinds[i].name));
|
|
181 |
LBind[i]->setAlignment(Qt::AlignRight);
|
|
182 |
pagelayout->addWidget(LBind[i], num, 0);
|
|
183 |
CBBind[i] = new QComboBox(BindsBox->widget(widind));
|
|
184 |
CBBind[i]->addItems(binds);
|
|
185 |
pagelayout->addWidget(CBBind[i], num, 1);
|
|
186 |
num++;
|
|
187 |
} while (!cbinds[i++].chwidget);
|
|
188 |
pagelayout->addWidget(new QWidget(BindsBox->widget(widind)), num, 0, 1, 2);
|
|
189 |
widind++;
|
87
|
190 |
}
|
|
191 |
|
90
|
192 |
GBoxGrave = new QGroupBox(this);
|
|
193 |
GBoxGrave->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
|
194 |
GBoxGrave->setTitle(QGroupBox::tr("Grave"));
|
|
195 |
QGridLayout * GBGLayout = new QGridLayout(GBoxGrave);
|
|
196 |
CBGrave = new QComboBox(GBoxGrave);
|
|
197 |
CBGrave->setMaxCount(65535);
|
|
198 |
GBGLayout->addWidget(CBGrave, 0, 0, 1, 3);
|
|
199 |
GravePreview = new QLabel(GBoxGrave);
|
|
200 |
GravePreview->setScaledContents(false);
|
|
201 |
GBGLayout->addWidget(GravePreview, 1, 1);
|
|
202 |
pageLayout->addWidget(GBoxGrave, 0, 2, 2, 1);
|
|
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);
|
|
210 |
FortPreview = new QLabel(GBoxFort);
|
|
211 |
FortPreview->setPixmap(QPixmap());
|
|
212 |
FortPreview->setScaledContents(true);
|
|
213 |
GBFLayout->addWidget(FortPreview, 1, 0);
|
|
214 |
pageLayout->addWidget(GBoxFort, 2, 2, 1, 1);
|
|
215 |
|
|
216 |
BtnTeamSave = new QPushButton(this);
|
|
217 |
BtnTeamSave->setFont(*font14);
|
|
218 |
BtnTeamSave->setText(QPushButton::tr("Save"));
|
|
219 |
pageLayout->addWidget(BtnTeamSave, 4, 2);
|
|
220 |
|
|
221 |
|
87
|
222 |
QDir tmpdir;
|
|
223 |
tmpdir.cd(DATA_PATH);
|
|
224 |
tmpdir.cd("Forts");
|
|
225 |
tmpdir.setFilter(QDir::Files);
|
|
226 |
|
|
227 |
CBFort->addItems(tmpdir.entryList(QStringList("*L.png")).replaceInStrings(QRegExp("^(.*)L.png"), "\\1"));
|
|
228 |
tmpdir.cd("../Graphics/Graves");
|
|
229 |
QStringList list = tmpdir.entryList(QStringList("*.png"));
|
|
230 |
for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
|
|
231 |
{
|
|
232 |
CBGrave->addItem((*it).replace(QRegExp("^(.*).png"), "\\1"));
|
|
233 |
}
|
|
234 |
|
|
235 |
connect(CBGrave, SIGNAL(activated(const QString &)), this, SLOT(CBGrave_activated(const QString &)));
|
|
236 |
connect(CBFort, SIGNAL(activated(const QString &)), this, SLOT(CBFort_activated(const QString &)));
|
|
237 |
}
|
|
238 |
|
|
239 |
void PageEditTeam::CBGrave_activated(const QString & gravename)
|
|
240 |
{
|
|
241 |
QPixmap pix(QString(DATA_PATH) + "/Graphics/Graves/" + gravename + ".png");
|
|
242 |
GravePreview->setPixmap(pix.copy(0, 0, 32, 32));
|
|
243 |
}
|
|
244 |
|
|
245 |
void PageEditTeam::CBFort_activated(const QString & fortname)
|
|
246 |
{
|
|
247 |
QPixmap pix(QString(DATA_PATH) + "/Forts/" + fortname + "L.png");
|
|
248 |
FortPreview->setPixmap(pix);
|
|
249 |
}
|
|
250 |
|
|
251 |
PageMultiplayer::PageMultiplayer(QWidget* parent) : QWidget(parent)
|
|
252 |
{
|
|
253 |
QFont * font14 = new QFont("MS Shell Dlg", 14);
|
|
254 |
QGridLayout * pageLayout = new QGridLayout(this);
|
|
255 |
BtnBack = new QPushButton(this);
|
|
256 |
BtnBack->setFont(*font14);
|
|
257 |
BtnBack->setText(QPushButton::tr("Back"));
|
|
258 |
pageLayout->addWidget(BtnBack, 1, 0);
|
|
259 |
gameCFG = new GameCFGWidget(this);
|
|
260 |
pageLayout->addWidget(gameCFG, 0, 0, 1, 2);
|
|
261 |
teamsSelect = new TeamSelWidget(this);
|
|
262 |
pageLayout->addWidget(teamsSelect, 0, 2, 1, 2);
|
|
263 |
}
|
|
264 |
|
|
265 |
PagePlayDemo::PagePlayDemo(QWidget* parent) : QWidget(parent)
|
|
266 |
{
|
|
267 |
QFont * font14 = new QFont("MS Shell Dlg", 14);
|
|
268 |
QGridLayout * pageLayout = new QGridLayout(this);
|
|
269 |
pageLayout->setColumnStretch(0, 1);
|
|
270 |
pageLayout->setColumnStretch(1, 2);
|
|
271 |
pageLayout->setColumnStretch(2, 1);
|
|
272 |
|
|
273 |
BtnBack = new QPushButton(this);
|
|
274 |
BtnBack->setFont(*font14);
|
|
275 |
BtnBack->setText(QPushButton::tr("Back"));
|
|
276 |
pageLayout->addWidget(BtnBack, 1, 0);
|
|
277 |
|
|
278 |
BtnPlayDemo = new QPushButton(this);
|
|
279 |
BtnPlayDemo->setGeometry(QRect(240, 330, 161, 41));
|
|
280 |
BtnPlayDemo->setFont(*font14);
|
|
281 |
BtnPlayDemo->setText(QPushButton::tr("Play demo"));
|
|
282 |
pageLayout->addWidget(BtnPlayDemo, 1, 2);
|
|
283 |
|
|
284 |
DemosList = new QListWidget(this);
|
|
285 |
DemosList->setGeometry(QRect(170, 10, 311, 311));
|
|
286 |
pageLayout->addWidget(DemosList, 0, 1);
|
|
287 |
}
|
|
288 |
|
|
289 |
PageOptions::PageOptions(QWidget* parent) : QWidget(parent)
|
|
290 |
{
|
|
291 |
QFont * font14 = new QFont("MS Shell Dlg", 14);
|
|
292 |
groupBox = new QGroupBox(this);
|
|
293 |
groupBox->setGeometry(QRect(20, 10, 591, 71));
|
|
294 |
groupBox->setTitle(QGroupBox::tr("Teams"));
|
|
295 |
|
|
296 |
BtnNewTeam = new QPushButton(groupBox);
|
|
297 |
BtnNewTeam->setGeometry(QRect(10, 20, 160, 40));
|
|
298 |
BtnNewTeam->setFont(*font14);
|
|
299 |
BtnNewTeam->setText(QPushButton::tr("New team"));
|
|
300 |
|
|
301 |
BtnEditTeam = new QPushButton(groupBox);
|
|
302 |
BtnEditTeam->setGeometry(QRect(400, 20, 160, 40));
|
|
303 |
BtnEditTeam->setFont(*font14);
|
|
304 |
BtnEditTeam->setText(QPushButton::tr("Edit team"));
|
|
305 |
|
|
306 |
CBTeamName = new QComboBox(groupBox);
|
|
307 |
CBTeamName->setGeometry(QRect(200, 30, 171, 22));
|
|
308 |
CBResolution = new QComboBox(this);
|
|
309 |
CBResolution->addItem("640x480");
|
|
310 |
CBResolution->addItem("800x600");
|
|
311 |
CBResolution->addItem("1024x768");
|
|
312 |
CBResolution->addItem("1280x1024");
|
|
313 |
CBResolution->setGeometry(QRect(20, 120, 151, 22));
|
|
314 |
|
|
315 |
CBEnableSound = new QCheckBox(this);
|
|
316 |
CBEnableSound->setGeometry(QRect(20, 180, 101, 18));
|
|
317 |
CBEnableSound->setText(QCheckBox::tr("Enable sound"));
|
|
318 |
|
|
319 |
CBFullscreen = new QCheckBox(this);
|
|
320 |
CBFullscreen->setGeometry(QRect(20, 160, 101, 18));
|
|
321 |
CBFullscreen->setText(QCheckBox::tr("Fullscreen"));
|
|
322 |
|
|
323 |
label = new QLabel(this);
|
|
324 |
label->setGeometry(QRect(10, 233, 47, 13));
|
|
325 |
label->setText(QLabel::tr("Net nick"));
|
|
326 |
|
|
327 |
editNetNick = new QLineEdit(this);
|
|
328 |
editNetNick->setGeometry(QRect(60, 230, 113, 20));
|
|
329 |
editNetNick->setMaxLength(30);
|
|
330 |
editNetNick->setText(QLineEdit::tr("unnamed"));
|
|
331 |
|
|
332 |
BtnSaveOptions = new QPushButton(this);
|
|
333 |
BtnSaveOptions->setGeometry(QRect(20, 380, 161, 41));
|
|
334 |
BtnSaveOptions->setFont(*font14);
|
|
335 |
BtnSaveOptions->setText(QPushButton::tr("Save"));
|
|
336 |
|
|
337 |
BtnBack = new QPushButton(this);
|
|
338 |
BtnBack->setGeometry(QRect(440, 380, 161, 41));
|
|
339 |
BtnBack->setFont(*font14);
|
|
340 |
BtnBack->setText(QPushButton::tr("Back"));
|
|
341 |
}
|
|
342 |
|
|
343 |
PageNet::PageNet(QWidget* parent) : QWidget(parent)
|
|
344 |
{
|
|
345 |
QFont * font14 = new QFont("MS Shell Dlg", 14);
|
|
346 |
BtnNetConnect = new QPushButton(this);
|
|
347 |
BtnNetConnect->setGeometry(QRect(250, 140, 161, 41));
|
|
348 |
BtnNetConnect->setFont(*font14);
|
|
349 |
BtnNetConnect->setText(QPushButton::tr("Connect"));
|
|
350 |
BtnBack = new QPushButton(this);
|
|
351 |
BtnBack->setGeometry(QRect(250, 390, 161, 41));
|
|
352 |
BtnBack->setFont(*font14);
|
|
353 |
BtnBack->setText(QPushButton::tr("Back"));
|
|
354 |
}
|
|
355 |
|
|
356 |
PageNetChat::PageNetChat(QWidget* parent) : QWidget(parent)
|
|
357 |
{
|
|
358 |
QFont * font14 = new QFont("MS Shell Dlg", 14);
|
|
359 |
BtnDisconnect = new QPushButton(this);
|
|
360 |
BtnDisconnect->setGeometry(QRect(460, 390, 161, 41));
|
|
361 |
BtnDisconnect->setFont(*font14);
|
|
362 |
BtnDisconnect->setText(QPushButton::tr("Disconnect"));
|
|
363 |
ChannelsList = new QListWidget(this);
|
|
364 |
ChannelsList->setGeometry(QRect(20, 10, 201, 331));
|
|
365 |
BtnJoin = new QPushButton(this);
|
|
366 |
BtnJoin->setGeometry(QRect(460, 290, 161, 41));
|
|
367 |
BtnJoin->setFont(*font14);
|
|
368 |
BtnJoin->setText(QPushButton::tr("Join"));
|
|
369 |
BtnCreate = new QPushButton(this);
|
|
370 |
BtnCreate->setGeometry(QRect(460, 340, 161, 41));
|
|
371 |
BtnCreate->setFont(*font14);
|
|
372 |
BtnCreate->setText(QPushButton::tr("Create"));
|
|
373 |
}
|
|
374 |
|
|
375 |
|
|
376 |
PageNetGame::PageNetGame(QWidget* parent) : QWidget(parent)
|
|
377 |
{
|
|
378 |
QFont * font14 = new QFont("MS Shell Dlg", 14);
|
|
379 |
BtnBack = new QPushButton(this);
|
|
380 |
BtnBack->setGeometry(QRect(260, 390, 161, 41));
|
|
381 |
BtnBack->setFont(*font14);
|
|
382 |
BtnBack->setText(QPushButton::tr("Back"));
|
|
383 |
|
|
384 |
BtnAddTeam = new QPushButton(this);
|
|
385 |
BtnAddTeam->setGeometry(QRect(260, 290, 161, 41));
|
|
386 |
BtnAddTeam->setFont(*font14);
|
|
387 |
BtnAddTeam->setText(QPushButton::tr("Add Team"));
|
|
388 |
|
|
389 |
BtnGo = new QPushButton(this);
|
|
390 |
BtnGo->setGeometry(QRect(260, 340, 161, 41));
|
|
391 |
BtnGo->setFont(*font14);
|
|
392 |
BtnGo->setText(QPushButton::tr("Go!"));
|
|
393 |
|
|
394 |
listNetTeams = new QListWidget(this);
|
|
395 |
listNetTeams->setGeometry(QRect(270, 30, 120, 80));
|
|
396 |
}
|