|
KiCad PCB EDA Suite
|
A helper class to import non Kicad project. More...
#include <import_proj.h>
Public Member Functions | |
| IMPORT_PROJ_HELPER (KICAD_MANAGER_FRAME *aframe, const std::vector< wxString > &aSchFileExtensions, const std::vector< wxString > &aPcbFileExtensions) | |
| void | FindEmptyTargetDir () |
| Appends a new directory with the name of the project file Keep iterating until an empty directory is found. | |
| void | ImportFiles (int aImportedSchFileType, int aImportedPcbFileType) |
| Converts imported files to kicad type files. | |
| void | ImportPadsFiles () |
| Converts PADS ASCII schematic and PCB files to KiCad type files. | |
Public Attributes | |
| wxFileName | m_InputFile |
| wxFileName | m_TargetProj |
Private Member Functions | |
| void | ImportIndividualFile (KICAD_T aKicad_T, int aImportedFileType) |
| void | doImport (const wxString &aFile, FRAME_T aFrameType, int aImportedFileType) |
| void | addLocalLibraries (const std::set< wxString > &aLibName, FRAME_T aFrameType) |
| void | setImportCacheNickname () |
| Pre-commit one collision-free generated footprint-cache nickname into m_properties so the schematic and PCB imports agree on where residual footprints land. | |
| wxString | joinSourceLibNicknames (const std::set< wxString > &aPaths) const |
| Join the basenames of the given library paths into a source-library property value. | |
| void | EasyEDAProProjectHandler (int aImportedSchFileType, int aImportedPcbFileType) |
| void | AltiumProjectHandler () |
| void | GedaProjectHandler () |
| void | OrcadProjectHandler () |
| Imports the OrCAD schematic, then offers to import an associated Allegro board. | |
Private Attributes | |
| KICAD_MANAGER_FRAME * | m_frame |
| std::map< std::string, UTF8 > | m_properties |
| std::vector< wxString > | m_copiedSchPaths |
| std::vector< wxString > | m_copiedPcbPaths |
| std::vector< wxString > | m_schExtenstions |
| std::vector< wxString > | m_pcbExtenstions |
A helper class to import non Kicad project.
Definition at line 36 of file import_proj.h.
| IMPORT_PROJ_HELPER::IMPORT_PROJ_HELPER | ( | KICAD_MANAGER_FRAME * | aframe, |
| const std::vector< wxString > & | aSchFileExtensions, | ||
| const std::vector< wxString > & | aPcbFileExtensions ) |
Definition at line 58 of file import_proj.cpp.
References m_frame, m_pcbExtenstions, and m_schExtenstions.
|
private |
Definition at line 275 of file import_proj.cpp.
References KIWAY::ExpressMail(), KIWAY_HOLDER::Kiway(), m_frame, m_InputFile, MAIL_ADD_LOCAL_LIB, name, and TO_UTF8.
Referenced by AltiumProjectHandler().
|
private |
Definition at line 297 of file import_proj.cpp.
References addLocalLibraries(), PCB_IO_MGR::ALTIUM_CIRCUIT_MAKER, PCB_IO_MGR::ALTIUM_CIRCUIT_STUDIO, PCB_IO_MGR::ALTIUM_DESIGNER, config, doImport(), FRAME_PCB_EDITOR, FRAME_SCH, joinSourceLibNicknames(), m_InputFile, m_properties, path, PCB_IO_MGR::SOLIDWORKS_PCB, and IMPORT_PROJ_PROPS::SOURCE_FP_LIBS.
Referenced by ImportFiles().
|
private |
Definition at line 159 of file import_proj.cpp.
References m_frame, m_properties, MAIL_IMPORT_FILE, and TO_UTF8.
Referenced by AltiumProjectHandler(), GedaProjectHandler(), ImportFiles(), ImportIndividualFile(), ImportPadsFiles(), and OrcadProjectHandler().
|
private |
Definition at line 184 of file import_proj.cpp.
References EASYEDAPRO::BuildV3ProjectIndexFromRawDocs(), PCB_IO_MGR::EASYEDAPRO_V3, IMPORT_PROJ_PROPS::JoinList(), EASYEDAPRO::V3_DOC_PARSER::Load(), m_frame, m_InputFile, m_properties, IMPORT_PROJECT_DESC::PCBId, project, EASYEDAPRO::ProjectToSelectorDialog(), EASYEDAPRO::ReadProjectOrDeviceFile(), DIALOG_IMPORT_CHOOSE_PROJECT::RunModal(), IMPORT_PROJECT_DESC::SchematicId, EASYEDAPRO::ShortenLibName(), and IMPORT_PROJ_PROPS::SOURCE_FP_LIBS.
Referenced by ImportFiles().
| void IMPORT_PROJ_HELPER::FindEmptyTargetDir | ( | ) |
Appends a new directory with the name of the project file Keep iterating until an empty directory is found.
Definition at line 67 of file import_proj.cpp.
References m_TargetProj.
Referenced by KICAD_MANAGER_FRAME::ImportNonKiCadProject().
|
private |
Definition at line 429 of file import_proj.cpp.
References _, doImport(), FRAME_PCB_EDITOR, FRAME_SCH, PCB_IO_MGR::GEDA_PCB, m_frame, m_InputFile, and m_properties.
Referenced by ImportFiles().
| void IMPORT_PROJ_HELPER::ImportFiles | ( | int | aImportedSchFileType, |
| int | aImportedPcbFileType ) |
Converts imported files to kicad type files.
Types of imported files are needed for conversion
| aImportedSchFileType | type of the imported schematic |
| aImportedPcbFileType | type of the imported PCB |
Definition at line 737 of file import_proj.cpp.
References PCB_IO_MGR::ALTIUM_DESIGNER, AltiumProjectHandler(), doImport(), PCB_IO_MGR::EASYEDAPRO, PCB_IO_MGR::EASYEDAPRO_V3, EasyEDAProProjectHandler(), FRAME_SCH, GedaProjectHandler(), ImportIndividualFile(), EASYEDAPRO::V3_DOC_PARSER::IsV3Archive(), m_InputFile, m_properties, OrcadProjectHandler(), PCB_T, SCHEMATIC_T, and setImportCacheNickname().
Referenced by KICAD_MANAGER_FRAME::ImportNonKiCadProject().
|
private |
Definition at line 95 of file import_proj.cpp.
References copied, doImport(), FRAME_PCB_EDITOR, FRAME_SCH, m_InputFile, m_pcbExtenstions, m_schExtenstions, m_TargetProj, PCB_T, and SCHEMATIC_T.
Referenced by ImportFiles(), and OrcadProjectHandler().
| void IMPORT_PROJ_HELPER::ImportPadsFiles | ( | ) |
Converts PADS ASCII schematic and PCB files to KiCad type files.
Definition at line 393 of file import_proj.cpp.
References copied, doImport(), fileType(), PADS_COMMON::FindRelatedPadsFiles(), FRAME_PCB_EDITOR, FRAME_SCH, PADS_COMMON::RELATED_FILES::HasPcb(), PADS_COMMON::RELATED_FILES::HasSchematic(), m_InputFile, m_properties, m_TargetProj, PCB_IO_MGR::PADS, PADS_COMMON::RELATED_FILES::pcbFile, and PADS_COMMON::RELATED_FILES::schematicFile.
Referenced by KICAD_MANAGER_FRAME::ImportNonKiCadProject().
|
private |
Join the basenames of the given library paths into a source-library property value.
Definition at line 259 of file import_proj.cpp.
References IMPORT_PROJ_PROPS::JoinList(), and path.
Referenced by AltiumProjectHandler().
|
private |
Imports the OrCAD schematic, then offers to import an associated Allegro board.
Definition at line 697 of file import_proj.cpp.
References _, PCB_IO_MGR::ALLEGRO, FILEEXT::AllegroPcbFilesWildcard(), doImport(), findSiblingByExt(), FRAME_PCB_EDITOR, ImportIndividualFile(), m_frame, m_InputFile, SCHEMATIC_T, KIDIALOG::SetOKCancelLabels(), and KIDIALOG::ShowModal().
Referenced by ImportFiles().
|
private |
Pre-commit one collision-free generated footprint-cache nickname into m_properties so the schematic and PCB imports agree on where residual footprints land.
Definition at line 247 of file import_proj.cpp.
References IMPORT_PROJ_PROPS::FP_CACHE_NICKNAME, m_InputFile, m_properties, m_TargetProj, and IMPORT_PROJ_PROPS::MakeCacheNickname().
Referenced by ImportFiles().
|
private |
Definition at line 71 of file import_proj.h.
|
private |
Definition at line 70 of file import_proj.h.
|
private |
Definition at line 66 of file import_proj.h.
Referenced by addLocalLibraries(), doImport(), EasyEDAProProjectHandler(), GedaProjectHandler(), IMPORT_PROJ_HELPER(), and OrcadProjectHandler().
| wxFileName IMPORT_PROJ_HELPER::m_InputFile |
Definition at line 62 of file import_proj.h.
Referenced by addLocalLibraries(), AltiumProjectHandler(), EasyEDAProProjectHandler(), GedaProjectHandler(), ImportFiles(), ImportIndividualFile(), KICAD_MANAGER_FRAME::ImportNonKiCadProject(), ImportPadsFiles(), OrcadProjectHandler(), and setImportCacheNickname().
|
private |
Definition at line 74 of file import_proj.h.
Referenced by IMPORT_PROJ_HELPER(), and ImportIndividualFile().
|
private |
Definition at line 68 of file import_proj.h.
Referenced by AltiumProjectHandler(), doImport(), EasyEDAProProjectHandler(), GedaProjectHandler(), ImportFiles(), ImportPadsFiles(), and setImportCacheNickname().
|
private |
Definition at line 73 of file import_proj.h.
Referenced by IMPORT_PROJ_HELPER(), and ImportIndividualFile().
| wxFileName IMPORT_PROJ_HELPER::m_TargetProj |
Definition at line 63 of file import_proj.h.
Referenced by FindEmptyTargetDir(), ImportIndividualFile(), KICAD_MANAGER_FRAME::ImportNonKiCadProject(), ImportPadsFiles(), and setImportCacheNickname().