Progress manager delegating cumulated progress result to another manager.
More...
#include <CCumulatedProgressManagerBase.h>
Progress manager delegating cumulated progress result to another manager.
It allows to access cumulated progress and list of tasks beeing curently processed.
Definition at line 24 of file CCumulatedProgressManagerBase.h.
◆ TaskStatus
| Enumerator |
|---|
| Created | Task was created, but not started.
|
| Running | Task is running.
Progress information is beeing reported.
|
| Finished | Task was finished.
No progress information will be emitted anymore.
|
Definition at line 27 of file CCumulatedProgressManagerBase.h.
◆ CCumulatedProgressManagerBase()
| ibase::CCumulatedProgressManagerBase::CCumulatedProgressManagerBase |
( |
const TaskInfo & |
defaultTaskInfo = {"", ""} | ) |
|
Create cumulated progress manager.
◆ ~CCumulatedProgressManagerBase()
| virtual ibase::CCumulatedProgressManagerBase::~CCumulatedProgressManagerBase |
( |
| ) |
|
|
virtual |
◆ CloseTask()
| virtual void ibase::CCumulatedProgressManagerBase::CloseTask |
( |
TaskBase * |
taskPtr | ) |
|
|
protectedvirtual |
◆ CreateSubtaskManager()
| std::unique_ptr< IProgressManager > ibase::CCumulatedProgressManagerBase::CreateSubtaskManager |
( |
const QByteArray & |
taskId, |
|
|
const QString & |
taskDescription, |
|
|
double |
weight = 1.0 |
|
) |
| |
|
overridevirtual |
Create progress manager for the subtask.
This function should be called up at the start of the task for all subtasks.
- Parameters
-
| taskId | unique ID of this task. This ID can be used by the progress bar to distinguish between different tasks. |
| taskDescription | human readable description of this task. |
| weight | weight value |
Implements ibase::IProgressManager.
◆ GetCumulatedProgress()
| double ibase::CCumulatedProgressManagerBase::GetCumulatedProgress |
( |
| ) |
const |
Get final progress beeing result of all task progress.
◆ GetProcessedTasks()
| std::vector< TaskProgressInfo > ibase::CCumulatedProgressManagerBase::GetProcessedTasks |
( |
bool |
preferSorted = false, |
|
|
int |
maxCount = -1 |
|
) |
| const |
Get list of current processed tasks.
- Parameters
-
| preferSorted | Flag indicating, that the task list should be sorted from the most important to less important. |
| maxCount | Maximal number of tasks should be returned. |
◆ IsCancelable()
| bool ibase::CCumulatedProgressManagerBase::IsCancelable |
( |
| ) |
const |
◆ IsCanceled()
| virtual bool ibase::CCumulatedProgressManagerBase::IsCanceled |
( |
| ) |
const |
|
virtual |
◆ OnProgressChanged()
| virtual void ibase::CCumulatedProgressManagerBase::OnProgressChanged |
( |
double |
cumulatedValue | ) |
|
|
protectedvirtual |
◆ OnTasksChanged()
| virtual void ibase::CCumulatedProgressManagerBase::OnTasksChanged |
( |
| ) |
|
|
protectedvirtual |
◆ OpenTask()
| virtual void ibase::CCumulatedProgressManagerBase::OpenTask |
( |
TaskBase * |
taskPtr, |
|
|
const TaskInfo & |
taskInfo, |
|
|
double |
weight, |
|
|
bool |
isCancelable |
|
) |
| |
|
protectedvirtual |
◆ ReportTaskProgress()
| virtual void ibase::CCumulatedProgressManagerBase::ReportTaskProgress |
( |
TaskBase * |
taskPtr, |
|
|
double |
progress, |
|
|
TaskStatus |
taskStatus |
|
) |
| |
|
protectedvirtual |
◆ ResetProgressManager()
| virtual void ibase::CCumulatedProgressManagerBase::ResetProgressManager |
( |
| ) |
|
|
overridevirtual |
◆ SetCanceled()
| void ibase::CCumulatedProgressManagerBase::SetCanceled |
( |
bool |
state = true | ) |
|
◆ SetDefaultTaskInfo()
| void ibase::CCumulatedProgressManagerBase::SetDefaultTaskInfo |
( |
const TaskInfo & |
defaultTaskInfo | ) |
|
Set information of the default task.
◆ StartProgressLogger()
| virtual std::unique_ptr< IProgressLogger > ibase::CCumulatedProgressManagerBase::StartProgressLogger |
( |
bool |
isCancelable = false, |
|
|
const QString & |
description = {} |
|
) |
| |
|
overridevirtual |
Create progress logger.
This function should be called once at the start of the task if it provides progress information.
- Parameters
-
| isCancelable | informs, that this task can be cancel during the processing. |
Implements ibase::IProgressManager.
◆ TryUpdateCumulatedProgress()
| void ibase::CCumulatedProgressManagerBase::TryUpdateCumulatedProgress |
( |
| ) |
|
|
protected |
◆ SubTaskManager
| friend class SubTaskManager |
|
friend |
The documentation for this class was generated from the following file: