| 34 | |
| 35 | using namespace scopy; |
| 36 | DeviceIconImpl::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 | |
| 57 | DeviceIconImpl::~DeviceIconImpl() {} |
| 58 |
nothing calls this directly
no test coverage detected