27#include <wx/evtloop.h>
34 m_numPhases( aNumPhases ),
36 m_maxProgress( 1000 ),
38 m_messageChanged( false )
66 std::lock_guard<std::mutex> guard(
m_mutex );
82 m_progress.store( (
int) ( aProgress * 1000.0 ) );
109 return (
int)( current * 1000 );
virtual bool updateUI()=0
void AdvanceProgress() override
Increment the progress bar length (inside the current virtual zone).
std::atomic_bool m_messageChanged
virtual void AdvancePhase() override
Use the next available virtual zone of the dialog progress bar.
PROGRESS_REPORTER_BASE(int aNumPhases)
virtual void SetCurrentProgress(double aProgress) override
Set the progress value to aProgress (0..1).
std::atomic_int m_numPhases
void SetMaxProgress(int aMaxProgress) override
Fix the value that gives the 100 percent progress bar length (inside the current virtual zone).
int CurrentProgress() const
std::atomic_bool m_cancelled
std::atomic_int m_progress
virtual void Report(const wxString &aMessage) override
Display aMessage in the progress bar dialog.
void AddPhases(int aNumPhases) override
void SetNumPhases(int aNumPhases) override
Set the number of phases.
bool KeepRefreshing(bool aWait=false) override
Update the UI dialog.
std::atomic_int m_maxProgress
virtual void BeginPhase(int aPhase) override
Initialize the aPhase virtual zone of the dialog progress bar.
A progress reporter interface for use in multi-threaded environments.