54 |
54 |
55 PageMain::PageMain(QWidget* parent) : |
55 PageMain::PageMain(QWidget* parent) : |
56 AbstractPage(parent) |
56 AbstractPage(parent) |
57 { |
57 { |
58 QGridLayout * pageLayout = new QGridLayout(this); |
58 QGridLayout * pageLayout = new QGridLayout(this); |
59 //pageLayout->setMargin(25); |
|
60 //pageLayout->setColumnStretch(0, 1); |
59 //pageLayout->setColumnStretch(0, 1); |
61 //pageLayout->setColumnStretch(1, 2); |
60 //pageLayout->setColumnStretch(1, 2); |
62 //pageLayout->setColumnStretch(2, 1); |
61 //pageLayout->setColumnStretch(2, 1); |
63 |
62 |
64 //QPushButton* btnLogo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true); |
63 //QPushButton* btnLogo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true); |
269 pageLayout->addWidget(teamsSelect, 0, 2, 2, 2); |
268 pageLayout->addWidget(teamsSelect, 0, 2, 2, 2); |
270 |
269 |
271 BtnStartMPGame = addButton(tr("Start"), pageLayout, 2, 3); |
270 BtnStartMPGame = addButton(tr("Start"), pageLayout, 2, 3); |
272 } |
271 } |
273 |
272 |
274 PageOptions::PageOptions(QWidget* parent) : |
273 PageOptions::PageOptions(QWidget* parent) : |
275 AbstractPage(parent) |
274 AbstractPage(parent) |
276 { |
275 { |
277 QGridLayout * pageLayout = new QGridLayout(this); |
276 QGridLayout * pageLayout = new QGridLayout(this); |
278 pageLayout->setColumnStretch(0, 100); |
277 pageLayout->setColumnStretch(0, 100); |
279 pageLayout->setColumnStretch(1, 100); |
278 pageLayout->setColumnStretch(1, 100); |
540 { |
539 { |
541 QFont * font14 = new QFont("MS Shell Dlg", 14); |
540 QFont * font14 = new QFont("MS Shell Dlg", 14); |
542 QGridLayout * pageLayout = new QGridLayout(this); |
541 QGridLayout * pageLayout = new QGridLayout(this); |
543 pageLayout->setSizeConstraint(QLayout::SetMinimumSize); |
542 pageLayout->setSizeConstraint(QLayout::SetMinimumSize); |
544 //pageLayout->setSpacing(1); |
543 //pageLayout->setSpacing(1); |
545 //pageLayout->setMargin(1); |
|
546 pageLayout->setColumnStretch(0, 50); |
544 pageLayout->setColumnStretch(0, 50); |
547 pageLayout->setColumnStretch(1, 50); |
545 pageLayout->setColumnStretch(1, 50); |
548 |
546 |
549 // chatwidget |
547 // chatwidget |
550 pChatWidget = new HWChatWidget(this); |
548 pChatWidget = new HWChatWidget(this); |
598 |
596 |
599 PageSinglePlayer::PageSinglePlayer(QWidget* parent) : AbstractPage(parent) |
597 PageSinglePlayer::PageSinglePlayer(QWidget* parent) : AbstractPage(parent) |
600 { |
598 { |
601 QFont * font14 = new QFont("MS Shell Dlg", 14); |
599 QFont * font14 = new QFont("MS Shell Dlg", 14); |
602 QGridLayout * pageLayout = new QGridLayout(this); |
600 QGridLayout * pageLayout = new QGridLayout(this); |
603 pageLayout->setMargin(25); |
|
604 pageLayout->setColumnStretch(0, 1); |
601 pageLayout->setColumnStretch(0, 1); |
605 pageLayout->setColumnStretch(1, 2); |
602 pageLayout->setColumnStretch(1, 2); |
606 pageLayout->setColumnStretch(2, 1); |
603 pageLayout->setColumnStretch(2, 1); |
607 pageLayout->setRowStretch(0, 1); |
604 pageLayout->setRowStretch(0, 1); |
608 pageLayout->setRowStretch(6, 1); |
605 pageLayout->setRowStretch(6, 1); |
618 |
615 |
619 PageTraining::PageTraining(QWidget* parent) : AbstractPage(parent) |
616 PageTraining::PageTraining(QWidget* parent) : AbstractPage(parent) |
620 { |
617 { |
621 QFont * font14 = new QFont("MS Shell Dlg", 14); |
618 QFont * font14 = new QFont("MS Shell Dlg", 14); |
622 QGridLayout * pageLayout = new QGridLayout(this); |
619 QGridLayout * pageLayout = new QGridLayout(this); |
623 pageLayout->setMargin(25); |
|
624 pageLayout->setColumnStretch(0, 1); |
620 pageLayout->setColumnStretch(0, 1); |
625 pageLayout->setColumnStretch(1, 2); |
621 pageLayout->setColumnStretch(1, 2); |
626 pageLayout->setColumnStretch(2, 1); |
622 pageLayout->setColumnStretch(2, 1); |
627 |
623 |
628 BtnStartTrain = new QPushButton(this); |
624 BtnStartTrain = new QPushButton(this); |
635 |
631 |
636 PageSelectWeapon::PageSelectWeapon(QWidget* parent) : |
632 PageSelectWeapon::PageSelectWeapon(QWidget* parent) : |
637 AbstractPage(parent) |
633 AbstractPage(parent) |
638 { |
634 { |
639 QGridLayout * pageLayout = new QGridLayout(this); |
635 QGridLayout * pageLayout = new QGridLayout(this); |
640 pageLayout->setMargin(25); |
|
641 |
636 |
642 pWeapons = new SelWeaponWidget(cDefaultAmmoStore->size() - 10, this); |
637 pWeapons = new SelWeaponWidget(cDefaultAmmoStore->size() - 10, this); |
643 pageLayout->addWidget(pWeapons, 0, 0, 1, 4); |
638 pageLayout->addWidget(pWeapons, 0, 0, 1, 4); |
644 |
639 |
645 BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
640 BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
646 BtnDefault = addButton(tr("Default"), pageLayout, 1, 1); |
641 BtnDefault = addButton(tr("Default"), pageLayout, 1, 1); |
647 BtnDelete = addButton(tr("Delete"), pageLayout, 1, 2); |
642 BtnDelete = addButton(tr("Delete"), pageLayout, 1, 2); |
648 BtnSave = addButton(":/res/Save.png", pageLayout, 1, 3, true); |
643 BtnSave = addButton(":/res/Save.png", pageLayout, 1, 3, true); |
649 } |
644 } |
650 |
645 |
651 PageInGame::PageInGame(QWidget* parent) : |
646 PageInGame::PageInGame(QWidget* parent) : |
652 AbstractPage(parent) |
647 AbstractPage(parent) |
653 { |
648 { |
654 QLabel * label = new QLabel(this); |
649 QLabel * label = new QLabel(this); |
655 label->setText("In game..."); |
650 label->setText("In game..."); |
656 } |
651 } |