QTfrontend/gamecfgwidget.cpp
changeset 1884 40e59e9f82ce
parent 1878 b3b277d2b891
child 1885 75489216b5b0
equal deleted inserted replaced
1883:7c7476f56114 1884:40e59e9f82ce
    21 #include <QCheckBox>
    21 #include <QCheckBox>
    22 #include <QGridLayout>
    22 #include <QGridLayout>
    23 #include <QSpinBox>
    23 #include <QSpinBox>
    24 #include <QLabel>
    24 #include <QLabel>
    25 #include <QMessageBox>
    25 #include <QMessageBox>
       
    26 #include <QTableView>
    26 
    27 
    27 #include "gamecfgwidget.h"
    28 #include "gamecfgwidget.h"
    28 #include "igbox.h"
    29 #include "igbox.h"
    29 #include "hwconsts.h"
    30 #include "hwconsts.h"
       
    31 #include "ammoSchemeModel.h"
    30 
    32 
    31 GameCFGWidget::GameCFGWidget(QWidget* parent, bool externalControl) :
    33 GameCFGWidget::GameCFGWidget(QWidget* parent, bool externalControl) :
    32   QGroupBox(parent), mainLayout(this)
    34   QGroupBox(parent), mainLayout(this)
    33 {
    35 {
    34 	mainLayout.setMargin(0);
    36 	mainLayout.setMargin(0);
    40 	IconedGroupBox *GBoxOptions = new IconedGroupBox(this);
    42 	IconedGroupBox *GBoxOptions = new IconedGroupBox(this);
    41 	GBoxOptions->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
    43 	GBoxOptions->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
    42 	mainLayout.addWidget(GBoxOptions);
    44 	mainLayout.addWidget(GBoxOptions);
    43 
    45 
    44 	QGridLayout *GBoxOptionsLayout = new QGridLayout(GBoxOptions);
    46 	QGridLayout *GBoxOptionsLayout = new QGridLayout(GBoxOptions);
       
    47 
       
    48 	QTableView * tv = new QTableView(this);
       
    49 	tv->setModel(new AmmoSchemeModel);
       
    50 	GBoxOptionsLayout->addWidget(tv, 0, 0, 1, 2);
    45 	
    51 	
    46 	CB_mode_Forts = new QCheckBox(GBoxOptions);
    52 	CB_mode_Forts = new QCheckBox(GBoxOptions);
    47 	CB_mode_Forts->setText(QCheckBox::tr("Forts mode"));
    53 	CB_mode_Forts->setText(QCheckBox::tr("Forts mode"));
    48 	GBoxOptionsLayout->addWidget(CB_mode_Forts, 0, 0, 1, 2);
    54 	GBoxOptionsLayout->addWidget(CB_mode_Forts, 9, 0, 1, 2);
    49 
    55 
    50 	CB_teamsDivide = new QCheckBox(GBoxOptions);
    56 	CB_teamsDivide = new QCheckBox(GBoxOptions);
    51 	CB_teamsDivide->setText(QCheckBox::tr("Divide teams"));
    57 	CB_teamsDivide->setText(QCheckBox::tr("Divide teams"));
    52 	GBoxOptionsLayout->addWidget(CB_teamsDivide, 1, 0, 1, 2);
    58 	GBoxOptionsLayout->addWidget(CB_teamsDivide, 1, 0, 1, 2);
    53 
    59