MCPcopy Create free account
hub / github.com/PyQt5/PyQtClient / __init__

Method __init__

Widgets/WaterWidget.py:24–40  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

22class WaterWidget(QWidget):
23
24 def __init__(self, *args, **kwargs):
25 super(WaterWidget, self).__init__(*args, **kwargs)
26 # 浪高百分比
27 self._waterHeight = 1
28 # 密度
29 self._waterDensity = 1
30 # 波浪颜色1
31 self._waterFgColor = QColor(33, 178, 148)
32 # 波浪颜色2
33 self._waterBgColor = QColor(33, 178, 148, 100)
34 self.minimum = 0
35 self.maximum = 0
36 self._value = 0
37 self._offset = 0
38 # 每隔100ms刷新波浪(模拟波浪动态)
39 self._updateTimer = QTimer(self, timeout=self.update)
40 self._updateTimer.start(100)
41
42 def update(self):
43 if self.minimum >= self.maximum:

Callers

nothing calls this directly

Calls 1

startMethod · 0.45

Tested by

no test coverage detected