KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
IMPORT_PROJ_HELPER Class Reference

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.
 

Public Attributes

wxFileName m_InputFile
 
wxFileName m_TargetProj
 

Private Member Functions

void OutputCopyError (const wxFileName &aSrc, const wxFileName &aFileCopy)
 
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 EasyEDAProProjectHandler ()
 
void AltiumProjectHandler ()
 

Private Attributes

KICAD_MANAGER_FRAMEm_frame
 
std::map< std::string, UTF8m_properties
 
std::vector< wxString > m_copiedSchPaths
 
std::vector< wxString > m_copiedPcbPaths
 
std::vector< wxString > m_schExtenstions
 
std::vector< wxString > m_pcbExtenstions
 

Detailed Description

A helper class to import non Kicad project.

Definition at line 36 of file import_proj.h.

Constructor & Destructor Documentation

◆ IMPORT_PROJ_HELPER()

IMPORT_PROJ_HELPER::IMPORT_PROJ_HELPER ( KICAD_MANAGER_FRAME aframe,
const std::vector< wxString > &  aSchFileExtensions,
const std::vector< wxString > &  aPcbFileExtensions 
)

Definition at line 53 of file import_proj.cpp.

Member Function Documentation

◆ addLocalLibraries()

void IMPORT_PROJ_HELPER::addLocalLibraries ( const std::set< wxString > &  aLibName,
FRAME_T  aFrameType 
)
private

◆ AltiumProjectHandler()

void IMPORT_PROJ_HELPER::AltiumProjectHandler ( )
private

◆ doImport()

void IMPORT_PROJ_HELPER::doImport ( const wxString &  aFile,
FRAME_T  aFrameType,
int  aImportedFileType 
)
private

◆ EasyEDAProProjectHandler()

◆ FindEmptyTargetDir()

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 62 of file import_proj.cpp.

References m_TargetProj.

Referenced by KICAD_MANAGER_FRAME::ImportNonKiCadProject().

◆ 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

Parameters
aImportedSchFileTypetype of the imported schematic
aImportedPcbFileTypetype of the imported PCB

Definition at line 310 of file import_proj.cpp.

References PCB_IO_MGR::ALTIUM_DESIGNER, AltiumProjectHandler(), PCB_IO_MGR::EASYEDAPRO, EasyEDAProProjectHandler(), ImportIndividualFile(), m_properties, PCB_T, and SCHEMATIC_T.

Referenced by KICAD_MANAGER_FRAME::ImportNonKiCadProject().

◆ ImportIndividualFile()

void IMPORT_PROJ_HELPER::ImportIndividualFile ( KICAD_T  aKicad_T,
int  aImportedFileType 
)
private

◆ OutputCopyError()

void IMPORT_PROJ_HELPER::OutputCopyError ( const wxFileName &  aSrc,
const wxFileName &  aFileCopy 
)
private

Definition at line 80 of file import_proj.cpp.

References _, and m_frame.

Member Data Documentation

◆ m_copiedPcbPaths

std::vector<wxString> IMPORT_PROJ_HELPER::m_copiedPcbPaths
private

Definition at line 66 of file import_proj.h.

◆ m_copiedSchPaths

std::vector<wxString> IMPORT_PROJ_HELPER::m_copiedSchPaths
private

Definition at line 65 of file import_proj.h.

◆ m_frame

KICAD_MANAGER_FRAME* IMPORT_PROJ_HELPER::m_frame
private

◆ m_InputFile

wxFileName IMPORT_PROJ_HELPER::m_InputFile

◆ m_pcbExtenstions

std::vector<wxString> IMPORT_PROJ_HELPER::m_pcbExtenstions
private

Definition at line 69 of file import_proj.h.

Referenced by ImportIndividualFile().

◆ m_properties

std::map<std::string, UTF8> IMPORT_PROJ_HELPER::m_properties
private

◆ m_schExtenstions

std::vector<wxString> IMPORT_PROJ_HELPER::m_schExtenstions
private

Definition at line 68 of file import_proj.h.

Referenced by ImportIndividualFile().

◆ m_TargetProj

wxFileName IMPORT_PROJ_HELPER::m_TargetProj

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