ACF $AcfVersion:0$
Public Types | Signals | Public Member Functions | Protected Member Functions | List of all members
iqtgui::CSubtaskProgressDialog Class Reference

Progress dialog that displays progress of subtasks. More...

#include <CSubtaskProgressDialog.h>

Inheritance diagram for iqtgui::CSubtaskProgressDialog:
ibase::CCumulatedProgressManagerBase ibase::IProgressManager istd::IPolymorphic

Public Types

typedef QDialog BaseClass
 
- Public Types inherited from ibase::CCumulatedProgressManagerBase
enum class  TaskStatus { Created , Running , Finished }
 

Signals

void OverallProgressChanged (int progress)
 Signal emitted when overall progress changes.
 
void SubtasksUpdated ()
 Signal emitted when subtask list or progress changes.
 

Public Member Functions

 CSubtaskProgressDialog (const QString &title, const QString &defaultText, QWidget *parentWidget=nullptr)
 Create a subtask progress dialog.
 
virtual ~CSubtaskProgressDialog ()
 
- Public Member Functions inherited from ibase::CCumulatedProgressManagerBase
 CCumulatedProgressManagerBase (const TaskInfo &defaultTaskInfo={"", ""})
 Create cumulated progress manager.
 
virtual ~CCumulatedProgressManagerBase ()
 
void SetDefaultTaskInfo (const TaskInfo &defaultTaskInfo)
 Set information of the default task.
 
double GetCumulatedProgress () const
 Get final progress beeing result of all task progress.
 
std::vector< TaskProgressInfoGetProcessedTasks (bool preferSorted=false, int maxCount=-1) const
 Get list of current processed tasks.
 
bool IsCancelable () const
 
virtual bool IsCanceled () const
 
void SetCanceled (bool state=true)
 
virtual void ResetProgressManager () override
 Reset progress manager and make it possible to reuse it.
 
std::unique_ptr< IProgressManagerCreateSubtaskManager (const QByteArray &taskId, const QString &taskDescription, double weight=1.0) override
 Create progress manager for the subtask.
 
virtual std::unique_ptr< IProgressLoggerStartProgressLogger (bool isCancelable=false, const QString &description={}) override
 Create progress logger.
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Protected Member Functions

virtual void OnProgressChanged (double cumulatedValue) override
 
virtual void OnTasksChanged () override
 
- Protected Member Functions inherited from ibase::CCumulatedProgressManagerBase
virtual void OpenTask (TaskBase *taskPtr, const TaskInfo &taskInfo, double weight, bool isCancelable)
 
virtual void CloseTask (TaskBase *taskPtr)
 
virtual void ReportTaskProgress (TaskBase *taskPtr, double progress, TaskStatus taskStatus)
 
void TryUpdateCumulatedProgress ()
 

Detailed Description

Progress dialog that displays progress of subtasks.

This dialog extends QDialog and implements ibase::CCumulatedProgressManagerBase to show both overall progress and individual subtask progress with status indicators.

Features:

Usage example:

CSubtaskProgressDialog dialog("Processing Data", "Initializing...", parentWidget);
dialog.show();
// Create subtask managers
auto subtask1 = dialog.CreateSubtaskManager("load", "Loading files", 0.3);
auto subtask2 = dialog.CreateSubtaskManager("process", "Processing images", 0.5);
auto subtask3 = dialog.CreateSubtaskManager("save", "Saving results", 0.2);
// Start logging progress for each subtask
auto logger1 = subtask1->StartProgressLogger(true);
logger1->OnProgress(0.5); // 50% complete
// ...
Progress dialog that displays progress of subtasks.

Definition at line 50 of file CSubtaskProgressDialog.h.

Member Typedef Documentation

◆ BaseClass

Definition at line 55 of file CSubtaskProgressDialog.h.

Constructor & Destructor Documentation

◆ CSubtaskProgressDialog()

iqtgui::CSubtaskProgressDialog::CSubtaskProgressDialog ( const QString &  title,
const QString &  defaultText,
QWidget *  parentWidget = nullptr 
)

Create a subtask progress dialog.

Parameters
titleDialog window title
defaultTextDefault text shown when no tasks are active
parentWidgetParent widget (optional)

◆ ~CSubtaskProgressDialog()

virtual iqtgui::CSubtaskProgressDialog::~CSubtaskProgressDialog ( )
virtual

Member Function Documentation

◆ OnProgressChanged()

virtual void iqtgui::CSubtaskProgressDialog::OnProgressChanged ( double  cumulatedValue)
overrideprotectedvirtual

◆ OnTasksChanged()

virtual void iqtgui::CSubtaskProgressDialog::OnTasksChanged ( )
overrideprotectedvirtual

◆ OverallProgressChanged

void iqtgui::CSubtaskProgressDialog::OverallProgressChanged ( int  progress)
signal

Signal emitted when overall progress changes.

Used for thread-safe GUI updates via queued connection.

◆ SubtasksUpdated

void iqtgui::CSubtaskProgressDialog::SubtasksUpdated ( )
signal

Signal emitted when subtask list or progress changes.

Used for thread-safe GUI updates via queued connection.


The documentation for this class was generated from the following file: