25 #ifndef __PROGRESS_REPORTER 26 #define __PROGRESS_REPORTER 31 #include <wx/progdlg.h> 33 #if wxCHECK_VERSION(3, 1, 0) 34 #include <wx/appprogress.h> 79 virtual void Report(
const wxString& aMessage );
146 bool aCanAbort =
true );
151 virtual void SetTitle(
const wxString& aTitle )
override 153 wxProgressDialog::SetTitle( aTitle );
157 #if wxCHECK_VERSION(3, 1, 0) 158 wxAppProgressIndicator m_appProgressIndicator;
virtual void AdvancePhase()
Uses the next vailable virtual zone of the dialog progress bar.
virtual void BeginPhase(int aPhase)
initialize the aPhase virtual zone of the dialog progress bar
A progress reporter for use in multi-threaded environments.
std::atomic_int m_progress
virtual void Report(const wxString &aMessage)
Display aMessage in the progress bar dialog.
GAUGE_PROGRESS_REPORTER(wxWindow *aParent, int aNumPhases)
PROGRESS_REPORTER(int aNumPhases)
virtual void SetCurrentProgress(double aProgress)
Set the progress value to aProgress (0..1)
Multi-thread safe progress reporter dialog, intended for use of tasks that paralleize reporting back ...
void SetNumPhases(int aNumPhases)
sets the number of phases
std::atomic_int m_numPhases
std::atomic_bool m_cancelled
virtual void SetTitle(const wxString &aTitle) override
change the title displayed on the window caption
virtual bool updateUI()=0
virtual bool updateUI() override
bool KeepRefreshing(bool aWait=false)
Update the UI dialog.
WX_PROGRESS_REPORTER(wxWindow *aParent, const wxString &aTitle, int aNumPhases, bool aCanAbort=true)
Ctor: the PROGRESS_REPORTER will stay on top of aParent.
int currentProgress() const
virtual ~PROGRESS_REPORTER()
std::atomic_int m_maxProgress
void SetMaxProgress(int aMaxProgress)
Fix the value thar gives the 100 precent progress bar length (inside the current virtual zone)
virtual void SetTitle(const wxString &aTitle)
change the title displayed on the window caption MUST only be called from the main thread.
void AddPhases(int aNumPhases)
void AdvanceProgress()
Increment the progress bar length (inside the current virtual zone)