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

Method DeviceIconImpl

core/src/deviceiconimpl.cpp:36–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35using namespace scopy;
36DeviceIconImpl::DeviceIconImpl(Device *d, QWidget *parent)
37 : DeviceIcon{parent}
38{
39 ui = new Ui::DeviceButton;
40 ui->setupUi(this);
41 ui->description->setText(d->displayParam());
42 ui->name->setText(d->displayName());
43 ui->name->setStyleSheet("border: none;");
44 ui->name->setReadOnly(true);
45 ui->name->home(false);
46 connect(ui->name, &QLineEdit::editingFinished, this, &DeviceIconImpl::onEditFinished);
47 createPenBtn();
48
49 ui->iconPlaceHolder->layout()->addWidget(d->icon());
50 ui->iconPlaceHolder->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
51 setStyleSheet("QWidget { background-color: transparent; }");
52 Style::setStyle(this, style::properties::widget::deviceIcon, true, true);
53
54 setCheckable(true);
55}
56
57DeviceIconImpl::~DeviceIconImpl() {}
58

Callers

nothing calls this directly

Calls 7

connectFunction · 0.50
setupUiMethod · 0.45
displayParamMethod · 0.45
displayNameMethod · 0.45
addWidgetMethod · 0.45
layoutMethod · 0.45
iconMethod · 0.45

Tested by

no test coverage detected