27 #include <QToolBox> |
27 #include <QToolBox> |
28 #include <QMessageBox> |
28 #include <QMessageBox> |
29 |
29 |
30 #include "sdlkeys.h" |
30 #include "sdlkeys.h" |
31 #include "SquareLabel.h" |
31 #include "SquareLabel.h" |
32 #include "hats.h" |
|
33 #include "HWApplication.h" |
32 #include "HWApplication.h" |
34 |
33 |
35 #include "DataManager.h" |
34 #include "DataManager.h" |
36 |
35 |
37 #include "pageeditteam.h" |
36 #include "pageeditteam.h" |
59 GBoxHedgehogs = new QGroupBox(this); |
58 GBoxHedgehogs = new QGroupBox(this); |
60 GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members")); |
59 GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members")); |
61 GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
60 GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
62 QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs); |
61 QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs); |
63 |
62 |
64 HatsModel * hatsModel = new HatsModel(GBoxHedgehogs); |
63 HatModel * hatModel = DataManager::instance().hatModel(); |
|
64 |
65 for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) |
65 for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) |
66 { |
66 { |
67 HHHats[i] = new QComboBox(GBoxHedgehogs); |
67 HHHats[i] = new QComboBox(GBoxHedgehogs); |
68 HHHats[i]->setModel(hatsModel); |
68 HHHats[i]->setModel(hatModel); |
69 HHHats[i]->setIconSize(QSize(32, 37)); |
69 HHHats[i]->setIconSize(QSize(32, 37)); |
70 //HHHats[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents); |
70 //HHHats[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents); |
71 //HHHats[i]->setModelColumn(1); |
71 //HHHats[i]->setModelColumn(1); |
72 //HHHats[i]->setMinimumWidth(132); |
72 //HHHats[i]->setMinimumWidth(132); |
73 GBHLayout->addWidget(HHHats[i], i, 0); |
73 GBHLayout->addWidget(HHHats[i], i, 0); |