diff --git a/common/widgets/progress_reporter.cpp b/common/widgets/progress_reporter.cpp index 5ac6a745ea..aa937db019 100644 --- a/common/widgets/progress_reporter.cpp +++ b/common/widgets/progress_reporter.cpp @@ -75,6 +75,12 @@ void PROGRESS_REPORTER::AdvanceProgress() } +void PROGRESS_REPORTER::SetNumPhases( int aNumPhases ) +{ + m_numPhases = aNumPhases; +} + + int PROGRESS_REPORTER::currentProgress() const { double current = ( 1.0 / (double) m_numPhases ) * diff --git a/include/widgets/progress_reporter.h b/include/widgets/progress_reporter.h index 99e7af3a5c..e304485b02 100644 --- a/include/widgets/progress_reporter.h +++ b/include/widgets/progress_reporter.h @@ -51,6 +51,11 @@ class PROGRESS_REPORTER { } + /** + * sets the number of phases + */ + void SetNumPhases( int aNumPhases ); + /** * initialize the aPhase virtual zone of the dialog progress bar */ @@ -69,7 +74,7 @@ class PROGRESS_REPORTER /** * Set the progress value to aProgress (0..1) */ - void SetCurrentProgress( double aProgress ); + virtual void SetCurrentProgress( double aProgress ); /** * Fix the value thar gives the 100 precent progress bar length