115 HHNameEdit[i]->setMaxLength(15); |
115 HHNameEdit[i]->setMaxLength(15); |
116 GBHLayout->addWidget(HHNameEdit[i]); |
116 GBHLayout->addWidget(HHNameEdit[i]); |
117 } |
117 } |
118 pageLayout->addWidget(GBoxHedgehogs, 1, 0, 2, 1); |
118 pageLayout->addWidget(GBoxHedgehogs, 1, 0, 2, 1); |
119 |
119 |
120 BtnTeamDiscard = addButton(tr("Discard"), pageLayout, 4, 0); |
120 BtnTeamDiscard = addButton(":/res/Exit.png", pageLayout, 4, 0, true); |
121 |
121 |
122 GBoxBinds = new QGroupBox(this); |
122 GBoxBinds = new QGroupBox(this); |
123 GBoxBinds->setTitle(QGroupBox::tr("Key binds")); |
123 GBoxBinds->setTitle(QGroupBox::tr("Key binds")); |
124 QGridLayout * GBBLayout = new QGridLayout(GBoxBinds); |
124 QGridLayout * GBBLayout = new QGridLayout(GBoxBinds); |
125 BindsBox = new QToolBox(GBoxBinds); |
125 BindsBox = new QToolBox(GBoxBinds); |
243 PageMultiplayer::PageMultiplayer(QWidget* parent) : |
243 PageMultiplayer::PageMultiplayer(QWidget* parent) : |
244 AbstractPage(parent) |
244 AbstractPage(parent) |
245 { |
245 { |
246 QGridLayout * pageLayout = new QGridLayout(this); |
246 QGridLayout * pageLayout = new QGridLayout(this); |
247 |
247 |
248 BtnBack = addButton(tr("Back"), pageLayout, 1, 0); |
248 BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
249 |
249 |
250 gameCFG = new GameCFGWidget(this); |
250 gameCFG = new GameCFGWidget(this); |
251 pageLayout->addWidget(gameCFG, 0, 0, 1, 2); |
251 pageLayout->addWidget(gameCFG, 0, 0, 1, 2); |
252 |
252 |
253 teamsSelect = new TeamSelWidget(this); |
253 teamsSelect = new TeamSelWidget(this); |
329 fpsedit = new FPSEdit(AGGroupBox); |
329 fpsedit = new FPSEdit(AGGroupBox); |
330 GBAfpslayout->addWidget(fpsedit); |
330 GBAfpslayout->addWidget(fpsedit); |
331 |
331 |
332 BtnSaveOptions = addButton(tr("Save"), pageLayout, 4, 2); |
332 BtnSaveOptions = addButton(tr("Save"), pageLayout, 4, 2); |
333 |
333 |
334 BtnBack = addButton(tr("Back"), pageLayout, 4, 0); |
334 BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true); |
335 |
335 |
336 QGroupBox* groupWeapons = new QGroupBox(this); |
336 QGroupBox* groupWeapons = new QGroupBox(this); |
337 groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
337 groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
338 groupWeapons->setTitle(QGroupBox::tr("Weapons")); |
338 groupWeapons->setTitle(QGroupBox::tr("Weapons")); |
339 pageLayout->addWidget(groupWeapons, 1, 0, 1, 3); |
339 pageLayout->addWidget(groupWeapons, 1, 0, 1, 3); |
358 editNetNick->setMaxLength(20); |
358 editNetNick->setMaxLength(20); |
359 editNetNick->setText(QLineEdit::tr("unnamed")); |
359 editNetNick->setText(QLineEdit::tr("unnamed")); |
360 GBNlayout->addWidget(editNetNick, 0, 1); |
360 GBNlayout->addWidget(editNetNick, 0, 1); |
361 } |
361 } |
362 |
362 |
363 PageNet::PageNet(QWidget* parent) : QWidget(parent) |
363 PageNet::PageNet(QWidget* parent) : AbstractPage(parent) |
364 { |
364 { |
365 QFont * font14 = new QFont("MS Shell Dlg", 14); |
365 QFont * font14 = new QFont("MS Shell Dlg", 14); |
366 QGridLayout * pageLayout = new QGridLayout(this); |
366 QGridLayout * pageLayout = new QGridLayout(this); |
367 pageLayout->setColumnStretch(0, 1); |
367 pageLayout->setColumnStretch(0, 1); |
368 pageLayout->setColumnStretch(1, 1); |
368 pageLayout->setColumnStretch(1, 1); |
412 BtnSpecifyServer = new QPushButton(ConnGroupBox); |
412 BtnSpecifyServer = new QPushButton(ConnGroupBox); |
413 BtnSpecifyServer->setFont(*font14); |
413 BtnSpecifyServer->setFont(*font14); |
414 BtnSpecifyServer->setText(QPushButton::tr("Specify")); |
414 BtnSpecifyServer->setText(QPushButton::tr("Specify")); |
415 GBClayout->addWidget(BtnSpecifyServer, 2, 1); |
415 GBClayout->addWidget(BtnSpecifyServer, 2, 1); |
416 |
416 |
417 BtnBack = new QPushButton(this); |
417 BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); |
418 BtnBack->setFont(*font14); |
|
419 BtnBack->setText(QPushButton::tr("Back")); |
|
420 pageLayout->addWidget(BtnBack, 3, 0); |
|
421 |
418 |
422 connect(rbLocalGame, SIGNAL(toggled(bool)), this, SLOT(updateServersList())); |
419 connect(rbLocalGame, SIGNAL(toggled(bool)), this, SLOT(updateServersList())); |
423 connect(BtnNetConnect, SIGNAL(clicked()), this, SLOT(slotConnect())); |
420 connect(BtnNetConnect, SIGNAL(clicked()), this, SLOT(slotConnect())); |
424 } |
421 } |
425 |
422 |
451 quint16 port = model->index(mi.row(), 2).data().toUInt(); |
448 quint16 port = model->index(mi.row(), 2).data().toUInt(); |
452 |
449 |
453 emit connectClicked(host, port); |
450 emit connectClicked(host, port); |
454 } |
451 } |
455 |
452 |
456 PageNetServer::PageNetServer(QWidget* parent) : QWidget(parent) |
453 PageNetServer::PageNetServer(QWidget* parent) : AbstractPage(parent) |
457 { |
454 { |
458 QFont * font14 = new QFont("MS Shell Dlg", 14); |
455 QFont * font14 = new QFont("MS Shell Dlg", 14); |
459 QGridLayout * pageLayout = new QGridLayout(this); |
456 QGridLayout * pageLayout = new QGridLayout(this); |
460 pageLayout->setColumnStretch(0, 1); |
457 pageLayout->setColumnStretch(0, 1); |
461 pageLayout->setColumnStretch(1, 1); |
458 pageLayout->setColumnStretch(1, 1); |
462 pageLayout->setColumnStretch(2, 1); |
459 pageLayout->setColumnStretch(2, 1); |
463 |
460 |
464 pageLayout->setRowStretch(0, 1); |
461 pageLayout->setRowStretch(0, 1); |
465 pageLayout->setRowStretch(1, 0); |
462 pageLayout->setRowStretch(1, 0); |
466 |
463 |
467 BtnBack = new QPushButton(this); |
464 BtnBack =addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
468 BtnBack->setFont(*font14); |
|
469 BtnBack->setText(QPushButton::tr("Back")); |
|
470 pageLayout->addWidget(BtnBack, 1, 0); |
|
471 |
465 |
472 BtnStart = new QPushButton(this); |
466 BtnStart = new QPushButton(this); |
473 BtnStart->setFont(*font14); |
467 BtnStart->setFont(*font14); |
474 BtnStart->setText(QPushButton::tr("Start")); |
468 BtnStart->setText(QPushButton::tr("Start")); |
475 pageLayout->addWidget(BtnStart, 1, 2); |
469 pageLayout->addWidget(BtnStart, 1, 2); |
538 |
532 |
539 pNetTeamsWidget = new TeamSelWidget(this); |
533 pNetTeamsWidget = new TeamSelWidget(this); |
540 pNetTeamsWidget->setAcceptOuter(true); |
534 pNetTeamsWidget->setAcceptOuter(true); |
541 pageLayout->addWidget(pNetTeamsWidget, 0, 1, 2, 1); |
535 pageLayout->addWidget(pNetTeamsWidget, 0, 1, 2, 1); |
542 |
536 |
543 BtnBack = new QPushButton(this); |
537 BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); |
544 BtnBack->setFont(*font14); |
|
545 BtnBack->setText(QPushButton::tr("Back")); |
|
546 pageLayout->addWidget(BtnBack, 2, 0); |
|
547 |
538 |
548 BtnGo = new QPushButton(this); |
539 BtnGo = new QPushButton(this); |
549 BtnGo->setFont(*font14); |
540 BtnGo->setFont(*font14); |
550 BtnGo->setText(QPushButton::tr("Go!")); |
541 BtnGo->setText(QPushButton::tr("Go!")); |
551 BtnGo->setEnabled(false); |
542 BtnGo->setEnabled(false); |
552 pageLayout->addWidget(BtnGo, 2, 1); |
543 pageLayout->addWidget(BtnGo, 2, 1); |
553 } |
544 } |
554 |
545 |
555 PageInfo::PageInfo(QWidget* parent) : QWidget(parent) |
546 PageInfo::PageInfo(QWidget* parent) : AbstractPage(parent) |
556 { |
547 { |
557 QFont * font14 = new QFont("MS Shell Dlg", 14); |
548 QFont * font14 = new QFont("MS Shell Dlg", 14); |
558 QGridLayout * pageLayout = new QGridLayout(this); |
549 QGridLayout * pageLayout = new QGridLayout(this); |
559 pageLayout->setColumnStretch(0, 1); |
550 pageLayout->setColumnStretch(0, 1); |
560 pageLayout->setColumnStretch(1, 1); |
551 pageLayout->setColumnStretch(1, 1); |
561 pageLayout->setColumnStretch(2, 1); |
552 pageLayout->setColumnStretch(2, 1); |
562 |
553 |
563 BtnBack = new QPushButton(this); |
554 BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
564 BtnBack->setFont(*font14); |
|
565 BtnBack->setText(QPushButton::tr("Back")); |
|
566 pageLayout->addWidget(BtnBack, 1, 0); |
|
567 |
555 |
568 about = new About(this); |
556 about = new About(this); |
569 pageLayout->addWidget(about, 0, 0, 1, 3); |
557 pageLayout->addWidget(about, 0, 0, 1, 3); |
570 } |
558 } |
571 |
559 |
572 PageGameStats::PageGameStats(QWidget* parent) : QWidget(parent) |
560 PageGameStats::PageGameStats(QWidget* parent) : AbstractPage(parent) |
573 { |
561 { |
574 QFont * font14 = new QFont("MS Shell Dlg", 14); |
562 QFont * font14 = new QFont("MS Shell Dlg", 14); |
575 QGridLayout * pageLayout = new QGridLayout(this); |
563 QGridLayout * pageLayout = new QGridLayout(this); |
576 pageLayout->setColumnStretch(0, 1); |
564 pageLayout->setColumnStretch(0, 1); |
577 pageLayout->setColumnStretch(1, 1); |
565 pageLayout->setColumnStretch(1, 1); |
578 pageLayout->setColumnStretch(2, 1); |
566 pageLayout->setColumnStretch(2, 1); |
579 |
567 |
580 BtnBack = new QPushButton(this); |
568 BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
581 BtnBack->setFont(*font14); |
|
582 BtnBack->setText(QPushButton::tr("Back")); |
|
583 pageLayout->addWidget(BtnBack, 1, 0); |
|
584 |
569 |
585 labelGameStats = new QLabel(this); |
570 labelGameStats = new QLabel(this); |
586 labelGameStats->setTextFormat(Qt::RichText); |
571 labelGameStats->setTextFormat(Qt::RichText); |
587 pageLayout->addWidget(labelGameStats, 0, 0, 1, 3); |
572 pageLayout->addWidget(labelGameStats, 0, 0, 1, 3); |
588 } |
573 } |
602 BtnTrainPage = addButton(tr("Training"), pageLayout, 2, 1); |
587 BtnTrainPage = addButton(tr("Training"), pageLayout, 2, 1); |
603 BtnMultiplayer = addButton(tr("Multiplayer"), pageLayout, 3, 1); |
588 BtnMultiplayer = addButton(tr("Multiplayer"), pageLayout, 3, 1); |
604 BtnLoad = addButton(tr("Saved games"), pageLayout, 4, 1); |
589 BtnLoad = addButton(tr("Saved games"), pageLayout, 4, 1); |
605 BtnDemos = addButton(tr("Demos"), pageLayout, 5, 1); |
590 BtnDemos = addButton(tr("Demos"), pageLayout, 5, 1); |
606 |
591 |
607 BtnBack = addButton(tr("Back"), pageLayout, 7, 0); |
592 BtnBack = addButton(":/res/Exit.png", pageLayout, 7, 0, true); |
608 } |
593 } |
609 |
594 |
610 PageTraining::PageTraining(QWidget* parent) : QWidget(parent) |
595 PageTraining::PageTraining(QWidget* parent) : AbstractPage(parent) |
611 { |
596 { |
612 QFont * font14 = new QFont("MS Shell Dlg", 14); |
597 QFont * font14 = new QFont("MS Shell Dlg", 14); |
613 QGridLayout * pageLayout = new QGridLayout(this); |
598 QGridLayout * pageLayout = new QGridLayout(this); |
614 pageLayout->setMargin(25); |
599 pageLayout->setMargin(25); |
615 pageLayout->setColumnStretch(0, 1); |
600 pageLayout->setColumnStretch(0, 1); |
619 BtnStartTrain = new QPushButton(this); |
604 BtnStartTrain = new QPushButton(this); |
620 BtnStartTrain->setFont(*font14); |
605 BtnStartTrain->setFont(*font14); |
621 BtnStartTrain->setText(QPushButton::tr("Go!")); |
606 BtnStartTrain->setText(QPushButton::tr("Go!")); |
622 pageLayout->addWidget(BtnStartTrain, 1, 2); |
607 pageLayout->addWidget(BtnStartTrain, 1, 2); |
623 |
608 |
624 BtnBack = new QPushButton(this); |
609 BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true); |
625 BtnBack->setFont(*font14); |
|
626 BtnBack->setText(QPushButton::tr("Back")); |
|
627 pageLayout->addWidget(BtnBack, 1, 0); |
|
628 } |
610 } |
629 |
611 |
630 PageSelectWeapon::PageSelectWeapon(QWidget* parent) : |
612 PageSelectWeapon::PageSelectWeapon(QWidget* parent) : |
631 AbstractPage(parent) |
613 AbstractPage(parent) |
632 { |
614 { |