Scribus
Open source desktop publishing at your fingertips
MultiProgressDialog Class Reference
Inheritance diagram for MultiProgressDialog:
Collaboration diagram for MultiProgressDialog:

Signals

void canceled ()
 

Public Member Functions

 MultiProgressDialog (QWidget *parent=0)
 
 MultiProgressDialog (const QString &titleText, const QString &cancelButtonText, QWidget *parent=0)
 
void removeExtraProgressBars ()
 
bool addExtraProgressBars (const QStringList &barsList, const QStringList &barsTexts, const QList< bool > &barsNumerical)
 
int overallProgress () const
 
int progress (const QString &barName) const
 
bool setLabel (const QString &barName, const QString &newLabel)
 
bool setBusyIndicator (const QString &barName)
 
bool setTotalSteps (const QString &barName, int totalSteps)
 
bool setProgress (const QString &barName, int progress)
 
bool setProgress (const QString &barName, int progress, int totalSteps)
 
void setOverallTotalSteps (int totalSteps)
 
void setOverallProgress (int progress)
 
void setOverallProgress (int progress, int totalSteps)
 
bool setupBar (const QString &barName, const QString &barText, int progress, int totalSteps)
 
void setCancelButtonText (const QString &cancelButtonText)
 

Protected Attributes

QStringList progressBarTitles
 
QMap< QString, QProgressBar * > progressBars
 
QMap< QString, QLabel * > progressLabels
 

Constructor & Destructor Documentation

MultiProgressDialog::MultiProgressDialog ( const QString &  titleText,
const QString &  cancelButtonText,
QWidget *  parent = 0 
)

Create a multi progress bar dialog for long operations with multiple steps. The dialog includes one standard progress bar, typically for the overall progress and others may be added easily.

Parameters
titleTextTitle of the dialog
cancelButtonTextText of the cancel button.. Cancel, Close,
See also
CommontStrings::
Parameters
parentParent widget for the dialog, commonly ScMW
fQt GUI flags

Member Function Documentation

bool MultiProgressDialog::addExtraProgressBars ( const QStringList &  barsList,
const QStringList &  barsTexts,
const QList< bool > &  barsNumerical 
)

Add a list of progress bars, where barsList contains a list of references and barTexts contains the labels for the bars. Set the bools in barsNumerical to true to get a "X of Y" indicator Eg: "MYBAR1" -> "My Bar 1:" "MYBAR2" -> "My Bar 2:"

Parameters
barsList
barsTexts
barsNumerical
Returns
Success
int MultiProgressDialog::overallProgress ( ) const

Get the overall progress for the dialog

Returns
overall progress
int MultiProgressDialog::progress ( const QString &  barName) const

Get the progress for a user defined progress bar

Parameters
barName
Returns
progress for specified user bar
void MultiProgressDialog::removeExtraProgressBars ( )

Remove all progress bars other than the main one

bool MultiProgressDialog::setBusyIndicator ( const QString &  barName)

Sets a user defined progress bar to a busy bar

Parameters
barName
Returns
Success
void MultiProgressDialog::setCancelButtonText ( const QString &  cancelButtonText)

Set the cancel button text

Parameters
cancelButtonText
bool MultiProgressDialog::setLabel ( const QString &  barName,
const QString &  newLabel 
)

Set a new label for a user defined progress bar

Parameters
barNameProgress bar name
newLabelNew label
Returns
Success
void MultiProgressDialog::setOverallProgress ( int  progress)

Set the overall progress for the dialog

Parameters
progress
void MultiProgressDialog::setOverallProgress ( int  progress,
int  totalSteps 
)

Set the overall progress and total steps for the dialog

Parameters
progress
totalSteps
void MultiProgressDialog::setOverallTotalSteps ( int  totalSteps)

Set the overall total steps for the dialog

Parameters
totalSteps
bool MultiProgressDialog::setProgress ( const QString &  barName,
int  progress 
)

Set the progress for a user defined progress bar

Parameters
barName
progress
Returns
bool MultiProgressDialog::setProgress ( const QString &  barName,
int  progress,
int  totalSteps 
)

Set the prgress and total steps for a user defined progress bar

Parameters
barName
progress
totalSteps
Returns
bool MultiProgressDialog::setTotalSteps ( const QString &  barName,
int  totalSteps 
)

Set the total steps for a user defined progress bar

Parameters
barName
totalSteps
Returns
Success
bool MultiProgressDialog::setupBar ( const QString &  barName,
const QString &  barText,
int  progress,
int  totalSteps 
)

Create a new progress bar in one step

Parameters
barName
barText
progress
totalSteps
Returns

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