KiCad PCB EDA Suite
PROGRESS_REPORTER Class Referenceabstract

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

#include <progress_reporter.h>

Inheritance diagram for PROGRESS_REPORTER:
PROGRESS_REPORTER_BASE CONSOLE_PROGRESS_REPORTER DIALOG_DRC DIALOG_ERC 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. More...
 
virtual void AddPhases (int aNumPhases)=0
 
virtual void BeginPhase (int aPhase)=0
 Initialize the aPhase virtual zone of the dialog progress bar. More...
 
virtual void AdvancePhase ()=0
 Use the next available virtual zone of the dialog progress bar. More...
 
virtual void AdvancePhase (const wxString &aMessage)=0
 Use the next available virtual zone of the dialog progress bar and updates the message. More...
 
virtual void Report (const wxString &aMessage)=0
 Display aMessage in the progress bar dialog. More...
 
virtual void SetCurrentProgress (double aProgress)=0
 Set the progress value to aProgress (0..1). More...
 
virtual void SetMaxProgress (int aMaxProgress)=0
 Fix the value that gives the 100 percent progress bar length (inside the current virtual zone). More...
 
virtual void AdvanceProgress ()=0
 Increment the progress bar length (inside the current virtual zone). More...
 
virtual bool KeepRefreshing (bool aWait=false)=0
 Update the UI (if any). More...
 
virtual void SetTitle (const wxString &aTitle)=0
 Change the title displayed on the window caption. More...
 
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 36 of file progress_reporter.h.

Constructor & Destructor Documentation

◆ PROGRESS_REPORTER() [1/2]

PROGRESS_REPORTER::PROGRESS_REPORTER ( )
inline

Definition at line 40 of file progress_reporter.h.

41  { }

◆ PROGRESS_REPORTER() [2/2]

PROGRESS_REPORTER::PROGRESS_REPORTER ( const PROGRESS_REPORTER )
delete

◆ ~PROGRESS_REPORTER()

virtual PROGRESS_REPORTER::~PROGRESS_REPORTER ( )
inlinevirtual

Definition at line 45 of file progress_reporter.h.

46  { }

Member Function Documentation

◆ AddPhases()

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

Implemented in PROGRESS_REPORTER_BASE.

◆ AdvancePhase() [1/2]

virtual void PROGRESS_REPORTER::AdvancePhase ( )
pure virtual

Use the next available virtual zone of the dialog progress bar.

Implemented in PROGRESS_REPORTER_BASE.

Referenced by ZONE_FILLER::Fill(), FOOTPRINT_LIST_IMPL::ReadFootprintFiles(), DRC_ENGINE::ReportPhase(), DRC_TOOL::RunTests(), and SYMBOL_ASYNC_LOADER::worker().

◆ 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_DRC, PROGRESS_REPORTER_BASE, and DIALOG_ERC.

◆ AdvanceProgress()

virtual void PROGRESS_REPORTER::AdvanceProgress ( )
pure virtual

◆ BeginPhase()

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

Initialize the aPhase virtual zone of the dialog progress bar.

Implemented in PROGRESS_REPORTER_BASE.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::Load(), CADSTAR_SCH_ARCHIVE_LOADER::Load(), CADSTAR_SCH_ARCHIVE_PARSER::Parse(), and CADSTAR_PCB_ARCHIVE_PARSER::Parse().

◆ IsCancelled()

◆ KeepRefreshing()

◆ Report()

◆ SetCurrentProgress()

◆ SetMaxProgress()

virtual void PROGRESS_REPORTER::SetMaxProgress ( int  aMaxProgress)
pure virtual

◆ SetNumPhases()

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

Set the number of phases.

Implemented in PROGRESS_REPORTER_BASE.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::Load(), and CADSTAR_SCH_ARCHIVE_LOADER::Load().

◆ 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 PROGRESS_REPORTER_BASE, and WX_PROGRESS_REPORTER.

Referenced by AR_AUTOPLACER::AutoplaceFootprints().


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