configurator/lib/ServiceWidget.cpp

18 lines
675 B
C++
Raw Normal View History

2024-09-03 13:40:08 +00:00
#include "ServiceWidget.h"
2024-09-03 16:59:36 +00:00
ServiceWidget::ServiceWidget(Service &s, QWidget *parent):QWidget(parent),_layout(QBoxLayout::LeftToRight, this),_s(s) {
_layout.setSpacing(4);
2024-09-03 13:40:08 +00:00
_icon = new QLabel(this);
_icon->setPixmap(s.pixmap().scaled(32, 32));
_layout.addWidget(_icon);
_label = new QLabel(this);
_label->setText("<h3>" + s.title + "</h3>" + s.description);
_layout.addWidget(_label);
2024-09-03 16:59:36 +00:00
_go = new QPushButton(tr("Go"), this);
_layout.addWidget(_go);
connect(_go, &QPushButton::clicked, this, &ServiceWidget::goClicked);
_help = new QPushButton(tr("Help"), this);
_layout.addWidget(_help);
connect(_help, &QPushButton::clicked, this, &ServiceWidget::helpClicked);
2024-09-03 13:40:08 +00:00
}