MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / pixmap

Method pixmap

src/theme/QtAdvancedStylesheet.cpp:127–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 }
126
127 virtual QPixmap pixmap(const QSize &size, QIcon::Mode mode,
128 QIcon::State state) override
129 {
130 // This function is necessary to create an EMPTY pixmap. It's called always
131 // before paint()
132 QImage img(size, QImage::Format_ARGB32);
133 img.fill(qRgba(0, 0, 0, 0));
134 QPixmap pix = QPixmap::fromImage(img, Qt::NoFormatConversion);
135 {
136 QPainter painter(&pix);
137 QRect r(QPoint(0.0, 0.0), size);
138 this->paint(&painter, r, mode, state);
139 }
140 return pix;
141 }
142};
143
144

Callers

nothing calls this directly

Calls 1

paintMethod · 0.95

Tested by

no test coverage detected