QTfrontend/pages.cpp
changeset 586 ecb6347dfeca
parent 585 7531ae5b146e
child 587 74db4115064a
equal deleted inserted replaced
585:7531ae5b146e 586:ecb6347dfeca
    55 
    55 
    56 	BtnSinglePlayer = new QPushButton(this);
    56 	BtnSinglePlayer = new QPushButton(this);
    57 	BtnSinglePlayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    57 	BtnSinglePlayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    58 	BtnSinglePlayer->setFont(*font14);
    58 	BtnSinglePlayer->setFont(*font14);
    59 	BtnSinglePlayer->setText(QPushButton::tr("Single Player"));
    59 	BtnSinglePlayer->setText(QPushButton::tr("Single Player"));
    60 	pageLayout->addWidget(BtnSinglePlayer, 1, 1);
    60 	pageLayout->addWidget(BtnSinglePlayer, 0, 1);
    61 
    61 
    62 	BtnMultiplayer = new QPushButton(this);
    62 	BtnMultiplayer = new QPushButton(this);
    63 	BtnMultiplayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    63 	BtnMultiplayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    64 	BtnMultiplayer->setFont(*font14);
    64 	BtnMultiplayer->setFont(*font14);
    65 	BtnMultiplayer->setText(QPushButton::tr("Multiplayer"));
    65 	BtnMultiplayer->setText(QPushButton::tr("Multiplayer"));
    66 	pageLayout->addWidget(BtnMultiplayer, 2, 1);
    66 	pageLayout->addWidget(BtnMultiplayer, 1, 1);
    67 
    67 
    68 	BtnNet = new QPushButton(this);
    68 	BtnNet = new QPushButton(this);
    69 	BtnNet->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    69 	BtnNet->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    70 	BtnNet->setFont(*font14);
    70 	BtnNet->setFont(*font14);
    71 	BtnNet->setText(QPushButton::tr("Net game"));
    71 	BtnNet->setText(QPushButton::tr("Net game"));
    72 	pageLayout->addWidget(BtnNet, 3, 1);
    72 	pageLayout->addWidget(BtnNet, 2, 1);
    73 
    73 
    74 	BtnLoad = new QPushButton(this);
    74 	BtnLoad = new QPushButton(this);
    75 	BtnLoad->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    75 	BtnLoad->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    76 	BtnLoad->setFont(*font14);
    76 	BtnLoad->setFont(*font14);
    77 	BtnLoad->setText(QPushButton::tr("Load"));
    77 	BtnLoad->setText(QPushButton::tr("Load"));
    78 	pageLayout->addWidget(BtnLoad, 4, 1);
    78 	pageLayout->addWidget(BtnLoad, 3, 1);
    79 
    79 
    80 	BtnDemos = new QPushButton(this);
    80 	BtnDemos = new QPushButton(this);
    81 	BtnDemos->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    81 	BtnDemos->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    82 	BtnDemos->setFont(*font14);
    82 	BtnDemos->setFont(*font14);
    83 	BtnDemos->setText(QPushButton::tr("Demos"));
    83 	BtnDemos->setText(QPushButton::tr("Demos"));
    84 	pageLayout->addWidget(BtnDemos, 5, 1);
    84 	pageLayout->addWidget(BtnDemos, 4, 1);
    85 
    85 
    86 	BtnSetup = new QPushButton(this);
    86 	BtnSetup = new QPushButton(this);
    87 	BtnSetup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    87 	BtnSetup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    88 	BtnSetup->setFont(*font14);
    88 	BtnSetup->setFont(*font14);
    89 	BtnSetup->setText(QPushButton::tr("Setup"));
    89 	BtnSetup->setText(QPushButton::tr("Setup"));
    90 	pageLayout->addWidget(BtnSetup, 6, 1);
    90 	pageLayout->addWidget(BtnSetup, 5, 1);
    91 
    91 
    92 	BtnInfo = new QPushButton(this);
    92 	BtnInfo = new QPushButton(this);
    93 	BtnInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    93 	BtnInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    94 	BtnInfo->setFont(*font14);
    94 	BtnInfo->setFont(*font14);
    95 	BtnInfo->setText(QPushButton::tr("About"));
    95 	BtnInfo->setText(QPushButton::tr("About"));
    96 	pageLayout->addWidget(BtnInfo, 7, 1);
    96 	pageLayout->addWidget(BtnInfo, 6, 1);
    97 
    97 
    98 	BtnExit = new QPushButton(parent);
    98 	BtnExit = new QPushButton(parent);
    99 	BtnExit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    99 	BtnExit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
   100 	BtnExit->setFont(*font14);
   100 	BtnExit->setFont(*font14);
   101 	BtnExit->setText(QPushButton::tr("Exit"));
   101 	BtnExit->setText(QPushButton::tr("Exit"));
   114 	BtnBack = new QPushButton(this);
   114 	BtnBack = new QPushButton(this);
   115 	BtnBack->setFont(*font14);
   115 	BtnBack->setFont(*font14);
   116 	BtnBack->setText(QPushButton::tr("Back"));
   116 	BtnBack->setText(QPushButton::tr("Back"));
   117 	bottomLayout->addWidget(BtnBack, 100);
   117 	bottomLayout->addWidget(BtnBack, 100);
   118 	bottomLayout->addStretch(100);
   118 	bottomLayout->addStretch(100);
   119 	BtnSimpleGame = new	QPushButton(this);
   119 	BtnSimpleGame = new QPushButton(this);
   120 	BtnSimpleGame->setFont(*font14);
   120 	BtnSimpleGame->setFont(*font14);
   121 	BtnSimpleGame->setText(QPushButton::tr("Simple Game"));
   121 	BtnSimpleGame->setText(QPushButton::tr("Simple Game"));
   122 	bottomLayout->addWidget(BtnSimpleGame, 100);
   122 	bottomLayout->addWidget(BtnSimpleGame, 100);
   123 
   123 
   124 	gameCFG = new GameCFGWidget(this);
   124 	gameCFG = new GameCFGWidget(this);
   528 
   528 
   529 	labelGameStats = new QLabel(this);
   529 	labelGameStats = new QLabel(this);
   530 	labelGameStats->setTextFormat(Qt::RichText);
   530 	labelGameStats->setTextFormat(Qt::RichText);
   531 	pageLayout->addWidget(labelGameStats, 0, 0, 1, 3);
   531 	pageLayout->addWidget(labelGameStats, 0, 0, 1, 3);
   532 }
   532 }
       
   533 
       
   534 PageSinglePlayer::PageSinglePlayer(QWidget* parent) : QWidget(parent)
       
   535 {
       
   536 	QFont * font14 = new QFont("MS Shell Dlg", 14);
       
   537 	QGridLayout * pageLayout = new QGridLayout(this);
       
   538 	pageLayout->setMargin(25);
       
   539 	pageLayout->setColumnStretch(0, 1);
       
   540 	pageLayout->setColumnStretch(1, 2);
       
   541 	pageLayout->setColumnStretch(2, 1);
       
   542 
       
   543 	BtnSimpleGamePage = new QPushButton(this);
       
   544 	BtnSimpleGamePage->setFont(*font14);
       
   545 	BtnSimpleGamePage->setText(QPushButton::tr("Simple Game"));
       
   546 	pageLayout->addWidget(BtnSimpleGamePage, 0, 1);
       
   547 
       
   548 	BtnTrainPage = new QPushButton(this);
       
   549 	BtnTrainPage->setFont(*font14);
       
   550 	BtnTrainPage->setText(QPushButton::tr("Training"));
       
   551 	pageLayout->addWidget(BtnTrainPage, 1, 1);
       
   552 
       
   553 	BtnBack = new QPushButton(this);
       
   554 	BtnBack->setFont(*font14);
       
   555 	BtnBack->setText(QPushButton::tr("Back"));
       
   556 	pageLayout->addWidget(BtnBack, 3, 1);
       
   557 
       
   558 }
       
   559