KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PROGRESS_REPORTER Class Referenceabstract

A progress reporter interface for use in multi-threaded environments. More...

#include <progress_reporter.h>

Inheritance diagram for PROGRESS_REPORTER:
CLI_PROGRESS_REPORTER PROGRESS_REPORTER_BASE BACKGROUND_JOB_REPORTER CONSOLE_PROGRESS_REPORTER DIALOG_DRC DIALOG_ERC DIALOG_PCM_PROGRESS GAUGE_PROGRESS_REPORTER WX_PROGRESS_REPORTER

Public Member Functions

 PROGRESS_REPORTER ()
 
 PROGRESS_REPORTER (const PROGRESS_REPORTER &)=delete
 
virtual ~PROGRESS_REPORTER ()
 
virtual void SetNumPhases (int aNumPhases)=0
 Set the number of phases.
 
virtual void AddPhases (int aNumPhases)=0
 
virtual void BeginPhase (int aPhase)=0
 Initialize the aPhase virtual zone of the dialog progress bar.
 
virtual void AdvancePhase ()=0
 Use the next available virtual zone of the dialog progress bar.
 
virtual void AdvancePhase (const wxString &aMessage)=0
 Use the next available virtual zone of the dialog progress bar and updates the message.
 
virtual void Report (const wxString &aMessage)=0
 Display aMessage in the progress bar dialog.
 
virtual void SetCurrentProgress (double aProgress)=0
 Set the progress value to aProgress (0..1).
 
virtual void SetMaxProgress (int aMaxProgress)=0
 Fix the value that gives the 100 percent progress bar length (inside the current virtual zone).
 
virtual void AdvanceProgress ()=0
 Increment the progress bar length (inside the current virtual zone).
 
virtual bool KeepRefreshing (bool aWait=false)=0
 Update the UI (if any).
 
virtual void SetTitle (const wxString &aTitle)=0
 Change the title displayed on the window caption.
 
virtual bool IsCancelled () const =0
 

Detailed Description

A progress reporter interface for use in multi-threaded environments.

The various advancement and message methods can be called from sub-threads. The KeepRefreshing method MUST be called only from the main thread (primarily a MSW requirement, which won't allow access to UI objects allocated from a separate thread).

Definition at line 38 of file progress_reporter.h.

Constructor & Destructor Documentation

◆ PROGRESS_REPORTER() [1/2]

PROGRESS_REPORTER::PROGRESS_REPORTER ( )
inline

Definition at line 42 of file progress_reporter.h.

◆ PROGRESS_REPORTER() [2/2]

PROGRESS_REPORTER::PROGRESS_REPORTER ( const PROGRESS_REPORTER )
delete

◆ ~PROGRESS_REPORTER()

virtual PROGRESS_REPORTER::~PROGRESS_REPORTER ( )
inlinevirtual

Definition at line 47 of file progress_reporter.h.

Member Function Documentation

◆ AddPhases()

virtual void PROGRESS_REPORTER::AddPhases ( int  aNumPhases)
pure virtual

◆ AdvancePhase() [1/2]

◆ AdvancePhase() [2/2]

virtual void PROGRESS_REPORTER::AdvancePhase ( const wxString &  aMessage)
pure virtual

Use the next available virtual zone of the dialog progress bar and updates the message.

Implemented in DIALOG_ERC, CLI_PROGRESS_REPORTER, PROGRESS_REPORTER_BASE, and DIALOG_DRC.

◆ AdvanceProgress()

virtual void PROGRESS_REPORTER::AdvanceProgress ( )
pure virtual

◆ BeginPhase()

virtual void PROGRESS_REPORTER::BeginPhase ( int  aPhase)
pure virtual

◆ IsCancelled()

◆ KeepRefreshing()

◆ Report()

virtual void PROGRESS_REPORTER::Report ( const wxString &  aMessage)
pure virtual

◆ SetCurrentProgress()

◆ SetMaxProgress()

◆ SetNumPhases()

◆ SetTitle()

virtual void PROGRESS_REPORTER::SetTitle ( const wxString &  aTitle)
pure virtual

Change the title displayed on the window caption.

Has meaning only for some reporters. Does nothing for others.

Warning
This should only be called from the main thread.

Implemented in BACKGROUND_JOB_REPORTER, CLI_PROGRESS_REPORTER, PROGRESS_REPORTER_BASE, and WX_PROGRESS_REPORTER.

Referenced by AR_AUTOPLACER::AutoplaceFootprints(), PLUGIN_CONTENT_MANAGER::fetchPackages(), and PLUGIN_CONTENT_MANAGER::FetchRepository().


The documentation for this class was generated from the following file: