From 94b1395a9ab54282fcd4c004c1b7381cc9f5cb16 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Wed, 4 Sep 2019 17:22:55 -0300 Subject: [PATCH] stop process api implementation --- bauh/view/qt/thread.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bauh/view/qt/thread.py b/bauh/view/qt/thread.py index fac21dff..a4bafb1e 100644 --- a/bauh/view/qt/thread.py +++ b/bauh/view/qt/thread.py @@ -30,6 +30,7 @@ class AsyncAction(QThread, ProcessWatcher): super(AsyncAction, self).__init__() self.wait_confirmation = False self.confirmation_res = None + self.stop = False def request_confirmation(self, title: str, body: str, components: List[InputViewComponent] = None, confirmation_label: str = None, deny_label: str = None) -> bool: self.wait_confirmation = True @@ -64,6 +65,9 @@ class AsyncAction(QThread, ProcessWatcher): def change_progress(self, val: int): self.signal_progress.emit(val) + def should_stop(self): + return self.stop + class UpdateSelectedApps(AsyncAction):