QTfrontend/ui/page/pagecampaign.cpp
changeset 11953 c8457c7f10f4
parent 11674 d59b6f289e30
child 11979 188dc80fafa5
--- a/QTfrontend/ui/page/pagecampaign.cpp	Sun Nov 20 00:12:07 2016 +0100
+++ b/QTfrontend/ui/page/pagecampaign.cpp	Wed May 04 04:07:12 2016 +0200
@@ -26,9 +26,10 @@
 QLayout * PageCampaign::bodyLayoutDefinition()
 {
     QGridLayout * pageLayout = new QGridLayout();
-    pageLayout->setColumnStretch(0, 1);
-    pageLayout->setColumnStretch(1, 2);
-    pageLayout->setColumnStretch(2, 1);
+    pageLayout->setColumnStretch(0, 5);
+    pageLayout->setColumnStretch(1, 1);
+    pageLayout->setColumnStretch(2, 9);
+    pageLayout->setColumnStretch(3, 5);
     pageLayout->setRowStretch(0, 1);
     pageLayout->setRowStretch(3, 1);
 
@@ -52,6 +53,10 @@
     lbltitle = new QLabel();
     lbltitle->setAlignment(Qt::AlignHCenter | Qt::AlignBottom);
 
+    QLabel* lblteam = new QLabel(tr("Team:"));
+    QLabel* lblcampaign = new QLabel(tr("Campaign:"));
+    QLabel* lblmission = new QLabel(tr("Mission:"));
+
     CBTeam = new QComboBox(this);
     CBMission = new QComboBox(this);
     CBCampaign = new QComboBox(this);
@@ -63,19 +68,39 @@
     infoLayout->addWidget(lbltitle,0,2,1,2);
     infoLayout->addWidget(lbldescription,1,2,1,2);
 
-    pageLayout->addLayout(infoLayout, 0, 0, 2, 3);
-    pageLayout->addWidget(CBTeam, 2, 1);
-    pageLayout->addWidget(CBCampaign, 3, 1);
-    pageLayout->addWidget(CBMission, 4, 1);
+    pageLayout->addLayout(infoLayout, 0, 0, 2, 4);
+    pageLayout->addWidget(lblteam, 2, 1);
+    pageLayout->addWidget(lblcampaign, 3, 1);
+    pageLayout->addWidget(lblmission, 4, 1);
+    pageLayout->addWidget(CBTeam, 2, 2);
+    pageLayout->addWidget(CBCampaign, 3, 2);
+    pageLayout->addWidget(CBMission, 4, 2);
 
-    BtnStartCampaign = new QPushButton(this);
-    BtnStartCampaign->setFont(*font14);
-    BtnStartCampaign->setText(QPushButton::tr("Go!"));
-    pageLayout->addWidget(BtnStartCampaign, 3, 2);
 
     return pageLayout;
 }
 
+QLayout * PageCampaign::footerLayoutDefinition()
+{
+    QHBoxLayout * footerLayout = new QHBoxLayout();
+
+    const QIcon& lp = QIcon(":/res/Start.png");
+    QSize sz = lp.actualSize(QSize(65535, 65535));
+    BtnStartCampaign = new QPushButton();
+    BtnStartCampaign->setText(QPushButton::tr("Start"));
+    BtnStartCampaign->setMinimumWidth(sz.width() + 60);
+    BtnStartCampaign->setIcon(lp);
+    BtnStartCampaign->setFixedHeight(50);
+    BtnStartCampaign->setIconSize(sz);
+    BtnStartCampaign->setFlat(true);
+    BtnStartCampaign->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+
+    footerLayout->addStretch();
+    footerLayout->addWidget(BtnStartCampaign);
+
+    return footerLayout;
+}
+
 PageCampaign::PageCampaign(QWidget* parent) : AbstractPage(parent)
 {
     initPage();