Triggering occurs when a task is clicked in the task manager
widget, and this can be used to e.g. open a dialog showing
detailed task progress (or reopen a closed dialog which started
the task)
Switch from QtConcurrent::run to QThreadPool::start
QtConcurrent doesn't give us anyway to cancel queued but not
started tasks. QThreadPool does (and also allows us to specify
task priority)
Now, a QgsTask can have subtask QgsTasks set by calling
QgsTask::addSubTask. Sub tasks can have their own set of
dependent tasks.
Subtasks are not visible to users, and users only see the overall
progress and status of the parent task.
This allows creation of tasks which are themselves built off
many smaller component tasks. The task manager will still handle
firing up and scheduling the subtasks, so eg subtasks can run
in parallel (if their dependancies allow this).
Subtasks can themselves have subtasks.
This change is designed to allow the processing concept of
algorithms and modeller algorithms to be translatable
directly to the task manager architecture.
Adds new classes:
- QgsTask. An interface for long-running background tasks
- QgsTaskManager. Handles groups of tasks - also available as a global
instance for tracking application wide tasks
- QgsTaskManagerWidget. A list view for showing active tasks and their
progress, and for cancelling them
A new dock widget has been added with a task manager widget showing
global tasks