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

Method staticIcon

src/backend/worksheet/plots/cartesian/LollipopPlot.cpp:79–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79QIcon LollipopPlot::staticIcon() {
80 int iconSize = 20;
81 QPixmap pm(iconSize, iconSize);
82 pm.fill(Qt::transparent);
83
84 QPen pen(Qt::SolidLine);
85 pen.setColor(GuiTools::isDarkMode() ? Qt::white : Qt::black);
86 pen.setWidthF(0.0);
87
88 QPainter pa;
89 pa.begin(&pm);
90 pa.setRenderHint(QPainter::Antialiasing);
91 pa.setPen(pen);
92 pa.setBrush(pen.color());
93 pa.drawLine(10, 6, 10, 14);
94 pa.drawEllipse(8, 4, 4, 4);
95 pa.end();
96
97 return {pm};
98}
99
100void LollipopPlot::initActions() {
101 // Orientation

Callers

nothing calls this directly

Calls 6

setPenMethod · 0.80
setBrushMethod · 0.80
setColorMethod · 0.45
beginMethod · 0.45
colorMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected