KiCad PCB EDA Suite
Loading...
Searching...
No Matches
import_proj.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef IMPORT_PROJ_H
21#define IMPORT_PROJ_H
22
23#include <wx/filename.h>
24#include <core/typeinfo.h>
25#include <core/utf8.h>
26#include <frame_type.h>
27
28#include <map>
29#include <set>
30
32
37{
38public:
40 const std::vector<wxString>& aSchFileExtensions,
41 const std::vector<wxString>& aPcbFileExtensions );
42
47 void FindEmptyTargetDir();
48
55 void ImportFiles( int aImportedSchFileType, int aImportedPcbFileType );
56
57 wxFileName m_InputFile;
58 wxFileName m_TargetProj;
59
60private:
62
63 std::map<std::string, UTF8> m_properties;
64
65 std::vector<wxString> m_copiedSchPaths;
66 std::vector<wxString> m_copiedPcbPaths;
67
68 std::vector<wxString> m_schExtenstions;
69 std::vector<wxString> m_pcbExtenstions;
70
71 void OutputCopyError( const wxFileName& aSrc, const wxFileName& aFileCopy );
72 void ImportIndividualFile( KICAD_T aKicad_T, int aImportedFileType );
73
74 void doImport( const wxString& aFile, FRAME_T aFrameType, int aImportedFileType );
75
76 void addLocalLibraries( const std::set<wxString>& aLibName, FRAME_T aFrameType );
77
79
81};
82
83#endif
A helper class to import non Kicad project.
Definition: import_proj.h:37
wxFileName m_TargetProj
Definition: import_proj.h:58
void EasyEDAProProjectHandler()
std::vector< wxString > m_copiedSchPaths
Definition: import_proj.h:65
std::map< std::string, UTF8 > m_properties
Definition: import_proj.h:63
void FindEmptyTargetDir()
Appends a new directory with the name of the project file Keep iterating until an empty directory is ...
Definition: import_proj.cpp:62
std::vector< wxString > m_pcbExtenstions
Definition: import_proj.h:69
KICAD_MANAGER_FRAME * m_frame
Definition: import_proj.h:61
void ImportFiles(int aImportedSchFileType, int aImportedPcbFileType)
Converts imported files to kicad type files.
std::vector< wxString > m_copiedPcbPaths
Definition: import_proj.h:66
void OutputCopyError(const wxFileName &aSrc, const wxFileName &aFileCopy)
Definition: import_proj.cpp:80
void addLocalLibraries(const std::set< wxString > &aLibName, FRAME_T aFrameType)
void ImportIndividualFile(KICAD_T aKicad_T, int aImportedFileType)
wxFileName m_InputFile
Definition: import_proj.h:57
std::vector< wxString > m_schExtenstions
Definition: import_proj.h:68
void doImport(const wxString &aFile, FRAME_T aFrameType, int aImportedFileType)
The main KiCad project manager frame.
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition: frame_type.h:33
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78