MCPcopy Create free account
hub / github.com/Linloir/GraphBuilder / singleSelectGroup

Method singleSelectGroup

customWidgets.cpp:245–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245singleSelectGroup::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
268void singleSelectGroup::AddItem(selectionItem *item){
269 selections.push_back(item);

Callers

nothing calls this directly

Calls 2

addWidgetMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected