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

Method updateAnimation

QPropertyAnimation/RlatticeEffect.py:109–120  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

107 self.updateAnimation()
108
109 def updateAnimation(self):
110 self.xanimation.stop()
111 self.yanimation.stop()
112 duration = int((1 + random()) * 1000)
113 self.xanimation.setDuration(duration)
114 self.yanimation.setDuration(duration)
115 self.xanimation.setStartValue(self.__x)
116 self.xanimation.setEndValue(self.originX - 50 + random() * 100)
117 self.yanimation.setStartValue(self.__y)
118 self.yanimation.setEndValue(self.originY - 50 + random() * 100)
119 self.xanimation.start()
120 self.yanimation.start()
121
122 @pyqtProperty(float)
123 def x(self): # type: ignore

Callers 1

initAnimationMethod · 0.95

Calls 3

setDurationMethod · 0.80
stopMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected