PROGRESS_REPORTER: implement SetCurrentProgress() method

This commit is contained in:
Tomasz Wlostowski 2020-06-18 18:54:58 +02:00
parent 65a1ed96e0
commit 9d0f5c7f94
2 changed files with 11 additions and 0 deletions

View File

@ -61,6 +61,12 @@ void PROGRESS_REPORTER::SetMaxProgress( int aMaxProgress )
m_maxProgress.store( aMaxProgress );
}
void PROGRESS_REPORTER::SetCurrentProgress( double aProgress )
{
m_maxProgress.store( 10000 );
m_progress.store( (int) (aProgress * 10000.0) );
}
void PROGRESS_REPORTER::AdvanceProgress()
{

View File

@ -63,6 +63,11 @@ class PROGRESS_REPORTER
*/
void Report( const wxString& aMessage );
/**
* Set the progress value to aProgress (0..1)
*/
void SetCurrentProgress( double aProgress );
/**
* Fix the value thar gives the 100 precent progress bar length
* (inside the current virtual zone)