QTfrontend/ui_hwform.cpp
changeset 2515 51d3f4b6293a
parent 1950 09ad18a1be11
child 2516 effafd586a4e
equal deleted inserted replaced
2514:df9d0728c5bb 2515:51d3f4b6293a
    20 #include <QGridLayout>
    20 #include <QGridLayout>
    21 #include <QMainWindow>
    21 #include <QMainWindow>
    22 #include <QStackedLayout>
    22 #include <QStackedLayout>
    23 
    23 
    24 #include "ui_hwform.h"
    24 #include "ui_hwform.h"
       
    25 #include "hwform.h"
    25 #include "pages.h"
    26 #include "pages.h"
    26 #include "statsPage.h"
    27 #include "statsPage.h"
    27 #include "playrecordpage.h"
    28 #include "playrecordpage.h"
    28 #include "hwconsts.h"
    29 #include "hwconsts.h"
    29 
    30 
    30 void Ui_HWForm::setupUi(QMainWindow *HWForm)
    31 void Ui_HWForm::setupUi(HWForm *HWForm)
    31 {
    32 {
    32 	SetupFonts();
    33 	SetupFonts();
    33 
    34 
    34 	HWForm->setObjectName(QString::fromUtf8("HWForm"));
    35 	HWForm->setObjectName(QString::fromUtf8("HWForm"));
    35 	HWForm->resize(QSize(640, 480).expandedTo(HWForm->minimumSizeHint()));
    36 	HWForm->resize(QSize(640, 480).expandedTo(HWForm->minimumSizeHint()));
    36 	HWForm->setMinimumSize(QSize(720, 450));
    37 	HWForm->setMinimumSize(QSize(720, 450));
    37 	HWForm->setWindowTitle(QMainWindow::tr("Hedgewars %1").arg(*cVersionString));
    38 	HWForm->setWindowTitle(QMainWindow::tr("Hedgewars %1").arg(*cVersionString));
    38 	centralWidget = new QWidget(HWForm);
    39 	centralWidget = new QWidget(HWForm);
    39 	centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
    40 	centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
    40 
    41 
    41 	SetupPages(centralWidget);
    42 	SetupPages(centralWidget, HWForm);
    42 
    43 
    43 	HWForm->setCentralWidget(centralWidget);
    44 	HWForm->setCentralWidget(centralWidget);
    44 
    45 
    45 	Pages->setCurrentIndex(0);
    46 	Pages->setCurrentIndex(0);
    46 
    47 
    50 void Ui_HWForm::SetupFonts()
    51 void Ui_HWForm::SetupFonts()
    51 {
    52 {
    52 	font14 = new QFont("MS Shell Dlg", 14);
    53 	font14 = new QFont("MS Shell Dlg", 14);
    53 }
    54 }
    54 
    55 
    55 void Ui_HWForm::SetupPages(QWidget *Parent)
    56 void Ui_HWForm::SetupPages(QWidget *Parent, HWForm *HWForm)
    56 {
    57 {
    57 	Pages = new QStackedLayout(Parent);
    58 	Pages = new QStackedLayout(Parent);
    58 
    59 
    59 	pageEditTeam = new PageEditTeam();
    60 	pageEditTeam = new PageEditTeam(Parent, HWForm->sdli);
    60 	Pages->addWidget(pageEditTeam);
    61 	Pages->addWidget(pageEditTeam);
    61 
    62 
    62 	pageOptions = new PageOptions();
    63 	pageOptions = new PageOptions();
    63 	Pages->addWidget(pageOptions);
    64 	Pages->addWidget(pageOptions);
    64 
    65