846 |
849 |
847 PageScheme::PageScheme(QWidget* parent) : |
850 PageScheme::PageScheme(QWidget* parent) : |
848 AbstractPage(parent) |
851 AbstractPage(parent) |
849 { |
852 { |
850 QGridLayout * pageLayout = new QGridLayout(this); |
853 QGridLayout * pageLayout = new QGridLayout(this); |
851 } |
854 |
|
855 CB_mode_Forts = new QCheckBox(this); |
|
856 CB_mode_Forts->setText(QCheckBox::tr("Forts mode")); |
|
857 pageLayout->addWidget(CB_mode_Forts, 0, 0, 1, 2); |
|
858 |
|
859 CB_teamsDivide = new QCheckBox(this); |
|
860 CB_teamsDivide->setText(QCheckBox::tr("Divide teams")); |
|
861 pageLayout->addWidget(CB_teamsDivide, 1, 0, 1, 2); |
|
862 |
|
863 CB_solid = new QCheckBox(this); |
|
864 CB_solid->setText(QCheckBox::tr("Solid land")); |
|
865 pageLayout->addWidget(CB_solid, 2, 0, 1, 2); |
|
866 |
|
867 CB_border = new QCheckBox(this); |
|
868 CB_border->setText(QCheckBox::tr("Add Border")); |
|
869 pageLayout->addWidget(CB_border, 3, 0, 1, 2); |
|
870 |
|
871 SB_TurnTime = new QSpinBox(this); |
|
872 SB_TurnTime->setRange(1, 99); |
|
873 SB_TurnTime->setValue(45); |
|
874 SB_TurnTime->setSingleStep(15); |
|
875 |
|
876 SB_InitHealth = new QSpinBox(this); |
|
877 SB_InitHealth->setRange(50, 200); |
|
878 SB_InitHealth->setValue(100); |
|
879 SB_InitHealth->setSingleStep(25); |
|
880 |
|
881 SB_SuddenDeath = new QSpinBox(this); |
|
882 SB_SuddenDeath->setRange(0, 50); |
|
883 SB_SuddenDeath->setValue(15); |
|
884 SB_SuddenDeath->setSingleStep(3); |
|
885 |
|
886 SB_CaseProb = new FreqSpinBox(this); |
|
887 SB_CaseProb->setRange(0, 9); |
|
888 SB_CaseProb->setValue(5); |
|
889 |
|
890 LE_name = new QLineEdit(this); |
|
891 |
|
892 pageLayout->addWidget(SB_TurnTime, 4, 1); |
|
893 pageLayout->addWidget(SB_InitHealth, 5, 1); |
|
894 pageLayout->addWidget(SB_SuddenDeath, 6, 1); |
|
895 pageLayout->addWidget(SB_CaseProb, 7, 1); |
|
896 pageLayout->addWidget(LE_name, 8, 1); |
|
897 |
|
898 mapper = new QDataWidgetMapper(this); |
|
899 mapper->addMapping(LE_name, 0); |
|
900 mapper->addMapping(CB_mode_Forts, 1); |
|
901 mapper->addMapping(CB_teamsDivide, 2); |
|
902 mapper->addMapping(CB_solid, 3); |
|
903 mapper->addMapping(CB_border, 4); |
|
904 mapper->addMapping(SB_TurnTime, 5); |
|
905 mapper->addMapping(SB_InitHealth, 6); |
|
906 mapper->addMapping(SB_SuddenDeath, 7); |
|
907 mapper->addMapping(SB_CaseProb, 8); |
|
908 } |