Merge pull request 'UI: make tasks cancleable' (#3586) from hsjobeki/clan-core:qubasas into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3586
This commit is contained in:
@@ -32,12 +32,28 @@ class FileRequest:
|
||||
initial_folder: str | None = field(default=None)
|
||||
|
||||
|
||||
@API.register_abstract
|
||||
def cancel_task(task_id: str) -> None:
|
||||
"""Cancel a task by its op_key."""
|
||||
msg = "cancel_task() is not implemented"
|
||||
raise NotImplementedError(msg)
|
||||
|
||||
|
||||
@API.register_abstract
|
||||
def list_tasks() -> list[str]:
|
||||
"""List all tasks."""
|
||||
msg = "list_tasks() is not implemented"
|
||||
raise NotImplementedError(msg)
|
||||
|
||||
|
||||
@API.register_abstract
|
||||
def open_file(file_request: FileRequest) -> list[str] | None:
|
||||
"""
|
||||
Abstract api method to open a file dialog window.
|
||||
It must return the name of the selected file or None if no file was selected.
|
||||
"""
|
||||
msg = "open_file() is not implemented"
|
||||
raise NotImplementedError(msg)
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user