MCPcopy Create free account
hub / github.com/KDE/labplot / staticIcon

Method staticIcon

src/backend/worksheet/plots/cartesian/BoxPlot.cpp:205–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205QIcon BoxPlot::staticIcon() {
206 int iconSize = 20;
207 QPixmap pm(iconSize, iconSize);
208 pm.fill(Qt::transparent);
209
210 QPen pen(Qt::SolidLine);
211 pen.setColor(GuiTools::isDarkMode() ? Qt::white : Qt::black);
212 pen.setWidthF(0.0);
213
214 QPainter pa;
215 pa.begin(&pm);
216 pa.setRenderHint(QPainter::Antialiasing);
217 pa.setPen(pen);
218 pa.drawRect(6, 6, 8, 8); // box
219 pa.drawLine(10, 6, 10, 0); // upper whisker
220 pa.drawLine(10, 14, 10, 20); // lower whisker
221 pa.end();
222
223 return {pm};
224}
225
226void BoxPlot::initActions() {
227 // Orientation

Callers

nothing calls this directly

Calls 4

setPenMethod · 0.80
setColorMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected