QTfrontend/pagemultiplayer.cpp
changeset 6042 8b5345758f62
parent 6009 14f6fc9869f2
--- a/QTfrontend/pagemultiplayer.cpp	Mon Sep 26 21:45:33 2011 +0400
+++ b/QTfrontend/pagemultiplayer.cpp	Tue Sep 27 00:38:39 2011 +0200
@@ -23,17 +23,15 @@
 #include "gamecfgwidget.h"
 #include "teamselect.h"
 
-PageMultiplayer::PageMultiplayer(QWidget* parent) :
-  AbstractPage(parent)
+QLayout * PageMultiplayer::bodyLayoutDefinition()
 {
-    QGridLayout * pageLayout = new QGridLayout(this);
+    QGridLayout * pageLayout = new QGridLayout();
 
     gameCFG = new GameCFGWidget(this);
     pageLayout->addWidget(gameCFG, 0, 0, 1, 2);
 
-    QPushButton * btnSetup = new QPushButton(this);
+    btnSetup = new QPushButton(this);
     btnSetup->setText(QPushButton::tr("Setup"));
-    connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked()));
     pageLayout->addWidget(btnSetup, 1, 0, 1, 2);
 
     pageLayout->setRowStretch(2, 1);
@@ -43,7 +41,15 @@
 
     BtnStartMPGame = addButton(tr("Start"), pageLayout, 3, 3);
 
+    return pageLayout;
+}
 
-    BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true);
-    connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
+void PageMultiplayer::connectSignals()
+{
+    PageMultiplayer::connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked()));
 }
+
+PageMultiplayer::PageMultiplayer(QWidget* parent) : AbstractPage(parent)
+{
+    initPage();
+}