QTfrontend/ui/page/pagenet.cpp
changeset 6171 8627698134b6
parent 6060 fdfc01419815
child 6700 e04da46ee43c
--- a/QTfrontend/ui/page/pagenet.cpp	Fri Oct 21 18:53:36 2011 +0200
+++ b/QTfrontend/ui/page/pagenet.cpp	Fri Oct 21 19:17:08 2011 +0200
@@ -17,6 +17,7 @@
  */
 
 #include <QGridLayout>
+#include <QHBoxLayout>
 #include <QPushButton>
 #include <QGroupBox>
 #include <QTableView>
@@ -35,12 +36,6 @@
     pageLayout->setColumnStretch(1, 1);
     pageLayout->setColumnStretch(2, 1);
 
-    BtnNetSvrStart = new QPushButton(this);
-    BtnNetSvrStart->setFont(*font14);
-    BtnNetSvrStart->setText(QPushButton::tr("Start server"));
-    BtnNetSvrStart->setVisible(haveServer);
-    pageLayout->addWidget(BtnNetSvrStart, 4, 2);
-
     ConnGroupBox = new QGroupBox(this);
     ConnGroupBox->setTitle(QGroupBox::tr("Net game"));
     pageLayout->addWidget(ConnGroupBox, 2, 0, 1, 3);
@@ -71,6 +66,20 @@
     return pageLayout;
 }
 
+QLayout * PageNet::footerLayoutDefinition()
+{
+    QHBoxLayout * footerLayout = new QHBoxLayout();
+
+    BtnNetSvrStart = formattedButton(QPushButton::tr("Start server"));
+    BtnNetSvrStart->setMinimumWidth(180);
+    BtnNetSvrStart->setVisible(haveServer);
+
+    footerLayout->addStretch();
+    footerLayout->addWidget(BtnNetSvrStart);
+
+    return footerLayout;
+}
+
 void PageNet::connectSignals()
 {
     connect(BtnNetConnect, SIGNAL(clicked()), this, SLOT(slotConnect()));