24 #include "pagecampaign.h" |
24 #include "pagecampaign.h" |
25 |
25 |
26 QLayout * PageCampaign::bodyLayoutDefinition() |
26 QLayout * PageCampaign::bodyLayoutDefinition() |
27 { |
27 { |
28 QGridLayout * pageLayout = new QGridLayout(); |
28 QGridLayout * pageLayout = new QGridLayout(); |
29 pageLayout->setColumnStretch(0, 1); |
29 pageLayout->setColumnStretch(0, 5); |
30 pageLayout->setColumnStretch(1, 2); |
30 pageLayout->setColumnStretch(1, 1); |
31 pageLayout->setColumnStretch(2, 1); |
31 pageLayout->setColumnStretch(2, 9); |
|
32 pageLayout->setColumnStretch(3, 5); |
32 pageLayout->setRowStretch(0, 1); |
33 pageLayout->setRowStretch(0, 1); |
33 pageLayout->setRowStretch(3, 1); |
34 pageLayout->setRowStretch(3, 1); |
34 |
35 |
35 QGridLayout * infoLayout = new QGridLayout(); |
36 QGridLayout * infoLayout = new QGridLayout(); |
36 infoLayout->setColumnStretch(0, 1); |
37 infoLayout->setColumnStretch(0, 1); |
50 lbldescription->setWordWrap(true); |
51 lbldescription->setWordWrap(true); |
51 |
52 |
52 lbltitle = new QLabel(); |
53 lbltitle = new QLabel(); |
53 lbltitle->setAlignment(Qt::AlignHCenter | Qt::AlignBottom); |
54 lbltitle->setAlignment(Qt::AlignHCenter | Qt::AlignBottom); |
54 |
55 |
|
56 QLabel* lblteam = new QLabel(tr("Team:")); |
|
57 QLabel* lblcampaign = new QLabel(tr("Campaign:")); |
|
58 QLabel* lblmission = new QLabel(tr("Mission:")); |
|
59 |
55 CBTeam = new QComboBox(this); |
60 CBTeam = new QComboBox(this); |
56 CBMission = new QComboBox(this); |
61 CBMission = new QComboBox(this); |
57 CBCampaign = new QComboBox(this); |
62 CBCampaign = new QComboBox(this); |
58 CBTeam->setMaxVisibleItems(30); |
63 CBTeam->setMaxVisibleItems(30); |
59 CBMission->setMaxVisibleItems(30); |
64 CBMission->setMaxVisibleItems(30); |
61 |
66 |
62 infoLayout->addWidget(btnPreview,0,1,2,1); |
67 infoLayout->addWidget(btnPreview,0,1,2,1); |
63 infoLayout->addWidget(lbltitle,0,2,1,2); |
68 infoLayout->addWidget(lbltitle,0,2,1,2); |
64 infoLayout->addWidget(lbldescription,1,2,1,2); |
69 infoLayout->addWidget(lbldescription,1,2,1,2); |
65 |
70 |
66 pageLayout->addLayout(infoLayout, 0, 0, 2, 3); |
71 pageLayout->addLayout(infoLayout, 0, 0, 2, 4); |
67 pageLayout->addWidget(CBTeam, 2, 1); |
72 pageLayout->addWidget(lblteam, 2, 1); |
68 pageLayout->addWidget(CBCampaign, 3, 1); |
73 pageLayout->addWidget(lblcampaign, 3, 1); |
69 pageLayout->addWidget(CBMission, 4, 1); |
74 pageLayout->addWidget(lblmission, 4, 1); |
|
75 pageLayout->addWidget(CBTeam, 2, 2); |
|
76 pageLayout->addWidget(CBCampaign, 3, 2); |
|
77 pageLayout->addWidget(CBMission, 4, 2); |
70 |
78 |
71 BtnStartCampaign = new QPushButton(this); |
|
72 BtnStartCampaign->setFont(*font14); |
|
73 BtnStartCampaign->setText(QPushButton::tr("Go!")); |
|
74 pageLayout->addWidget(BtnStartCampaign, 3, 2); |
|
75 |
79 |
76 return pageLayout; |
80 return pageLayout; |
|
81 } |
|
82 |
|
83 QLayout * PageCampaign::footerLayoutDefinition() |
|
84 { |
|
85 QHBoxLayout * footerLayout = new QHBoxLayout(); |
|
86 |
|
87 const QIcon& lp = QIcon(":/res/Start.png"); |
|
88 QSize sz = lp.actualSize(QSize(65535, 65535)); |
|
89 BtnStartCampaign = new QPushButton(); |
|
90 BtnStartCampaign->setText(QPushButton::tr("Start")); |
|
91 BtnStartCampaign->setMinimumWidth(sz.width() + 60); |
|
92 BtnStartCampaign->setIcon(lp); |
|
93 BtnStartCampaign->setFixedHeight(50); |
|
94 BtnStartCampaign->setIconSize(sz); |
|
95 BtnStartCampaign->setFlat(true); |
|
96 BtnStartCampaign->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); |
|
97 |
|
98 footerLayout->addStretch(); |
|
99 footerLayout->addWidget(BtnStartCampaign); |
|
100 |
|
101 return footerLayout; |
77 } |
102 } |
78 |
103 |
79 PageCampaign::PageCampaign(QWidget* parent) : AbstractPage(parent) |
104 PageCampaign::PageCampaign(QWidget* parent) : AbstractPage(parent) |
80 { |
105 { |
81 initPage(); |
106 initPage(); |