KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EESCHEMA_JOBS_HANDLER Class Reference

Handle Eeschema job dispatches. More...

#include <eeschema_jobs_handler.h>

Inheritance diagram for EESCHEMA_JOBS_HANDLER:
JOB_DISPATCHER

Public Member Functions

 EESCHEMA_JOBS_HANDLER (KIWAY *aKiway)
 
int JobExportBom (JOB *aJob)
 
int JobExportPythonBom (JOB *aJob)
 
int JobExportNetlist (JOB *aJob)
 
int JobExportPlot (JOB *aJob)
 
int JobSchErc (JOB *aJob)
 
int JobSymUpgrade (JOB *aJob)
 
int JobSymExportSvg (JOB *aJob)
 
void InitRenderSettings (KIGFX::SCH_RENDER_SETTINGS *aRenderSettings, const wxString &aTheme, SCHEMATIC *aSch, const wxString &aDrawingSheetOverride=wxEmptyString)
 Configure the SCH_RENDER_SETTINGS object with the correct data to be used with plotting. More...
 
void Register (const std::string &aJobTypeName, std::function< int(JOB *job)> aHandler)
 
int RunJob (JOB *job)
 
void SetReporter (REPORTER *aReporter)
 
void SetProgressReporter (PROGRESS_REPORTER *aReporter)
 

Protected Attributes

KIWAYm_kiway
 
REPORTERm_reporter
 
PROGRESS_REPORTERm_progressReporter
 

Private Member Functions

int doSymExportSvg (JOB_SYM_EXPORT_SVG *aSvgJob, KIGFX::SCH_RENDER_SETTINGS *aRenderSettings, LIB_SYMBOL *symbol)
 
DS_PROXY_VIEW_ITEMgetDrawingSheetProxyView (SCHEMATIC *aSch)
 

Private Attributes

std::map< std::string, std::function< int(JOB *job)> > m_jobHandlers
 

Detailed Description

Handle Eeschema job dispatches.

Definition at line 41 of file eeschema_jobs_handler.h.

Constructor & Destructor Documentation

◆ EESCHEMA_JOBS_HANDLER()

EESCHEMA_JOBS_HANDLER::EESCHEMA_JOBS_HANDLER ( KIWAY aKiway)

Member Function Documentation

◆ doSymExportSvg()

◆ getDrawingSheetProxyView()

◆ InitRenderSettings()

void EESCHEMA_JOBS_HANDLER::InitRenderSettings ( KIGFX::SCH_RENDER_SETTINGS aRenderSettings,
const wxString &  aTheme,
SCHEMATIC aSch,
const wxString &  aDrawingSheetOverride = wxEmptyString 
)

Configure the SCH_RENDER_SETTINGS object with the correct data to be used with plotting.

It's sort of a kludge due to the plotter depending on this object normally managed by the frame and canvas

Parameters
aRenderSettingsThe object to populate with working settings.
aThemeThe theme to take color data from to stick into render settings, can be left blank for default.
aSchThe schematic to further copy settings from to be put into aRenderSettings.

Definition at line 89 of file eeschema_jobs_handler.cpp.

References _, PROJECT::GetProjectPath(), DS_DATA_MODEL::GetTheInstance(), KIGFX::SCH_RENDER_SETTINGS::LoadColors(), SCHEMATIC_SETTINGS::m_DashedLineDashRatio, SCHEMATIC_SETTINGS::m_DashedLineGapRatio, SCHEMATIC_SETTINGS::m_DefaultLineWidth, KIGFX::SCH_RENDER_SETTINGS::m_LabelSizeRatio, SCHEMATIC_SETTINGS::m_LabelSizeRatio, KIGFX::SCH_RENDER_SETTINGS::m_PinSymbolSize, SCHEMATIC_SETTINGS::m_PinSymbolSize, JOB_DISPATCHER::m_reporter, SCHEMATIC_SETTINGS::m_SchDrawingSheetFileName, KIGFX::SCH_RENDER_SETTINGS::m_TextOffsetRatio, SCHEMATIC_SETTINGS::m_TextOffsetRatio, path, Pgm(), SCHEMATIC::Prj(), REPORTER::Report(), DS_DATA_MODEL::ResolvePath(), RPT_SEVERITY_ERROR, KIGFX::RENDER_SETTINGS::SetDashLengthRatio(), KIGFX::RENDER_SETTINGS::SetDefaultPenWidth(), KIGFX::RENDER_SETTINGS::SetGapLengthRatio(), and SCHEMATIC::Settings().

Referenced by JobExportPlot().

◆ JobExportBom()

int EESCHEMA_JOBS_HANDLER::JobExportBom ( JOB aJob)

Definition at line 332 of file eeschema_jobs_handler.cpp.

References _, FIELDS_EDITOR_GRID_DATA_MODEL::AddColumn(), FIELDS_EDITOR_GRID_DATA_MODEL::ApplyBomPreset(), PROJECT::ApplyTextVars(), BOM_PRESET::BuiltInPresets(), BOM_FMT_PRESET::BuiltInPresets(), copy, FILEEXT::CsvFileExtension, erc, CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE, CLI::EXIT_CODES::ERR_UNKNOWN, BOM_PRESET::excludeDNP, FIELDS_EDITOR_GRID_DATA_MODEL::Export(), BOM_FMT_PRESET::fieldDelimiter, BOM_PRESET::fieldsOrdered, BOM_PRESET::filterString, SCH_REFERENCE_LIST::GetCount(), TEMPLATE_FIELDNAME::GetDefaultFieldName(), SCH_SYMBOL::GetFieldCount(), SCH_SYMBOL::GetFields(), FIELDS_EDITOR_GRID_DATA_MODEL::GetFieldsOrdered(), SCHEMATIC::GetFileName(), SCHEMATIC::GetSheets(), SCH_SHEET_LIST::GetSymbols(), TEMPLATES::GetTemplateFieldNames(), GetTextVars(), JOB::GetVarOverrides(), BOM_FIELD::groupBy, BOM_PRESET::groupSymbols, IsTextVar(), BOM_FMT_PRESET::keepLineBreaks, BOM_FMT_PRESET::keepTabs, BOM_FIELD::label, EESCHEMA_HELPERS::LoadSchematic(), JOB_EXPORT_SCH_BOM::m_bomFmtPresetName, SCHEMATIC_SETTINGS::m_BomFmtPresets, JOB_EXPORT_SCH_BOM::m_bomPresetName, SCHEMATIC_SETTINGS::m_BomPresets, JOB_EXPORT_SCH_BOM::m_excludeDNP, JOB_EXPORT_SCH_BOM::m_fieldDelimiter, JOB_EXPORT_SCH_BOM::m_fieldsGroupBy, JOB_EXPORT_SCH_BOM::m_fieldsLabels, JOB_EXPORT_SCH_BOM::m_fieldsOrdered, JOB_EXPORT_SCH_BOM::m_filename, JOB_EXPORT_SCH_BOM::m_filterString, JOB_EXPORT_SCH_BOM::m_keepLineBreaks, JOB_EXPORT_SCH_BOM::m_keepTabs, JOB_EXPORT_SCH_BOM::m_outputFile, JOB_EXPORT_SCH_BOM::m_refDelimiter, JOB_EXPORT_SCH_BOM::m_refRangeDelimiter, JOB_DISPATCHER::m_reporter, JOB_EXPORT_SCH_BOM::m_sortAsc, JOB_EXPORT_SCH_BOM::m_sortField, JOB_EXPORT_SCH_BOM::m_stringDelimiter, SCHEMATIC_SETTINGS::m_TemplateFieldNames, MANDATORY_FIELDS, BOM_FIELD::name, CLI::EXIT_CODES::OK, SCHEMATIC::Prj(), BOM_FMT_PRESET::refDelimiter, BOM_FMT_PRESET::refRangeDelimiter, REPORTER::Report(), res, RPT_SEVERITY_ERROR, RPT_SEVERITY_WARNING, SCHEMATIC::Settings(), BOM_FIELD::show, BOM_PRESET::sortAsc, BOM_PRESET::sortField, and BOM_FMT_PRESET::stringDelimiter.

Referenced by EESCHEMA_JOBS_HANDLER().

◆ JobExportNetlist()

◆ JobExportPlot()

int EESCHEMA_JOBS_HANDLER::JobExportPlot ( JOB aJob)

◆ JobExportPythonBom()

◆ JobSchErc()

◆ JobSymExportSvg()

◆ JobSymUpgrade()

◆ Register()

void JOB_DISPATCHER::Register ( const std::string &  aJobTypeName,
std::function< int(JOB *job)>  aHandler 
)
inherited

◆ RunJob()

int JOB_DISPATCHER::RunJob ( JOB job)
inherited

◆ SetProgressReporter()

void JOB_DISPATCHER::SetProgressReporter ( PROGRESS_REPORTER aReporter)
inherited

Definition at line 60 of file job_dispatcher.cpp.

References JOB_DISPATCHER::m_progressReporter.

◆ SetReporter()

void JOB_DISPATCHER::SetReporter ( REPORTER aReporter)
inherited

Definition at line 53 of file job_dispatcher.cpp.

References JOB_DISPATCHER::m_reporter.

Member Data Documentation

◆ m_jobHandlers

std::map<std::string, std::function<int( JOB* job )> > JOB_DISPATCHER::m_jobHandlers
privateinherited

Definition at line 49 of file job_dispatcher.h.

Referenced by JOB_DISPATCHER::Register(), and JOB_DISPATCHER::RunJob().

◆ m_kiway

KIWAY* JOB_DISPATCHER::m_kiway
protectedinherited

Definition at line 44 of file job_dispatcher.h.

Referenced by PCBNEW_JOBS_HANDLER::JobExportDrc(), and JobSchErc().

◆ m_progressReporter

PROGRESS_REPORTER* JOB_DISPATCHER::m_progressReporter
protectedinherited

◆ m_reporter


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