| 5 | //*********************************************************// |
| 6 | |
| 7 | customIcon::customIcon(QString iconPath, QString hint, int r, QWidget *parent): |
| 8 | QPushButton(parent), |
| 9 | radius(r), |
| 10 | iconHint(hint){ |
| 11 | QSvgRenderer renderer; |
| 12 | renderer.load(iconPath); |
| 13 | QSize size = renderer.defaultSize(); |
| 14 | iconImg = new QPixmap(size); |
| 15 | iconImg->fill(Qt::transparent); |
| 16 | QPainter painter(iconImg); |
| 17 | painter.setRenderHints(QPainter::Antialiasing); |
| 18 | renderer.render(&painter); |
| 19 | |
| 20 | widgetRatio = iconImg->height() / iconImg->width(); |
| 21 | bgColor = defaultColor; |
| 22 | } |
| 23 | |
| 24 | customIcon::customIcon(const QPixmap &icon, QString hint, int r, QWidget *parent): |
| 25 | QPushButton(parent), |
nothing calls this directly
no outgoing calls
no test coverage detected