MCPcopy Create free account
hub / github.com/YACReader/yacreader / generatePixmap

Method generatePixmap

custom_widgets/yacreader_busy_widget.cpp:70–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70QPixmap BusyIndicator::generatePixmap(int side)
71{
72 QPixmap pixmap(QSize(side, side));
73 pixmap.fill(QColor(255, 255, 255, 0));
74
75 QPainter painter(&pixmap);
76 painter.setRenderHint(QPainter::Antialiasing);
77
78 painter.translate(side / 2, side / 2);
79 painter.scale(side / 200.0, side / 200.0);
80
81 switch (m_style) {
82 case StyleRect:
83 drawRectStyle(&painter);
84 break;
85 case StyleEllipse:
86 drawEllipseStyle(&painter);
87 break;
88 case StyleArc:
89 drawArcStyle(&painter);
90 break;
91 }
92 return pixmap;
93}
94
95void BusyIndicator::drawRectStyle(QPainter *painter)
96{

Callers

nothing calls this directly

Calls 2

QColorClass · 0.85
translateMethod · 0.80

Tested by

no test coverage detected