--- a/QTfrontend/hwform.cpp Tue Apr 07 16:52:01 2009 +0000
+++ b/QTfrontend/hwform.cpp Fri Apr 10 18:38:01 2009 +0000
@@ -75,7 +75,7 @@
connect(ui.pageMain->BtnSinglePlayer, SIGNAL(clicked()), this, SLOT(GoToSinglePlayer()));
connect(ui.pageMain->BtnSetup, SIGNAL(clicked()), this, SLOT(GoToSetup()));
- connect(ui.pageMain->BtnNet, SIGNAL(clicked()), this, SLOT(GoToNet()));
+ connect(ui.pageMain->BtnNet, SIGNAL(clicked()), this, SLOT(GoToNetType()));
connect(ui.pageMain->BtnInfo, SIGNAL(clicked()), this, SLOT(GoToInfo()));
connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed()));
connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(btnExitClicked()));
@@ -93,15 +93,15 @@
connect(ui.pageMultiplayer->teamsSelect, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToSchemes()), this, SLOT(GoToSchemes()));
- connect(ui.pagePlayDemo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
- connect(ui.pagePlayDemo->BtnPlayDemo, SIGNAL(clicked()), this, SLOT(PlayDemo()));
- connect(ui.pagePlayDemo->DemosList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(PlayDemo()));
+ connect(ui.pagePlayDemo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+ connect(ui.pagePlayDemo->BtnPlayDemo, SIGNAL(clicked()), this, SLOT(PlayDemo()));
+ connect(ui.pagePlayDemo->DemosList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(PlayDemo()));
- connect(ui.pageOptions->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
- connect(ui.pageOptions->BtnNewTeam, SIGNAL(clicked()), this, SLOT(NewTeam()));
- connect(ui.pageOptions->BtnEditTeam, SIGNAL(clicked()), this, SLOT(EditTeam()));
- connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), config, SLOT(SaveOptions()));
- connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), this, SLOT(GoBack()));
+ connect(ui.pageOptions->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+ connect(ui.pageOptions->BtnNewTeam, SIGNAL(clicked()), this, SLOT(NewTeam()));
+ connect(ui.pageOptions->BtnEditTeam, SIGNAL(clicked()), this, SLOT(EditTeam()));
+ connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), config, SLOT(SaveOptions()));
+ connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageOptions->WeaponEdit, SIGNAL(clicked()), this, SLOT(GoToSelectWeapon()));
connect(ui.pageOptions->WeaponsButt, SIGNAL(clicked()), this, SLOT(GoToSelectNewWeapon()));
@@ -109,14 +109,13 @@
connect(ui.pageNet->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageNet->BtnSpecifyServer, SIGNAL(clicked()), this, SLOT(NetConnect()));
- connect(ui.pageNet->BtnOfficialServer, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer()));
connect(ui.pageNet->BtnNetSvrStart, SIGNAL(clicked()), this, SLOT(GoToNetServer()));
connect(ui.pageNet, SIGNAL(connectClicked(const QString &, quint16)), this, SLOT(NetConnectServer(const QString &, quint16)));
- connect(ui.pageNetServer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
- connect(ui.pageNetServer->BtnStart, SIGNAL(clicked()), this, SLOT(NetStartServer()));
+ connect(ui.pageNetServer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+ connect(ui.pageNetServer->BtnStart, SIGNAL(clicked()), this, SLOT(NetStartServer()));
- connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+ connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(setEnabledGameStart(bool)),
ui.pageNetGame->BtnGo, SLOT(setEnabled(bool)));
connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
@@ -154,6 +153,10 @@
connect(ui.pageAdmin->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+ connect(ui.pageNetType->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+ connect(ui.pageNetType->BtnLAN, SIGNAL(clicked()), this, SLOT(GoToNet()));
+ connect(ui.pageNetType->BtnOfficialServer, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer()));
+
ammoSchemeModel = new AmmoSchemeModel(this, cfgdir->absolutePath() + "/schemes.ini");
ui.pageScheme->setModel(ammoSchemeModel);
@@ -289,6 +292,11 @@
GoToPage(ID_PAGE_NET);
}
+void HWForm::GoToNetType()
+{
+ GoToPage(ID_PAGE_NETTYPE);
+}
+
void HWForm::GoToNetServer()
{
GoToPage(ID_PAGE_NETSERVER);
--- a/QTfrontend/pages.cpp Tue Apr 07 16:52:01 2009 +0000
+++ b/QTfrontend/pages.cpp Fri Apr 10 18:38:01 2009 +0000
@@ -496,11 +496,6 @@
BtnSpecifyServer->setText(QPushButton::tr("Specify"));
GBClayout->addWidget(BtnSpecifyServer, 2, 1);
- BtnOfficialServer = new QPushButton(ConnGroupBox);
- BtnOfficialServer->setFont(*font14);
- BtnOfficialServer->setText(QPushButton::tr("Join official server"));
- GBClayout->addWidget(BtnOfficialServer, 3, 0, 1, 3);
-
connect(BtnNetConnect, SIGNAL(clicked()), this, SLOT(slotConnect()));
}
@@ -709,7 +704,6 @@
PageTraining::PageTraining(QWidget* parent) : AbstractPage(parent)
{
- QFont * font14 = new QFont("MS Shell Dlg", 14);
QGridLayout * pageLayout = new QGridLayout(this);
pageLayout->setColumnStretch(0, 1);
pageLayout->setColumnStretch(1, 2);
@@ -1087,3 +1081,17 @@
{
leServerMessage->setText(str);
}
+
+/////////////////////////////////////////////////
+
+PageNetType::PageNetType(QWidget* parent) : AbstractPage(parent)
+{
+ QGridLayout * pageLayout = new QGridLayout(this);
+ pageLayout->setRowStretch(0, 10);
+ pageLayout->setRowStretch(2, 10);
+
+ BtnLAN = addButton(tr("LAN game"), pageLayout, 1, 0);
+ BtnOfficialServer = addButton(tr("Official server"), pageLayout, 1, 1);
+
+ BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true);
+}