KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 EasyEDAProProjectHandler ()
 

Private Attributes

KICAD_MANAGER_FRAMEm_frame
 
STRING_UTF8_MAP m_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 13 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 44 of file import_proj.cpp.

Member Function Documentation

◆ 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 53 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 207 of file import_proj.cpp.

References 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 71 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 43 of file import_proj.h.

◆ m_copiedSchPaths

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

Definition at line 42 of file import_proj.h.

◆ m_frame

KICAD_MANAGER_FRAME* IMPORT_PROJ_HELPER::m_frame
private

Definition at line 38 of file import_proj.h.

Referenced by EasyEDAProProjectHandler(), ImportIndividualFile(), and OutputCopyError().

◆ m_InputFile

wxFileName IMPORT_PROJ_HELPER::m_InputFile

◆ m_pcbExtenstions

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

Definition at line 46 of file import_proj.h.

Referenced by ImportIndividualFile().

◆ m_properties

STRING_UTF8_MAP IMPORT_PROJ_HELPER::m_properties
private

Definition at line 40 of file import_proj.h.

Referenced by EasyEDAProProjectHandler(), ImportFiles(), and ImportIndividualFile().

◆ m_schExtenstions

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

Definition at line 45 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: