21 |
21 |
22 #include "pagemultiplayer.h" |
22 #include "pagemultiplayer.h" |
23 #include "gamecfgwidget.h" |
23 #include "gamecfgwidget.h" |
24 #include "teamselect.h" |
24 #include "teamselect.h" |
25 |
25 |
26 PageMultiplayer::PageMultiplayer(QWidget* parent) : |
26 QLayout * PageMultiplayer::bodyLayoutDefinition() |
27 AbstractPage(parent) |
|
28 { |
27 { |
29 QGridLayout * pageLayout = new QGridLayout(this); |
28 QGridLayout * pageLayout = new QGridLayout(); |
30 |
29 |
31 gameCFG = new GameCFGWidget(this); |
30 gameCFG = new GameCFGWidget(this); |
32 pageLayout->addWidget(gameCFG, 0, 0, 1, 2); |
31 pageLayout->addWidget(gameCFG, 0, 0, 1, 2); |
33 |
32 |
34 QPushButton * btnSetup = new QPushButton(this); |
33 btnSetup = new QPushButton(this); |
35 btnSetup->setText(QPushButton::tr("Setup")); |
34 btnSetup->setText(QPushButton::tr("Setup")); |
36 connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked())); |
|
37 pageLayout->addWidget(btnSetup, 1, 0, 1, 2); |
35 pageLayout->addWidget(btnSetup, 1, 0, 1, 2); |
38 |
36 |
39 pageLayout->setRowStretch(2, 1); |
37 pageLayout->setRowStretch(2, 1); |
40 |
38 |
41 teamsSelect = new TeamSelWidget(this); |
39 teamsSelect = new TeamSelWidget(this); |
42 pageLayout->addWidget(teamsSelect, 0, 2, 3, 2); |
40 pageLayout->addWidget(teamsSelect, 0, 2, 3, 2); |
43 |
41 |
44 BtnStartMPGame = addButton(tr("Start"), pageLayout, 3, 3); |
42 BtnStartMPGame = addButton(tr("Start"), pageLayout, 3, 3); |
45 |
43 |
|
44 return pageLayout; |
|
45 } |
46 |
46 |
47 BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); |
47 void PageMultiplayer::connectSignals() |
48 connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack())); |
48 { |
|
49 PageMultiplayer::connect(btnSetup, SIGNAL(clicked()), this, SIGNAL(SetupClicked())); |
49 } |
50 } |
|
51 |
|
52 PageMultiplayer::PageMultiplayer(QWidget* parent) : AbstractPage(parent) |
|
53 { |
|
54 initPage(); |
|
55 } |