widgets: PROGRESS_REPORTER - make SetCurrentProgress() virtual, allow to change number of phases post-construction
This commit is contained in:
parent
466cbe2f00
commit
09d0aff3d6
|
@ -75,6 +75,12 @@ void PROGRESS_REPORTER::AdvanceProgress()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PROGRESS_REPORTER::SetNumPhases( int aNumPhases )
|
||||||
|
{
|
||||||
|
m_numPhases = aNumPhases;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int PROGRESS_REPORTER::currentProgress() const
|
int PROGRESS_REPORTER::currentProgress() const
|
||||||
{
|
{
|
||||||
double current = ( 1.0 / (double) m_numPhases ) *
|
double current = ( 1.0 / (double) m_numPhases ) *
|
||||||
|
|
|
@ -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
|
* 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)
|
* 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
|
* Fix the value thar gives the 100 precent progress bar length
|
||||||
|
|
Loading…
Reference in New Issue