MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / createSection

Method createSection

core/src/pkggui/pkgzipwidget.cpp:86–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86MenuSectionCollapseWidget *PkgZipWidget::createSection(QString title, QString description, QWidget *parent)
87{
88 MenuSectionCollapseWidget *section = new MenuSectionCollapseWidget(title, MenuCollapseSection::MHCW_NONE,
89 MenuCollapseSection::MHW_INFOWIDGET, parent);
90 QMargins leftMargin(10, 0, 0, 0);
91 InfoHeaderWidget *infoHeader = getInfoHeader(section->collapseSection());
92 if(infoHeader) {
93 section->collapseSection()->header()->setCheckable(false);
94 infoHeader->setDescription(description);
95 leftMargin.setLeft(infoHeader->infoBtn()->sizeHint().width());
96 }
97 section->contentLayout()->setContentsMargins(leftMargin);
98
99 return section;
100}
101
102InfoHeaderWidget *PkgZipWidget::getInfoHeader(MenuCollapseSection *section)
103{

Callers

nothing calls this directly

Calls 6

collapseSectionMethod · 0.80
infoBtnMethod · 0.80
headerMethod · 0.45
setDescriptionMethod · 0.45
sizeHintMethod · 0.45
contentLayoutMethod · 0.45

Tested by

no test coverage detected