| 9 | { |
| 10 | |
| 11 | ComputerIcon::ComputerIcon(const std::shared_ptr<ClientContext>& ctx, int idx, QWidget* parent) : BaseWidget(ctx, parent) { |
| 12 | QImage image; |
| 13 | image.load(":resources/image/ic_computer.svg"); |
| 14 | pixmap_ = QPixmap::fromImage(image); |
| 15 | pixmap_ = pixmap_.scaled(icon_size_, icon_size_, Qt::KeepAspectRatio, Qt::SmoothTransformation); |
| 16 | monitor_index_ = idx; |
| 17 | } |
| 18 | |
| 19 | void ComputerIcon::paintEvent(QPaintEvent *event) { |
| 20 | QPainter painter(this); |
nothing calls this directly
no outgoing calls
no test coverage detected