author | unc0rr |
Tue, 06 Jan 2009 14:30:03 +0000 | |
changeset 1588 | 0988ae7771d3 |
parent 1542 | b755ddb0bae8 |
child 1621 | d1ded2532d3f |
permissions | -rw-r--r-- |
184 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
883 | 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 <QVBoxLayout> |
|
20 |
#include <QGridLayout> |
|
471 | 21 |
#include <QMainWindow> |
22 |
#include <QStackedLayout> |
|
23 |
||
184 | 24 |
#include "ui_hwform.h" |
25 |
#include "pages.h" |
|
579 | 26 |
#include "playrecordpage.h" |
1542 | 27 |
#include "hwconsts.h" |
184 | 28 |
|
29 |
void Ui_HWForm::setupUi(QMainWindow *HWForm) |
|
30 |
{ |
|
31 |
SetupFonts(); |
|
32 |
||
33 |
HWForm->setObjectName(QString::fromUtf8("HWForm")); |
|
485
defe001d490c
form size increased (network chat is now fit into window initially)
displacer
parents:
471
diff
changeset
|
34 |
HWForm->resize(QSize(640, 480).expandedTo(HWForm->minimumSizeHint())); |
1158 | 35 |
HWForm->setMinimumSize(QSize(720, 430)); |
1542 | 36 |
HWForm->setWindowTitle(QMainWindow::tr("Hedgewars %1").arg(*cVersionString)); |
184 | 37 |
centralWidget = new QWidget(HWForm); |
38 |
centralWidget->setObjectName(QString::fromUtf8("centralWidget")); |
|
39 |
||
40 |
SetupPages(centralWidget); |
|
41 |
||
42 |
HWForm->setCentralWidget(centralWidget); |
|
43 |
||
44 |
Pages->setCurrentIndex(0); |
|
45 |
||
46 |
QMetaObject::connectSlotsByName(HWForm); |
|
47 |
} |
|
48 |
||
49 |
void Ui_HWForm::SetupFonts() |
|
50 |
{ |
|
51 |
font14 = new QFont("MS Shell Dlg", 14); |
|
52 |
} |
|
53 |
||
54 |
void Ui_HWForm::SetupPages(QWidget *Parent) |
|
55 |
{ |
|
586 | 56 |
Pages = new QStackedLayout(Parent); |
184 | 57 |
|
58 |
pageEditTeam = new PageEditTeam(); |
|
59 |
Pages->addWidget(pageEditTeam); |
|
60 |
||
61 |
pageOptions = new PageOptions(); |
|
62 |
Pages->addWidget(pageOptions); |
|
63 |
||
64 |
pageMultiplayer = new PageMultiplayer(); |
|
65 |
Pages->addWidget(pageMultiplayer); |
|
66 |
||
586 | 67 |
pagePlayDemo = new PagePlayDemo(); |
184 | 68 |
Pages->addWidget(pagePlayDemo); |
69 |
||
70 |
pageNet = new PageNet(); |
|
71 |
Pages->addWidget(pageNet); |
|
72 |
||
586 | 73 |
pageNetGame = new PageNetGame(); |
184 | 74 |
Pages->addWidget(pageNetGame); |
75 |
||
187 | 76 |
pageInfo = new PageInfo(); |
77 |
Pages->addWidget(pageInfo); |
|
78 |
||
184 | 79 |
pageMain = new PageMain(); |
80 |
Pages->addWidget(pageMain); |
|
306 | 81 |
|
82 |
pageGameStats = new PageGameStats(); |
|
83 |
Pages->addWidget(pageGameStats); |
|
586 | 84 |
|
85 |
pageSinglePlayer = new PageSinglePlayer(); |
|
86 |
Pages->addWidget(pageSinglePlayer); |
|
587 | 87 |
|
88 |
pageTraining = new PageTraining(); |
|
89 |
Pages->addWidget(pageTraining); |
|
600 | 90 |
|
91 |
pageSelectWeapon = new PageSelectWeapon(); |
|
92 |
Pages->addWidget(pageSelectWeapon); |
|
646 | 93 |
|
94 |
pageNetServer = new PageNetServer(); |
|
95 |
Pages->addWidget(pageNetServer); |
|
686 | 96 |
|
97 |
pageInGame = new PageInGame(); |
|
98 |
Pages->addWidget(pageInGame); |
|
1311 | 99 |
|
100 |
pageRoomsList = new PageRoomsList(); |
|
101 |
Pages->addWidget(pageRoomsList); |
|
184 | 102 |
} |