| 160 | } |
| 161 | |
| 162 | void DeviceImpl::loadIcons() |
| 163 | { |
| 164 | m_icon = new QWidget(); |
| 165 | QHBoxLayout *lay = new QHBoxLayout(m_icon); |
| 166 | m_icon->setFixedHeight(100); |
| 167 | m_icon->setFixedWidth(100); |
| 168 | for(auto &p : m_plugins) { |
| 169 | if(p->loadIcon()) { |
| 170 | lay->addWidget(p->icon()); |
| 171 | return; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | QLabel *header = new QLabel("No Plugin"); |
| 176 | Style::setStyle(header, style::properties::label::deviceIcon, true); |
| 177 | |
| 178 | QWidget *noPluginIcon = |
| 179 | DeviceIconBuilder().shape(DeviceIconBuilder::SQUARE).color("gray").headerWidget(header).build(); |
| 180 | lay->addWidget(noPluginIcon); |
| 181 | } |
| 182 | |
| 183 | void DeviceImpl::loadPages() |
| 184 | { |