120 |
120 |
121 GBoxHedgehogs = new QGroupBox(this); |
121 GBoxHedgehogs = new QGroupBox(this); |
122 GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members")); |
122 GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members")); |
123 GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
123 GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
124 QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs); |
124 QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs); |
|
125 |
|
126 signalMapper = new QSignalMapper(this); |
125 |
127 |
126 HatsModel * hatsModel = new HatsModel(GBoxHedgehogs); |
128 HatsModel * hatsModel = new HatsModel(GBoxHedgehogs); |
127 for(int i = 0; i < 8; i++) |
129 for(int i = 0; i < 8; i++) |
128 { |
130 { |
129 HHNameEdit[i] = new QLineEdit(GBoxHedgehogs); |
|
130 HHNameEdit[i]->setMaxLength(64); |
|
131 HHNameEdit[i]->setMinimumWidth(120); |
|
132 GBHLayout->addWidget(HHNameEdit[i], i, 0); |
|
133 |
|
134 HHHats[i] = new QComboBox(GBoxHedgehogs); |
131 HHHats[i] = new QComboBox(GBoxHedgehogs); |
135 HHHats[i]->setModel(hatsModel); |
132 HHHats[i]->setModel(hatsModel); |
136 HHHats[i]->setIconSize(QSize(32, 37)); |
133 HHHats[i]->setIconSize(QSize(32, 37)); |
137 //HHHats[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents); |
134 //HHHats[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents); |
138 //HHHats[i]->setModelColumn(1); |
135 //HHHats[i]->setModelColumn(1); |
139 //HHHats[i]->setMinimumWidth(132); |
136 //HHHats[i]->setMinimumWidth(132); |
140 GBHLayout->addWidget(HHHats[i], i, 1); |
137 GBHLayout->addWidget(HHHats[i], i, 0); |
141 } |
138 |
|
139 HHNameEdit[i] = new QLineEdit(GBoxHedgehogs); |
|
140 HHNameEdit[i]->setMaxLength(64); |
|
141 HHNameEdit[i]->setMinimumWidth(120); |
|
142 GBHLayout->addWidget(HHNameEdit[i], i, 1); |
|
143 |
|
144 randButton[i] = addButton(":/res/dice.png", GBHLayout, i, 3, true); |
|
145 |
|
146 connect(randButton[i], SIGNAL(clicked()), signalMapper, SLOT(map())); |
|
147 signalMapper->setMapping(randButton[i], i); |
|
148 |
|
149 } |
|
150 |
|
151 randTeamButton = addButton("Random Team", GBHLayout, 9, false); |
|
152 |
142 vbox1->addWidget(GBoxHedgehogs); |
153 vbox1->addWidget(GBoxHedgehogs); |
143 |
154 |
144 |
155 |
145 GBoxTeam = new QGroupBox(this); |
156 GBoxTeam = new QGroupBox(this); |
146 GBoxTeam->setTitle(QGroupBox::tr("Team")); |
157 GBoxTeam->setTitle(QGroupBox::tr("Team")); |