21#ifndef DIALOG_PCM_PROGRESS_H_
22#define DIALOG_PCM_PROGRESS_H_
29#include <wx/appprogress.h>
67 static uint64_t
toKb( uint64_t aValue );
78 std::vector< std::pair<wxString, SEVERITY> >
m_reports;
Class DIALOG_PCM_PROGRESS_BASE.
Progress dialog for PCM system.
std::atomic_int64_t m_currentProgressTotal
std::atomic_int64_t m_currentProgress
void OnCloseClicked(wxCommandEvent &event) override
std::atomic_bool m_finished
wxWindowDisabler m_disabler
void OnCancelClicked(wxCommandEvent &event) override
void AdvancePhase() override
Safe to call from non-UI thread. Disables cancel button, enables close button.
wxAppProgressIndicator m_appProgressIndicator
void SetDownloadProgress(uint64_t aDownloaded, uint64_t aTotal)
Safe to call from non-UI thread. Sets the download prgress of the current package.
void SetPackageProgress(uint64_t aProgress, uint64_t aTotal)
Safe to call from non-UI thread. Advances to the next package.
std::vector< std::pair< wxString, SEVERITY > > m_reports
void PCMReport(const wxString &aText, SEVERITY aSeverity)
Safe to call from non-UI thread. Sets the download progress of the current zip entry.
static uint64_t toKb(uint64_t aValue)
std::atomic_int64_t m_downloadTotal
std::atomic_int64_t m_downloaded
This implements all the tricky bits for thread safety, but the GUI is left to derived classes.