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 wxString &aFile, const wxString &aSchFileExtension, const wxString &aPcbFileExtension) | |
const wxFileName & | GetProj () |
wxString | GetProjPath () |
void | SetProjPath (const wxString aPath) |
wxString | GetProjFullPath () |
wxString | GetProjName () |
void | CreateEmptyDirForProject () |
Appends a new directory with the name of the project file Keep iterating until an empty directory is found. More... | |
void | SetProjAbsolutePath () |
bool | CopyImportedFiles (bool displayError=true) |
Copies project files to the destination directory. More... | |
void | AssociateFilesWithProj (int aImportedSchFileType, int aImportedPcbFileType) |
Converts imported files to kicad type files. More... | |
Private Member Functions | |
bool | CopyImportedFile (KICAD_T aKicad_T, bool displayError=true) |
void | OutputCopyError (const wxFileName &aSrc, const wxFileName &aFileCopy) |
void | AssociateFileWithProj (KICAD_T aKicad_T, int aImportedFileType) |
Private Attributes | |
KICAD_MANAGER_FRAME * | m_frame |
wxFileName | m_sch |
wxFileName | m_shCopy |
wxFileName | m_pcb |
wxFileName | m_pcbCopy |
wxFileName | m_pro |
A helper class to import non Kicad project.
Definition at line 11 of file import_proj.h.
IMPORT_PROJ_HELPER::IMPORT_PROJ_HELPER | ( | KICAD_MANAGER_FRAME * | aframe, |
const wxString & | aFile, | ||
const wxString & | aSchFileExtension, | ||
const wxString & | aPcbFileExtension | ||
) |
Definition at line 31 of file import_proj.cpp.
References m_pcb, m_pro, m_sch, and ProjectFileExtension.
void IMPORT_PROJ_HELPER::AssociateFilesWithProj | ( | 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 202 of file import_proj.cpp.
References AssociateFileWithProj(), PCB_T, and SCHEMATIC_T.
Referenced by KICAD_MANAGER_CONTROL::ImportNonKicadProj(), and KICAD_MANAGER_FRAME::ImportNonKiCadProject().
|
private |
Definition at line 158 of file import_proj.cpp.
References KIWAY::ExpressMail(), FRAME_PCB_EDITOR, FRAME_SCH, KIWAY_HOLDER::Kiway(), m_frame, m_pcb, m_pcbCopy, m_sch, m_shCopy, MAIL_IMPORT_FILE, PCB_T, KIWAY::Player(), SCHEMATIC_T, StrPrintf(), and TO_UTF8.
Referenced by AssociateFilesWithProj().
|
private |
Definition at line 100 of file import_proj.cpp.
References m_pcb, m_pcbCopy, m_pro, m_sch, m_shCopy, OutputCopyError(), PCB_T, ProjectFileExtension, and SCHEMATIC_T.
Referenced by CopyImportedFiles().
bool IMPORT_PROJ_HELPER::CopyImportedFiles | ( | bool | displayError = true | ) |
Copies project files to the destination directory.
displayError | calls OutputCopyError() if true |
Definition at line 140 of file import_proj.cpp.
References CopyImportedFile(), PCB_T, and SCHEMATIC_T.
Referenced by KICAD_MANAGER_CONTROL::ImportNonKicadProj(), and KICAD_MANAGER_FRAME::ImportNonKiCadProject().
void IMPORT_PROJ_HELPER::CreateEmptyDirForProject | ( | ) |
Appends a new directory with the name of the project file Keep iterating until an empty directory is found.
Definition at line 74 of file import_proj.cpp.
References Format(), and m_pro.
Referenced by KICAD_MANAGER_CONTROL::ImportNonKicadProj(), and KICAD_MANAGER_FRAME::ImportNonKiCadProject().
const wxFileName & IMPORT_PROJ_HELPER::GetProj | ( | ) |
Definition at line 44 of file import_proj.cpp.
References m_pro.
Referenced by KICAD_MANAGER_CONTROL::ImportNonKicadProj(), and KICAD_MANAGER_FRAME::ImportNonKiCadProject().
wxString IMPORT_PROJ_HELPER::GetProjFullPath | ( | ) |
Definition at line 62 of file import_proj.cpp.
References m_pro.
Referenced by KICAD_MANAGER_CONTROL::ImportNonKicadProj(), and KICAD_MANAGER_FRAME::ImportNonKiCadProject().
wxString IMPORT_PROJ_HELPER::GetProjName | ( | ) |
wxString IMPORT_PROJ_HELPER::GetProjPath | ( | ) |
Definition at line 50 of file import_proj.cpp.
References m_pro.
Referenced by KICAD_MANAGER_CONTROL::ImportNonKicadProj(), and KICAD_MANAGER_FRAME::ImportNonKiCadProject().
|
private |
Definition at line 145 of file import_proj.cpp.
Referenced by CopyImportedFile().
void IMPORT_PROJ_HELPER::SetProjAbsolutePath | ( | ) |
Definition at line 92 of file import_proj.cpp.
References m_pro, and ProjectFileExtension.
Referenced by KICAD_MANAGER_CONTROL::ImportNonKicadProj(), and KICAD_MANAGER_FRAME::ImportNonKiCadProject().
void IMPORT_PROJ_HELPER::SetProjPath | ( | const wxString | aPath | ) |
Definition at line 56 of file import_proj.cpp.
References m_pro.
Referenced by KICAD_MANAGER_FRAME::ImportNonKiCadProject().
|
private |
Definition at line 45 of file import_proj.h.
Referenced by AssociateFileWithProj(), and OutputCopyError().
|
private |
Definition at line 48 of file import_proj.h.
Referenced by AssociateFileWithProj(), CopyImportedFile(), and IMPORT_PROJ_HELPER().
|
private |
Definition at line 49 of file import_proj.h.
Referenced by AssociateFileWithProj(), and CopyImportedFile().
|
private |
Definition at line 50 of file import_proj.h.
Referenced by CopyImportedFile(), CreateEmptyDirForProject(), GetProj(), GetProjFullPath(), GetProjName(), GetProjPath(), IMPORT_PROJ_HELPER(), SetProjAbsolutePath(), and SetProjPath().
|
private |
Definition at line 46 of file import_proj.h.
Referenced by AssociateFileWithProj(), CopyImportedFile(), and IMPORT_PROJ_HELPER().
|
private |
Definition at line 47 of file import_proj.h.
Referenced by AssociateFileWithProj(), and CopyImportedFile().