| 140 | } |
| 141 | |
| 142 | static 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 | |
| 159 | static QFrame *hline() { |
| 160 | auto *line = new QFrame; |
no test coverage detected