QTfrontend/ui/page/pagecampaign.cpp
changeset 9219 0a4b6bb69f99
parent 9182 f92e205bc167
child 9306 c9978ada9a3d
--- a/QTfrontend/ui/page/pagecampaign.cpp	Wed Jun 12 19:30:44 2013 +0200
+++ b/QTfrontend/ui/page/pagecampaign.cpp	Thu Jun 13 14:44:28 2013 +0200
@@ -19,6 +19,7 @@
 #include <QGridLayout>
 #include <QPushButton>
 #include <QComboBox>
+#include <QLabel>
 
 #include "pagecampaign.h"
 
@@ -31,18 +32,43 @@
     pageLayout->setRowStretch(0, 1);
     pageLayout->setRowStretch(3, 1);
 
+    QGridLayout * infoLayout = new QGridLayout();
+    infoLayout->setColumnStretch(0, 1);
+    infoLayout->setColumnStretch(1, 1);
+    infoLayout->setColumnStretch(2, 1);
+    infoLayout->setColumnStretch(3, 1);
+    infoLayout->setColumnStretch(4, 1);
+    infoLayout->setRowStretch(0, 1);
+    infoLayout->setRowStretch(1, 1);
+
+    // set this as default image first time page is created, this will change in hwform.cpp
+    btnPreview = formattedButton(":/res/campaign/A Classic Fairytale/first_blood.png", true);
+    infoLayout->setAlignment(btnPreview, Qt::AlignHCenter | Qt::AlignVCenter);
+
+    lbldescription = new QLabel();
+    lbldescription->setAlignment(Qt::AlignHCenter| Qt::AlignTop);
+    lbldescription->setWordWrap(true);
+
+    lbltitle = new QLabel();
+    lbltitle->setAlignment(Qt::AlignHCenter | Qt::AlignBottom);
+
     CBTeam = new QComboBox(this);
     CBMission = new QComboBox(this);
     CBCampaign = new QComboBox(this);
 
-    pageLayout->addWidget(CBTeam, 1, 1);
-    pageLayout->addWidget(CBCampaign, 2, 1);
-    pageLayout->addWidget(CBMission, 3, 1);
+    infoLayout->addWidget(btnPreview,0,1,2,1);
+    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);
 
     BtnStartCampaign = new QPushButton(this);
     BtnStartCampaign->setFont(*font14);
     BtnStartCampaign->setText(QPushButton::tr("Go!"));
-    pageLayout->addWidget(BtnStartCampaign, 2, 2);
+    pageLayout->addWidget(BtnStartCampaign, 3, 2);
 
     return pageLayout;
 }