| 243 | } |
| 244 | |
| 245 | singleSelectGroup::singleSelectGroup(QString name, QWidget *parent) : |
| 246 | QWidget(parent){ |
| 247 | QFont titleFont = QFont("Corbel", 16); |
| 248 | QFontMetrics fm(titleFont); |
| 249 | qreal height = fm.lineSpacing(); |
| 250 | groupName = new QLabel(this); |
| 251 | groupName->setMinimumHeight(height); |
| 252 | groupName->setFont(titleFont); |
| 253 | groupName->setText(name); |
| 254 | |
| 255 | QWidget *spacingLine = new QWidget(this); |
| 256 | spacingLine->setFixedHeight(1); |
| 257 | spacingLine->setStyleSheet("background-color:#0a000000"); |
| 258 | |
| 259 | this->setFixedHeight(groupName->height() + middleSpacing + 1 + bottomSpacing); |
| 260 | |
| 261 | mainLayout = new QVBoxLayout(this); |
| 262 | mainLayout->setContentsMargins(10, 0, 10, bottomSpacing); |
| 263 | mainLayout->setSpacing(middleSpacing); |
| 264 | mainLayout->addWidget(groupName); |
| 265 | mainLayout->addWidget(spacingLine); |
| 266 | } |
| 267 | |
| 268 | void singleSelectGroup::AddItem(selectionItem *item){ |
| 269 | selections.push_back(item); |