MCPcopy Index your code
hub / github.com/PyQt5/PyQt / __init__

Method __init__

QProgressBar/Lib/DWaterProgress.py:51–71  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

49class DWaterProgress(QProgressBar):
50
51 def __init__(self, *args, **kwargs):
52 super(DWaterProgress, self).__init__(*args, **kwargs)
53 self.waterFrontImage = QImage()
54 self.waterBackImage = QImage()
55 self.waterFrontSvg = QSvgRenderer(WATER_FRONT.encode())
56 self.waterBackSvg = QSvgRenderer(WATER_BACK.encode())
57 self.pops = []
58 self.initPops()
59 self.setTextVisible(True)
60 self.interval = 33
61 self.timer = QTimer(self)
62 self.timer.setInterval(self.interval)
63 self.timer.timeout.connect(self.onTimerOut)
64 self.resizePixmap(self.size())
65 self.frontXOffset = self.width()
66 self.backXOffset = 0
67 effect = QGraphicsDropShadowEffect(self)
68 effect.setOffset(0, 6)
69 effect.setColor(QColor(1, 153, 248, 255 * 5 / 20))
70 effect.setBlurRadius(12)
71 self.setGraphicsEffect(effect)
72
73 def initPops(self):
74 self.pops = [Pop(7, -1.8, 0.6), Pop(8, 1.2, 1.0), Pop(11, 0.8, 1.6)]

Callers

nothing calls this directly

Calls 5

initPopsMethod · 0.95
resizePixmapMethod · 0.95
setColorMethod · 0.80
__init__Method · 0.45
widthMethod · 0.45

Tested by

no test coverage detected