|
KiCad PCB EDA Suite
|
#include "import_local_symbol_libs.h"#include <wx/filefn.h>#include <wx/filename.h>#include <wx/log.h>#include <libraries/library_manager.h>#include <libraries/library_table.h>#include <libraries/symbol_library_adapter.h>#include <pgm_base.h>#include <project.h>#include <project_sch.h>#include <reporter.h>#include <sch_io/sch_io_mgr.h>Go to the source code of this file.
Functions | |
| std::vector< wxString > | RegisterLocalSymbolLibraries (PROJECT &aProject, const wxString &aSourceProjectDir, const std::vector< wxString > &aLibraries, REPORTER &aReporter) |
| Register the symbol libraries a source project names in the project symbol library table. | |
| std::vector< wxString > RegisterLocalSymbolLibraries | ( | PROJECT & | aProject, |
| const wxString & | aSourceProjectDir, | ||
| const std::vector< wxString > & | aLibraries, | ||
| REPORTER & | aReporter ) |
Register the symbol libraries a source project names in the project symbol 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_symbol_libs.cpp.
References _, LIBRARY_MANAGER::AbortAsyncLoads(), PGM_BASE::GetLibraryManager(), PROJECT::GetProjectPath(), SCH_IO_MGR::GuessPluginTypeFromLibPath(), SYMBOL_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(), SCH_IO_MGR::ShowType(), SYMBOL, PROJECT_SCH::SymbolLibAdapter(), LIBRARY_MANAGER::Table(), and table.
Referenced by SCH_EDIT_FRAME::KiwayMailIn().