fix停止监控后时间归零
This commit is contained in:
parent
540c3b0e47
commit
36c4f6153c
@ -307,6 +307,13 @@ try:
|
||||
self.start_stop_btn.setStyleSheet("background-color: #4CAF50;")
|
||||
self.status_label.setText("状态: 已停止监控")
|
||||
self.timer.stop()
|
||||
# 重置计时相关的变量
|
||||
self.last_face_time = time.time()
|
||||
self.no_face_duration = 0
|
||||
self.progress_bar.setValue(0)
|
||||
self.progress_bar.setFormat("离开时间: 0s")
|
||||
self.set_progress_bar_style("#4CAF50") # 重置进度条颜色为绿色
|
||||
self.confidence_label.setText("置信度: 0%")
|
||||
self.tray_icon.showMessage("工位监控", "监控已停止", QSystemTrayIcon.MessageIcon.Information)
|
||||
|
||||
def update_timeout(self, value):
|
||||
|
Loading…
Reference in New Issue
Block a user