This commit is contained in:
Vinícius Moreira
2020-04-13 11:49:28 -03:00
parent 83aab1ff55
commit 01a60ea686
165 changed files with 12778 additions and 6171 deletions

View File

@@ -17,7 +17,7 @@ class ProcessWatcher:
"""
pass
def request_confirmation(self, title: str, body: str, components: List[ViewComponent] = None, confirmation_label: str = None, deny_label: str = None)-> bool:
def request_confirmation(self, title: str, body: str, components: List[ViewComponent] = None, confirmation_label: str = None, deny_label: str = None, deny_button: bool = True)-> bool:
"""
request a user confirmation. In the current GUI implementation, it shows a popup to the user.
:param title: popup title
@@ -25,10 +25,17 @@ class ProcessWatcher:
:param components: extra view components that will be rendered to the confirmation popup.
:param confirmation_label: optional confirmation button label (default to 'yes')
:param deny_label: optional deny button label (default to 'no')
:param deny_button: if the deny button should be displayed
:return: if the request was confirmed by the user
"""
pass
def request_reboot(self, msg: str) -> bool:
"""
:return: requests a system reboot
"""
pass
def show_message(self, title: str, body: str, type_: MessageType = MessageType.INFO):
"""
shows a message to the user. In the current GUI implementation, it shows a popup.
@@ -70,4 +77,33 @@ class ProcessWatcher:
"""
asks the root password for the user
:return: a tuple with the typed password and if it is valid
"""
"""
class TaskManager:
def register_task(self, id_: str, label: str, icon_path: str):
"""
:param id_: an unique identifier for the task
:param label: an i18n label
:param icon_path: str
:return:
"""
pass
def update_progress(self, task_id: str, progress: float, substatus: str):
"""
:param task_id:
:param progress: a float between 0 and 100.
:param substatus: a substatus string representing the current state
:return:
"""
pass
def finish_task(self, task_id: str):
"""
marks a task as finished
:param task_id:
:return:
"""
pass