Convenience method for cafProgressInfo to increment and set up next step.

This commit is contained in:
Gaute Lindkvist 2018-06-29 11:14:55 +02:00
parent 5d6188b39c
commit c33ec790ed
2 changed files with 11 additions and 0 deletions

View File

@ -152,6 +152,16 @@ namespace caf {
ProgressInfoStatic::incrementProgress();
}
//--------------------------------------------------------------------------------------------------
/// Convenience method for incrementing progress and setting step size and description for next step
//--------------------------------------------------------------------------------------------------
void ProgressInfo::incrementProgressAndUpdateNextStep(size_t nextStepSize, const QString& nextDescription)
{
incrementProgress();
setNextProgressIncrement(nextStepSize);
setProgressDescription(nextDescription);
}
//--------------------------------------------------------------------------------------------------
/// To make a certain operation span more of the progress bar than one tick,
/// set the number of progress ticks that you want it to use before calling it.

View File

@ -52,6 +52,7 @@ public:
void setProgressDescription(const QString& description);
void setProgress(size_t progressValue);
void incrementProgress();
void incrementProgressAndUpdateNextStep(size_t nextStepSize, const QString& nextDescription);
void setNextProgressIncrement(size_t nextStepSize);
};