MCPcopy Create free account
hub / github.com/actuallyaridan/linux-devmgmt / deviceHeader

Function deviceHeader

src/ui/DevicePropertiesDialog.cpp:142–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142static QWidget *deviceHeader(const QString &name, const QString &iconName) {
143 auto *row = new QWidget;
144 auto *hl = new QHBoxLayout(row);
145 hl->setContentsMargins(0, 0, 0, 8);
146 auto *icon = new QLabel;
147 icon->setPixmap(resolveIcon(iconName.isEmpty()
148 ? QStringLiteral("preferences-system") : iconName).pixmap(32, 32));
149 icon->setFixedSize(40, 40);
150 icon->setAlignment(Qt::AlignTop);
151 auto *label = plainLabel(name);
152 label->setAlignment(Qt::AlignVCenter);
153 label->setWordWrap(true);
154 hl->addWidget(icon);
155 hl->addWidget(label, 1);
156 return row;
157}
158
159static QFrame *hline() {
160 auto *line = new QFrame;

Callers 4

buildGeneralTabMethod · 0.85
buildDriverTabMethod · 0.85
buildDetailsTabMethod · 0.85
buildResourcesTabMethod · 0.85

Calls 2

resolveIconFunction · 0.85
plainLabelFunction · 0.85

Tested by

no test coverage detected