author | nemo |
Mon, 15 Jun 2009 21:03:57 +0000 | |
changeset 2167 | 4e9ad395c1d1 |
parent 1950 | 09ad18a1be11 |
child 2515 | 51d3f4b6293a |
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" |
|
1621 | 26 |
#include "statsPage.h" |
579 | 27 |
#include "playrecordpage.h" |
1542 | 28 |
#include "hwconsts.h" |
184 | 29 |
|
30 |
void Ui_HWForm::setupUi(QMainWindow *HWForm) |
|
31 |
{ |
|
32 |
SetupFonts(); |
|
33 |
||
34 |
HWForm->setObjectName(QString::fromUtf8("HWForm")); |
|
485
defe001d490c
form size increased (network chat is now fit into window initially)
displacer
parents:
471
diff
changeset
|
35 |
HWForm->resize(QSize(640, 480).expandedTo(HWForm->minimumSizeHint())); |
1644 | 36 |
HWForm->setMinimumSize(QSize(720, 450)); |
1542 | 37 |
HWForm->setWindowTitle(QMainWindow::tr("Hedgewars %1").arg(*cVersionString)); |
184 | 38 |
centralWidget = new QWidget(HWForm); |
39 |
centralWidget->setObjectName(QString::fromUtf8("centralWidget")); |
|
40 |
||
41 |
SetupPages(centralWidget); |
|
42 |
||
43 |
HWForm->setCentralWidget(centralWidget); |
|
44 |
||
45 |
Pages->setCurrentIndex(0); |
|
46 |
||
47 |
QMetaObject::connectSlotsByName(HWForm); |
|
48 |
} |
|
49 |
||
50 |
void Ui_HWForm::SetupFonts() |
|
51 |
{ |
|
52 |
font14 = new QFont("MS Shell Dlg", 14); |
|
53 |
} |
|
54 |
||
55 |
void Ui_HWForm::SetupPages(QWidget *Parent) |
|
56 |
{ |
|
586 | 57 |
Pages = new QStackedLayout(Parent); |
184 | 58 |
|
59 |
pageEditTeam = new PageEditTeam(); |
|
60 |
Pages->addWidget(pageEditTeam); |
|
61 |
||
62 |
pageOptions = new PageOptions(); |
|
63 |
Pages->addWidget(pageOptions); |
|
64 |
||
65 |
pageMultiplayer = new PageMultiplayer(); |
|
66 |
Pages->addWidget(pageMultiplayer); |
|
67 |
||
586 | 68 |
pagePlayDemo = new PagePlayDemo(); |
184 | 69 |
Pages->addWidget(pagePlayDemo); |
70 |
||
71 |
pageNet = new PageNet(); |
|
72 |
Pages->addWidget(pageNet); |
|
73 |
||
586 | 74 |
pageNetGame = new PageNetGame(); |
184 | 75 |
Pages->addWidget(pageNetGame); |
76 |
||
187 | 77 |
pageInfo = new PageInfo(); |
78 |
Pages->addWidget(pageInfo); |
|
79 |
||
184 | 80 |
pageMain = new PageMain(); |
81 |
Pages->addWidget(pageMain); |
|
306 | 82 |
|
83 |
pageGameStats = new PageGameStats(); |
|
84 |
Pages->addWidget(pageGameStats); |
|
586 | 85 |
|
86 |
pageSinglePlayer = new PageSinglePlayer(); |
|
87 |
Pages->addWidget(pageSinglePlayer); |
|
587 | 88 |
|
89 |
pageTraining = new PageTraining(); |
|
90 |
Pages->addWidget(pageTraining); |
|
600 | 91 |
|
92 |
pageSelectWeapon = new PageSelectWeapon(); |
|
93 |
Pages->addWidget(pageSelectWeapon); |
|
646 | 94 |
|
95 |
pageNetServer = new PageNetServer(); |
|
96 |
Pages->addWidget(pageNetServer); |
|
686 | 97 |
|
98 |
pageInGame = new PageInGame(); |
|
99 |
Pages->addWidget(pageInGame); |
|
1311 | 100 |
|
101 |
pageRoomsList = new PageRoomsList(); |
|
102 |
Pages->addWidget(pageRoomsList); |
|
1800 | 103 |
|
104 |
pageConnecting = new PageConnecting(); |
|
105 |
Pages->addWidget(pageConnecting); |
|
1884 | 106 |
|
107 |
pageScheme = new PageScheme(); |
|
108 |
Pages->addWidget(pageScheme); |
|
1905 | 109 |
|
110 |
pageAdmin = new PageAdmin(); |
|
111 |
Pages->addWidget(pageAdmin); |
|
1950 | 112 |
|
113 |
pageNetType = new PageNetType(); |
|
114 |
Pages->addWidget(pageNetType); |
|
184 | 115 |
} |