KiCad PCB EDA Suite
|
A progress reporter interface for use in multi-threaded environments. More...
#include <progress_reporter.h>
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 |
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.
|
inline |
Definition at line 40 of file progress_reporter.h.
|
delete |
|
inlinevirtual |
Definition at line 45 of file progress_reporter.h.
|
pure virtual |
Implemented in CLI_PROGRESS_REPORTER, and PROGRESS_REPORTER_BASE.
|
pure virtual |
Use the next available virtual zone of the dialog progress bar.
Implemented in BACKGROUND_JOB_REPORTER, CLI_PROGRESS_REPORTER, PROGRESS_REPORTER_BASE, and DIALOG_PCM_PROGRESS.
Referenced by ZONE_FILLER::Fill(), FOOTPRINT_LIST_IMPL::ReadFootprintFiles(), DRC_ENGINE::ReportPhase(), ERC_TESTER::RunTests(), DRC_TOOL::RunTests(), and SYMBOL_ASYNC_LOADER::worker().
|
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.
|
pure virtual |
Increment the progress bar length (inside the current virtual zone).
Implemented in CLI_PROGRESS_REPORTER, and PROGRESS_REPORTER_BASE.
Referenced by DRC_ENGINE::AdvanceProgress(), AR_AUTOPLACER::AutoplaceFootprints(), CN_CONNECTIVITY_ALGO::Build(), BOARD::CacheTriangulation(), CADSTAR_ARCHIVE_PARSER::checkPoint(), ZONE_FILLER::Fill(), FOOTPRINT_LIST_IMPL::loadFootprints(), and FOOTPRINT_LIST_IMPL::loadLibs().
|
pure virtual |
Initialize the aPhase virtual zone of the dialog progress bar.
Implemented in CLI_PROGRESS_REPORTER, and PROGRESS_REPORTER_BASE.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::Load(), CADSTAR_SCH_ARCHIVE_LOADER::Load(), CADSTAR_SCH_ARCHIVE_LOADER::LoadPartsLib(), CADSTAR_SCH_ARCHIVE_PARSER::Parse(), and CADSTAR_PCB_ARCHIVE_PARSER::Parse().
|
pure virtual |
Implemented in CLI_PROGRESS_REPORTER, and PROGRESS_REPORTER_BASE.
Referenced by CN_CONNECTIVITY_ALGO::Build(), BOARD::CacheTriangulation(), PLUGIN_CONTENT_MANAGER::DownloadToStream(), ZONE_FILLER::Fill(), ZONE_FILLER::fillCopperZone(), CN_CONNECTIVITY_ALGO::FillIsolatedIslandsMap(), ZONE_FILLER::fillSingleZone(), DRC_ENGINE::IsCancelled(), DRC_TEST_PROVIDER_SLIVER_CHECKER::Run(), DRC_TOOL::RunTests(), CN_CONNECTIVITY_ALGO::SearchClusters(), and SYMBOL_ASYNC_LOADER::worker().
|
pure virtual |
Update the UI (if any).
Implemented in CLI_PROGRESS_REPORTER, and PROGRESS_REPORTER_BASE.
Referenced by AR_AUTOPLACER::AutoplaceFootprints(), CONNECTIVITY_DATA::Build(), CN_CONNECTIVITY_ALGO::Build(), BOARD::CacheTriangulation(), CADSTAR_ARCHIVE_PARSER::checkPoint(), SCH_EAGLE_PLUGIN::checkpoint(), SCH_SEXPR_PARSER::checkpoint(), SCH_LEGACY_PLUGIN::checkpoint(), ALTIUM_PCB::checkpoint(), EAGLE_PLUGIN::checkpoint(), FABMASTER::checkpoint(), PCB_PARSER::checkpoint(), LEGACY_PLUGIN::checkpoint(), PLUGIN_CONTENT_MANAGER::DownloadToStream(), ZONE_FILLER::Fill(), CN_CONNECTIVITY_ALGO::FillIsolatedIslandsMap(), DRC_ENGINE::KeepRefreshing(), CADSTAR_ARCHIVE_PARSER::LoadArchiveFile(), EAGLE_PLUGIN::LoadBoard(), EASYEDA_PLUGIN::LoadBoard(), EASYEDAPRO_PLUGIN::LoadBoard(), FABMASTER_PLUGIN::LoadBoard(), PCB_PLUGIN::LoadBoard(), LEGACY_PLUGIN::LoadBoard(), SCH_LEGACY_PLUGIN::loadFile(), SCH_SEXPR_PLUGIN::loadFile(), FOOTPRINT_LIST_IMPL::loadFootprints(), FOOTPRINT_LIST_IMPL::loadLibs(), SCH_EAGLE_PLUGIN::LoadSchematicFile(), SYMBOL_LIBRARY_MANAGER::Preload(), DRC_ENGINE::ReportPhase(), DRC_ENGINE::ReportProgress(), and CN_CONNECTIVITY_ALGO::searchConnections().
|
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(), PLUGIN_CONTENT_MANAGER::DownloadToStream(), ZONE_FILLER::Fill(), EAGLE_PLUGIN::LoadBoard(), EASYEDA_PLUGIN::LoadBoard(), EASYEDAPRO_PLUGIN::LoadBoard(), FABMASTER_PLUGIN::LoadBoard(), PCB_PLUGIN::LoadBoard(), LEGACY_PLUGIN::LoadBoard(), SCH_LEGACY_PLUGIN::loadFile(), SCH_SEXPR_PLUGIN::loadFile(), SCH_EAGLE_PLUGIN::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(), and FOOTPRINT_LIST_IMPL::ReadFootprintFiles().
|
pure virtual |
Set the progress value to aProgress (0..1).
Implemented in CLI_PROGRESS_REPORTER, PROGRESS_REPORTER_BASE, CONSOLE_PROGRESS_REPORTER, and CONSOLE_PROGRESS_REPORTER.
Referenced by CONNECTIVITY_DATA::Build(), CN_CONNECTIVITY_ALGO::Build(), SCH_EAGLE_PLUGIN::checkpoint(), SCH_SEXPR_PARSER::checkpoint(), SCH_LEGACY_PLUGIN::checkpoint(), ALTIUM_PCB::checkpoint(), EAGLE_PLUGIN::checkpoint(), FABMASTER::checkpoint(), PCB_PARSER::checkpoint(), LEGACY_PLUGIN::checkpoint(), PLUGIN_CONTENT_MANAGER::DownloadToStream(), CN_CONNECTIVITY_ALGO::FillIsolatedIslandsMap(), CADSTAR_ARCHIVE_PARSER::LoadArchiveFile(), and DRC_ENGINE::ReportProgress().
|
pure virtual |
Fix the value that gives the 100 percent progress bar length (inside the current virtual zone).
Implemented in CLI_PROGRESS_REPORTER, and PROGRESS_REPORTER_BASE.
Referenced by AR_AUTOPLACER::AutoplaceFootprints(), ZONE_FILLER::Fill(), CADSTAR_PCB_ARCHIVE_LOADER::Load(), CADSTAR_SCH_ARCHIVE_LOADER::Load(), CADSTAR_SCH_ARCHIVE_LOADER::LoadPartsLib(), CADSTAR_SCH_ARCHIVE_PARSER::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::Parse(), FOOTPRINT_LIST_IMPL::ReadFootprintFiles(), CN_CONNECTIVITY_ALGO::searchConnections(), and DRC_ENGINE::SetMaxProgress().
|
pure virtual |
Set the number of phases.
Implemented in BACKGROUND_JOB_REPORTER, CLI_PROGRESS_REPORTER, and PROGRESS_REPORTER_BASE.
Referenced by CADSTAR_PCB_ARCHIVE_LOADER::Load(), CADSTAR_SCH_ARCHIVE_LOADER::Load(), CADSTAR_PCB_ARCHIVE_LOADER::LoadLibrary(), and CADSTAR_SCH_ARCHIVE_LOADER::LoadPartsLib().
|
pure virtual |
Change the title displayed on the window caption.
Has meaning only for some reporters. Does nothing for others.
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().