(self)
| 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 |
no test coverage detected