|
KiCad PCB EDA Suite
|
#include "import_local_footprint_libs.h"#include <wx/filefn.h>#include <wx/filename.h>#include <wx/log.h>#include <footprint_library_adapter.h>#include <libraries/library_manager.h>#include <libraries/library_table.h>#include <pgm_base.h>#include <project.h>#include <project_pcb.h>#include <reporter.h>#include <pcb_io/pcb_io_mgr.h>Go to the source code of this file.
Functions | |
| std::vector< wxString > | RegisterLocalFootprintLibraries (PROJECT &aProject, const wxString &aSourceProjectDir, const std::vector< wxString > &aLibraries, REPORTER &aReporter) |
| Register the footprint libraries a source project names in the project footprint library table. | |
| std::vector< wxString > RegisterLocalFootprintLibraries | ( | PROJECT & | aProject, |
| const wxString & | aSourceProjectDir, | ||
| const std::vector< wxString > & | aLibraries, | ||
| REPORTER & | aReporter ) |
Register the footprint libraries a source project names in the project footprint library table.
A library inside aSourceProjectDir is copied into the project and referenced relative to it; any other library keeps its absolute path. A nickname the table already holds is left alone.
Shared by the project manager's import mail handler and the kicad-cli import job.
| [in] | aProject | is the project whose table receives the rows. |
| [in] | aSourceProjectDir | is the directory of the source project. |
| [in] | aLibraries | are the absolute paths of the libraries to register. |
| [in] | aReporter | receives table save errors. |
Definition at line 36 of file import_local_footprint_libs.cpp.
References _, LIBRARY_MANAGER::AbortAsyncLoads(), PCB_IO_MGR::FILE_TYPE_NONE, FOOTPRINT, PROJECT_PCB::FootprintLibAdapter(), PGM_BASE::GetLibraryManager(), PROJECT::GetProjectPath(), PCB_IO_MGR::GuessPluginTypeFromLibPath(), FOOTPRINT_LIBRARY_ADAPTER::LoadOne(), LIBRARY_MANAGER::LoadProjectTables(), LIBRARY_ERROR::message, Pgm(), PROJECT, REPORTER::Report(), RPT_SEVERITY_ERROR, LIBRARY_TABLE_ROW::SetNickname(), LIBRARY_TABLE_ROW::SetType(), LIBRARY_TABLE_ROW::SetURI(), PCB_IO_MGR::ShowType(), LIBRARY_MANAGER::Table(), and table.
Referenced by PCB_EDIT_FRAME::KiwayMailIn().