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()

◆ BeginPhase()

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

◆ IsCancelled()

◆ KeepRefreshing()

virtual bool PROGRESS_REPORTER::KeepRefreshing ( bool  aWait = false)
pure virtual

◆ Report()

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

Display aMessage in the progress bar dialog.

Implemented in DIALOG_ERC, BACKGROUND_JOB_REPORTER, CLI_PROGRESS_REPORTER, and PROGRESS_REPORTER_BASE.

Referenced by AR_AUTOPLACER::AutoplaceFootprints(), CONNECTIVITY_DATA::Build(), BOARD::CacheTriangulation(), ALTIUM_PCB::ConvertComponentBody6ToFootprintItem(), PLUGIN_CONTENT_MANAGER::DownloadToStream(), SCH_IO_EAGLE::ensureLoadedLibrary(), PCB_IO_ODBPP::ExportODB(), ZONE_FILLER::Fill(), PCB_IO_EAGLE::LoadBoard(), PCB_IO_EASYEDA::LoadBoard(), PCB_IO_EASYEDAPRO::LoadBoard(), PCB_IO_FABMASTER::LoadBoard(), PCB_IO_KICAD_LEGACY::LoadBoard(), PCB_IO_KICAD_SEXPR::LoadBoard(), SCH_IO_KICAD_LEGACY::loadFile(), SCH_IO_KICAD_SEXPR::loadFile(), SCH_IO_EAGLE::LoadSchematicFile(), ALTIUM_PCB::ParseArcs6Data(), ALTIUM_PCB::ParseBoard6Data(), ALTIUM_PCB::ParseBoardRegionsData(), ALTIUM_PCB::ParseClasses6Data(), ALTIUM_PCB::ParseComponents6Data(), ALTIUM_PCB::ParseComponentsBodies6Data(), ALTIUM_PCB::ParseDimensions6Data(), ALTIUM_PCB::ParseExtendedPrimitiveInformationData(), ALTIUM_PCB::ParseFills6Data(), ALTIUM_PCB::ParseModelsData(), ALTIUM_PCB::ParseNets6Data(), ALTIUM_PCB::ParsePads6Data(), ALTIUM_PCB::ParsePolygons6Data(), ALTIUM_PCB::ParseRegions6Data(), ALTIUM_PCB::ParseRules6Data(), ALTIUM_PCB::ParseShapeBasedRegions6Data(), ALTIUM_PCB::ParseTexts6Data(), ALTIUM_PCB::ParseTracks6Data(), ALTIUM_PCB::ParseVias6Data(), ALTIUM_PCB::ParseWideStrings6Data(), UPDATE_MANAGER::PostRequest(), DESIGN_BLOCK_LIST_IMPL::ReadDesignBlockFiles(), FOOTPRINT_LIST_IMPL::ReadFootprintFiles(), and PCB_IO_IPC2581::SaveBoard().

◆ 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: