| 466 | ) |
| 467 | |
| 468 | def onPauseBtnClicked(self): |
| 469 | try: |
| 470 | self.pauseSwitch = not self.pauseSwitch |
| 471 | if self.pauseSwitch: |
| 472 | if hasattr(self, "pauseBtn") and self.pauseBtn: |
| 473 | self.pauseBtn.setText(self.tr("继续")) |
| 474 | if hasattr(self, "ProgressBar") and self.ProgressBar: |
| 475 | self.ProgressBar.pause() |
| 476 | else: |
| 477 | if hasattr(self, "pauseBtn") and self.pauseBtn: |
| 478 | self.pauseBtn.setText(self.tr("暂停")) |
| 479 | if hasattr(self, "ProgressBar") and self.ProgressBar: |
| 480 | self.ProgressBar.resume() |
| 481 | self.paused.emit(self.pauseSwitch) |
| 482 | except RuntimeError: |
| 483 | # 对象已被删除,静默忽略 |
| 484 | pass |
| 485 | |
| 486 | @pyqtSlot(dict) |
| 487 | def onInfoGet(self, info): |