OpenCurves  0.9
LoadProgress Class Reference

A widget for showing the progress of loading. More...

#include <loadprogress.h>

Inheritance diagram for LoadProgress:

Public Types

enum  { CurrentItemMax = 1000 }
 

Public Slots

void itemName (const QString &name)
 Sets the name of the current item or operation. More...
 
void itemProgress (int current)
 Sets the current item progress [0, CurrentItemMax]. More...
 
void overallProgress (int current, int total)
 Updates the overall item progress bar [0, total]. More...
 
void loadComplete (int overallCount)
 To be invoked on completion. More...
 

Signals

void cancel ()
 Raised when the cancel button is pressed.
 

Public Member Functions

 LoadProgress (QWidget *parent=nullptr)
 Constructor. More...
 
 ~LoadProgress ()
 Destructor.
 

Detailed Description

A widget for showing the progress of loading.

Contains:

  • A cancel button.
  • A label showing to describe the current operation.
  • An overall progress bar.
  • A progress bar for the current item.

The current item progress range

Member Enumeration Documentation

anonymous enum
Enumerator
CurrentItemMax 

Maximum value for the current progress item.

Considered to be 100% done when the current progress is at this value.

Constructor & Destructor Documentation

LoadProgress::LoadProgress ( QWidget *  parent = nullptr)
explicit

Constructor.

Parameters
parentThe parent for this widget.

Member Function Documentation

void LoadProgress::itemName ( const QString &  name)
slot

Sets the name of the current item or operation.

Parameters
nameThe item name to display.
void LoadProgress::itemProgress ( int  current)
slot

Sets the current item progress [0, CurrentItemMax].

Parameters
currentThe current progress, expected in the range [0, CurrentItemMax].
void LoadProgress::loadComplete ( int  overallCount)
slot

To be invoked on completion.

This closes and deletes this dialog.

Parameters
overallCountThe overall number of items loaded. Ignored.
void LoadProgress::overallProgress ( int  current,
int  total 
)
slot

Updates the overall item progress bar [0, total].

Parameters
currentThe current progress in the range [0, total].
totalThe total target progress.

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