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

Method loadIcons

core/src/deviceimpl.cpp:162–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void 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
183void DeviceImpl::loadPages()
184{

Callers

nothing calls this directly

Calls 6

headerWidgetMethod · 0.80
loadIconMethod · 0.45
addWidgetMethod · 0.45
iconMethod · 0.45
buildMethod · 0.45
colorMethod · 0.45

Tested by

no test coverage detected