Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
ba689c10
Commit
ba689c10
authored
Feb 16, 2012
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kicad project manager: add .cmp, .drl .pos and .rpt files management.
Code cleaning and other minor fixes.
parent
35ddad21
Changes
33
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
396 additions
and
96 deletions
+396
-96
CMakeLists.txt
common/CMakeLists.txt
+1
-0
basicframe.cpp
common/basicframe.cpp
+1
-1
common.cpp
common/common.cpp
+0
-19
projet_config.cpp
common/projet_config.cpp
+2
-0
wildcards_and_files_ext.cpp
common/wildcards_and_files_ext.cpp
+61
-0
cfg.cpp
cvpcb/cfg.cpp
+1
-0
cvframe.cpp
cvpcb/cvframe.cpp
+1
-1
cvpcb.cpp
cvpcb/cvpcb.cpp
+0
-4
cvpcb.h
cvpcb/cvpcb.h
+0
-2
dialog_cvpcb_config.cpp
cvpcb/dialogs/dialog_cvpcb_config.cpp
+29
-7
readwrite_dlgs.cpp
cvpcb/readwrite_dlgs.cpp
+1
-0
eeschema.cpp
eeschema/eeschema.cpp
+1
-0
eeschema_config.cpp
eeschema/eeschema_config.cpp
+24
-0
files-io.cpp
eeschema/files-io.cpp
+1
-0
netlist_control.cpp
eeschema/netlist_control.cpp
+2
-1
schframe.cpp
eeschema/schframe.cpp
+1
-0
sheet.cpp
eeschema/sheet.cpp
+1
-0
files.cpp
gerbview/files.cpp
+27
-4
common.h
include/common.h
+0
-26
wildcards_and_files_ext.h
include/wildcards_and_files_ext.h
+71
-0
class_treeprojectfiles.cpp
kicad/class_treeprojectfiles.cpp
+5
-1
kicad.cpp
kicad/kicad.cpp
+27
-1
kicad.h
kicad/kicad.h
+10
-6
mainframe.cpp
kicad/mainframe.cpp
+24
-3
prjconfig.cpp
kicad/prjconfig.cpp
+25
-0
tree_project_frame.cpp
kicad/tree_project_frame.cpp
+41
-4
dialog_netlist.cpp
pcbnew/dialogs/dialog_netlist.cpp
+1
-0
dialog_pcbnew_config_libs_and_paths.cpp
pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp
+30
-6
files.cpp
pcbnew/files.cpp
+1
-0
gen_modules_placefile.cpp
pcbnew/gen_modules_placefile.cpp
+2
-1
gendrill.cpp
pcbnew/gendrill.cpp
+3
-7
pcbnew.cpp
pcbnew/pcbnew.cpp
+1
-0
pcbnew_config.cpp
pcbnew/pcbnew_config.cpp
+1
-2
No files found.
common/CMakeLists.txt
View file @
ba689c10
...
...
@@ -71,6 +71,7 @@ set(COMMON_SRCS
selcolor.cpp
string.cpp
trigo.cpp
wildcards_and_files_ext.cpp
worksheet.cpp
wxwineda.cpp
xnode.cpp
...
...
common/basicframe.cpp
View file @
ba689c10
...
...
@@ -336,7 +336,7 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
wxString
tmp
=
wxGetApp
().
GetHelpFileName
();
// Search for "getting_started_in_kicad.pdf" or "Getting_Started_in_KiCad.pdf"
wxGetApp
().
GetHelpFileName
()
=
wxT
(
"getting_started_in_kicad.pdf"
);
wxGetApp
().
SetHelpFileName
(
wxT
(
"getting_started_in_kicad.pdf"
)
);
wxString
helpFile
=
wxGetApp
().
GetHelpFile
();
if
(
!
helpFile
)
...
...
common/common.cpp
View file @
ba689c10
...
...
@@ -46,25 +46,6 @@
* application class.
*/
const
wxString
ProjectFileExtension
(
wxT
(
"pro"
)
);
const
wxString
SchematicFileExtension
(
wxT
(
"sch"
)
);
const
wxString
NetlistFileExtension
(
wxT
(
"net"
)
);
const
wxString
GerberFileExtension
(
wxT
(
"pho"
)
);
const
wxString
PcbFileExtension
(
wxT
(
"brd"
)
);
const
wxString
PdfFileExtension
(
wxT
(
"pdf"
)
);
const
wxString
MacrosFileExtension
(
wxT
(
"mcr"
)
);
const
wxString
ProjectFileWildcard
(
_
(
"KiCad project files (*.pro)|*.pro"
)
);
const
wxString
SchematicFileWildcard
(
_
(
"KiCad schematic files (*.sch)|*.sch"
)
);
const
wxString
NetlistFileWildcard
(
_
(
"KiCad netlist files (*.net)|*.net"
)
);
const
wxString
GerberFileWildcard
(
_
(
"Gerber files (*.pho)|*.pho"
)
);
const
wxString
PcbFileWildcard
(
_
(
"KiCad printed circuit board files (*.brd)|*.brd"
)
);
const
wxString
PdfFileWildcard
(
_
(
"Portable document format files (*.pdf)|*.pdf"
)
);
const
wxString
MacrosFileWildcard
(
_
(
"KiCad recorded macros (*.mcr)|*.mcr"
)
);
const
wxString
AllFilesWildcard
(
_
(
"All files (*)|*"
)
);
wxString
g_ProductName
=
wxT
(
"KiCad E.D.A. "
);
bool
g_ShowPageLimits
=
true
;
wxString
g_UserLibDirBuffer
;
...
...
common/projet_config.cpp
View file @
ba689c10
...
...
@@ -14,6 +14,8 @@
#include <wx/apptrait.h>
#include <wx/stdpaths.h>
#include <wildcards_and_files_ext.h>
#include <boost/foreach.hpp>
...
...
common/wildcards_and_files_ext.cpp
0 → 100644
View file @
ba689c10
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 20012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2008-2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file wildcards_and_files_ext.cpp
*/
#include <wildcards_and_files_ext.h>
/**
* file extensions and wildcards used in kicad.
*/
const
wxString
ProjectFileExtension
(
wxT
(
"pro"
)
);
const
wxString
SchematicFileExtension
(
wxT
(
"sch"
)
);
const
wxString
NetlistFileExtension
(
wxT
(
"net"
)
);
const
wxString
ComponentFileExtension
(
wxT
(
"cmp"
)
);
const
wxString
GerberFileExtension
(
wxT
(
"pho"
)
);
const
wxString
PcbFileExtension
(
wxT
(
"brd"
)
);
const
wxString
PdfFileExtension
(
wxT
(
"pdf"
)
);
const
wxString
MacrosFileExtension
(
wxT
(
"mcr"
)
);
const
wxString
DrillFileExtension
(
wxT
(
"drl"
)
);
const
wxString
ReportFileExtension
(
wxT
(
"rpt"
)
);
const
wxString
FootprintPlaceFileExtension
(
wxT
(
"pos"
)
);
const
wxString
ProjectFileWildcard
(
_
(
"KiCad project files (*.pro)|*.pro"
)
);
const
wxString
SchematicFileWildcard
(
_
(
"KiCad schematic files (*.sch)|*.sch"
)
);
const
wxString
NetlistFileWildcard
(
_
(
"KiCad netlist files (*.net)|*.net"
)
);
const
wxString
GerberFileWildcard
(
_
(
"Gerber files (*.pho)|*.pho"
)
);
const
wxString
PcbFileWildcard
(
_
(
"KiCad printed circuit board files (*.brd)|*.brd"
)
);
const
wxString
PdfFileWildcard
(
_
(
"Portable document format files (*.pdf)|*.pdf"
)
);
const
wxString
MacrosFileWildcard
(
_
(
"KiCad recorded macros (*.mcr)|*.mcr"
)
);
const
wxString
AllFilesWildcard
(
_
(
"All files (*)|*"
)
);
// Wildcard for cvpcb component to footprint link file
const
wxString
ComponentFileWildcard
(
_
(
"KiCad cmp/footprint link files (*.cmp)|*.cmp"
)
);
const
wxString
DrillFileWildcard
(
_
(
"Drill files (*.drl)|*.drl;*.DRL"
)
);
const
wxString
ReportFileWildcard
=
_
(
"Report files (*.rpt)|*.rpt"
);
const
wxString
FootprintPlaceFileWildcard
=
_
(
"Footprint place files (*.pos)|*.pos"
);
cvpcb/cfg.cpp
View file @
ba689c10
...
...
@@ -10,6 +10,7 @@
#include <param_config.h>
#include <cvpcb.h>
#include <cvpcb_mainframe.h>
#include <wildcards_and_files_ext.h>
#define GROUP wxT("/cvpcb")
...
...
cvpcb/cvframe.cpp
View file @
ba689c10
...
...
@@ -41,7 +41,7 @@
#include <class_DisplayFootprintsFrame.h>
#include <cvpcb_id.h>
#include <html_messagebox.h>
#include <wildcards_and_files_ext.h>
#include <build_version.h>
...
...
cvpcb/cvpcb.cpp
View file @
ba689c10
...
...
@@ -23,7 +23,6 @@
COLORS_DESIGN_SETTINGS
g_ColorsSettings
;
/* Constant string definitions for CvPcb */
const
wxString
ComponentFileExtension
(
wxT
(
"cmp"
)
);
const
wxString
RetroFileExtension
(
wxT
(
"stf"
)
);
const
wxString
FootprintAliasFileExtension
(
wxT
(
"equ"
)
);
...
...
@@ -31,9 +30,6 @@ const wxString FootprintAliasFileExtension( wxT( "equ" ) );
const
wxString
RetroFileWildcard
(
_
(
"KiCad retroannotation files (*.stf)|*.stf"
)
);
const
wxString
FootprintAliasFileWildcard
(
_
(
"KiCad footprint alias files (*.equ)|*.equ"
)
);
// Wildcard for cvpcb component to footprint link file ( normal output file )
const
wxString
ComponentFileWildcard
(
_
(
"KiCad cmp/footprint link files (*.cmp)|*.cmp"
)
);
const
wxString
titleLibLoadError
(
_
(
"Library Load Error"
)
);
...
...
cvpcb/cvpcb.h
View file @
ba689c10
...
...
@@ -25,11 +25,9 @@ typedef boost::ptr_vector< COMPONENT_INFO > COMPONENT_LIST;
extern
const
wxString
FootprintAliasFileExtension
;
extern
const
wxString
RetroFileExtension
;
extern
const
wxString
ComponentFileExtension
;
extern
const
wxString
RetroFileWildcard
;
extern
const
wxString
FootprintAliasFileWildcard
;
extern
const
wxString
ComponentFileWildcard
;
extern
const
wxString
titleLibLoadError
;
...
...
cvpcb/dialogs/dialog_cvpcb_config.cpp
View file @
ba689c10
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_cvpcb_config.cpp
// Author: jean-pierre Charras
// Licence: gpl
/////////////////////////////////////////////////////////////////////////////
/**
* @file dialog_cvpcb_config.cpp
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <wx/tokenzr.h>
...
...
@@ -16,9 +39,8 @@
#include <cvpcb.h>
#include <cvpcb_mainframe.h>
#include <protos.h>
#include <dialog_cvpcb_config.h>
#include <wildcards_and_files_ext.h>
DIALOG_CVPCB_CONFIG
::
DIALOG_CVPCB_CONFIG
(
CVPCB_MAINFRAME
*
parent
)
:
...
...
cvpcb/readwrite_dlgs.cpp
View file @
ba689c10
...
...
@@ -35,6 +35,7 @@
#include <cvpcb.h>
#include <cvpcb_mainframe.h>
#include <cvstruct.h>
#include <wildcards_and_files_ext.h>
#define titleComponentLibErr _( "Component Library Error" )
...
...
eeschema/eeschema.cpp
View file @
ba689c10
...
...
@@ -41,6 +41,7 @@
#include <hotkeys.h>
#include <dialogs/dialog_color_config.h>
#include <transform.h>
#include <wildcards_and_files_ext.h>
#include <wx/snglinst.h>
...
...
eeschema/eeschema_config.cpp
View file @
ba689c10
...
...
@@ -2,6 +2,29 @@
* @file eeschema_config.cpp
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <class_drawpanel.h>
...
...
@@ -26,6 +49,7 @@
#include <dialogs/dialog_eeschema_options.h>
#include <dialogs/dialog_schematic_find.h>
#include <wildcards_and_files_ext.h>
#define HOTKEY_FILENAME wxT( "eeschema" )
...
...
eeschema/files-io.cpp
View file @
ba689c10
...
...
@@ -39,6 +39,7 @@
#include <class_library.h>
#include <libeditframe.h>
#include <sch_sheet.h>
#include <wildcards_and_files_ext.h>
bool
SCH_EDIT_FRAME
::
SaveEEFile
(
SCH_SCREEN
*
aScreen
,
int
aSaveType
,
bool
aCreateBackupFile
)
...
...
eeschema/netlist_control.cpp
View file @
ba689c10
...
...
@@ -51,7 +51,8 @@
#include <dialog_helpers.h>
#include <netlist_control.h>
#include <dialogs/annotate_dialog.h>
#include <wildcards_and_files_ext.h>
#include <wildcards_and_files_ext.h>
//Imported function:
...
...
eeschema/schframe.cpp
View file @
ba689c10
...
...
@@ -63,6 +63,7 @@
#include <wx/display.h>
#include <build_version.h>
#include <wildcards_and_files_ext.h>
...
...
eeschema/sheet.cpp
View file @
ba689c10
...
...
@@ -37,6 +37,7 @@
#include <sch_sheet.h>
#include <dialogs/dialog_sch_sheet_props.h>
#include <wildcards_and_files_ext.h>
bool
SCH_EDIT_FRAME
::
EditSheet
(
SCH_SHEET
*
aSheet
,
wxDC
*
aDC
)
...
...
gerbview/files.cpp
View file @
ba689c10
...
...
@@ -2,6 +2,30 @@
* @file gerbview/files.cpp
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <common.h>
#include <class_drawpanel.h>
...
...
@@ -11,6 +35,7 @@
#include <gerbview.h>
#include <gerbview_id.h>
#include <class_gerbview_layer_widget.h>
#include <wildcards_and_files_ext.h>
void
GERBVIEW_FRAME
::
OnGbrFileHistory
(
wxCommandEvent
&
event
)
...
...
@@ -192,12 +217,10 @@ bool GERBVIEW_FRAME::LoadExcellonFiles( const wxString& aFullFileName )
if
(
!
filename
.
IsOk
()
)
{
filetypes
=
_
(
"Drill files (.drl)"
);
filetypes
<<
wxT
(
"|"
);
filetypes
+=
wxT
(
";*.drl;*.DRL"
);
filetypes
=
wxGetTranslation
(
DrillFileWildcard
);
filetypes
<<
wxT
(
"|"
);
/* All filetypes */
filetypes
+=
AllFilesWildcard
;
filetypes
+=
wxGetTranslation
(
AllFilesWildcard
)
;
/* Use the current working directory if the file name path does not exist. */
if
(
filename
.
DirExists
()
)
...
...
include/common.h
View file @
ba689c10
...
...
@@ -275,32 +275,6 @@ extern wxString g_UserLibDirBuffer;
extern
bool
g_ShowPageLimits
;
///< true to display the page limits
/**
* File extension definitions. Please do not changes these. If a different
* file extension is needed, create a new definition in the application.
* Please note, just because they are defined as const doesn't guarantee
* that they cannot be changed.
*/
extern
const
wxString
ProjectFileExtension
;
extern
const
wxString
SchematicFileExtension
;
extern
const
wxString
NetlistFileExtension
;
extern
const
wxString
GerberFileExtension
;
extern
const
wxString
PcbFileExtension
;
extern
const
wxString
PdfFileExtension
;
extern
const
wxString
MacrosFileExtension
;
/// Proper wxFileDialog wild card definitions.
extern
const
wxString
ProjectFileWildcard
;
extern
const
wxString
SchematicFileWildcard
;
extern
const
wxString
BoardFileWildcard
;
extern
const
wxString
NetlistFileWildcard
;
extern
const
wxString
GerberFileWildcard
;
extern
const
wxString
PcbFileWildcard
;
extern
const
wxString
PdfFileWildcard
;
extern
const
wxString
MacrosFileWildcard
;
extern
const
wxString
AllFilesWildcard
;
/// Name of default configuration file. (kicad.pro)
extern
wxString
g_Prj_Default_Config_FullFilename
;
...
...
include/wildcards_and_files_ext.h
0 → 100644
View file @
ba689c10
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 20012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2007-2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2008-2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* The common library
* @file wildcards_and_files_ext.h
*/
#ifndef INCLUDE_WILDCARDS_AND_FILES_EXT_H_
#define INCLUDE_WILDCARDS_AND_FILES_EXT_H_
#include <wx/wx.h>
/**
* File extension definitions. Please do not changes these. If a different
* file extension is needed, create a new definition in the application.
* Please note, just because they are defined as const doesn't guarantee
* that they cannot be changed.
* Mainly wild cards are most of time translated when displayed
*/
extern
const
wxString
ProjectFileExtension
;
extern
const
wxString
SchematicFileExtension
;
extern
const
wxString
NetlistFileExtension
;
extern
const
wxString
GerberFileExtension
;
extern
const
wxString
PcbFileExtension
;
extern
const
wxString
PdfFileExtension
;
extern
const
wxString
MacrosFileExtension
;
extern
const
wxString
ComponentFileExtension
;
extern
const
wxString
DrillFileExtension
;
extern
const
wxString
ReportFileExtension
;
extern
const
wxString
FootprintPlaceFileExtension
;
/// Proper wxFileDialog wild card definitions.
extern
const
wxString
ProjectFileWildcard
;
extern
const
wxString
SchematicFileWildcard
;
extern
const
wxString
BoardFileWildcard
;
extern
const
wxString
NetlistFileWildcard
;
extern
const
wxString
GerberFileWildcard
;
extern
const
wxString
PcbFileWildcard
;
extern
const
wxString
PdfFileWildcard
;
extern
const
wxString
MacrosFileWildcard
;
extern
const
wxString
AllFilesWildcard
;
extern
const
wxString
ComponentFileWildcard
;
extern
const
wxString
DrillFileWildcard
;
extern
const
wxString
ReportFileWildcard
;
extern
const
wxString
FootprintPlaceFileWildcard
;
#endif // INCLUDE_WILDCARDS_AND_FILES_EXT_H_
kicad/class_treeprojectfiles.cpp
View file @
ba689c10
...
...
@@ -41,9 +41,13 @@ TREEPROJECTFILES::TREEPROJECTFILES( TREE_PROJECT_FRAME* parent ) :
m_ImageList
->
Add
(
KiBitmap
(
icon_gerbview_small_xpm
)
);
// TREE_GERBER
m_ImageList
->
Add
(
KiBitmap
(
datasheet_xpm
)
);
// TREE_PDF
m_ImageList
->
Add
(
KiBitmap
(
icon_txt_xpm
)
);
// TREE_TXT
m_ImageList
->
Add
(
KiBitmap
(
icon_cvpcb_small_xpm
)
);
// TREE_NET
m_ImageList
->
Add
(
KiBitmap
(
netlist_xpm
)
);
// TREE_NET
m_ImageList
->
Add
(
KiBitmap
(
unknown_xpm
)
);
// TREE_UNKNOWN
m_ImageList
->
Add
(
KiBitmap
(
directory_xpm
)
);
// TREE_DIRECTORY
m_ImageList
->
Add
(
KiBitmap
(
icon_cvpcb_small_xpm
)
);
// TREE_CMP_LINK
m_ImageList
->
Add
(
KiBitmap
(
tools_xpm
)
);
// TREE_REPORT
m_ImageList
->
Add
(
KiBitmap
(
post_compo_xpm
)
);
// TREE_POS
m_ImageList
->
Add
(
KiBitmap
(
post_drill_xpm
)
);
// TREE_DRILL
SetImageList
(
m_ImageList
);
}
...
...
kicad/kicad.cpp
View file @
ba689c10
/**
* @file kicad.cpp
* @brief Main KiCad
library
manager file
* @brief Main KiCad
Project
manager file
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004-2012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <appl_wxstruct.h>
...
...
@@ -14,6 +39,7 @@
#include <kicad.h>
#include <tree_project_frame.h>
#include <wildcards_and_files_ext.h>
#include <build_version.h>
...
...
kicad/kicad.h
View file @
ba689c10
...
...
@@ -156,14 +156,18 @@ public: KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title,
// please update both
enum
TreeFileType
{
TREE_PROJECT
=
1
,
TREE_SCHEMA
,
TREE_PCB
,
TREE_GERBER
,
TREE_PDF
,
TREE_TXT
,
TREE_NET
,
TREE_SCHEMA
,
// Schematic file (.sch)
TREE_PCB
,
// board file (.brd)
TREE_GERBER
,
// Gerber file (.pho, .g*)
TREE_PDF
,
// PDF file (.pdf)
TREE_TXT
,
// ascii text file (.txt)
TREE_NET
,
// netlist file (.net)
TREE_UNKNOWN
,
TREE_DIRECTORY
,
TREE_CMP_LINK
,
// cmp/footprint link file (.cmp)
TREE_REPORT
,
// report file (.rpt)
TREE_FP_PLACE
,
// fooprints position (place) file (.pos)
TREE_DRILL
,
// Excellon drill file (.drl)
TREE_MAX
};
...
...
kicad/mainframe.cpp
View file @
ba689c10
...
...
@@ -3,9 +3,29 @@
* @brief KICAD_MANAGER_FRAME is the KiCad main frame.
*/
#ifdef __GNUG__
#pragma implementation
#endif
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <appl_wxstruct.h>
...
...
@@ -15,6 +35,7 @@
#include <kicad.h>
#include <tree_project_frame.h>
#include <wildcards_and_files_ext.h>
static
const
wxString
TreeFrameWidthEntry
(
wxT
(
"LeftWinWidth"
)
);
...
...
kicad/prjconfig.cpp
View file @
ba689c10
...
...
@@ -3,6 +3,30 @@
* Load and save project configuration files (*.pro)
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004-2012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <confirm.h>
...
...
@@ -10,6 +34,7 @@
#include <prjconfig.h>
#include <kicad.h>
#include <tree_project_frame.h>
#include <wildcards_and_files_ext.h>
#include <build_version.h>
...
...
kicad/tree_project_frame.cpp
View file @
ba689c10
...
...
@@ -13,6 +13,7 @@
#include <tree_project_frame.h>
#include <class_treeprojectfiles.h>
#include <class_treeproject_item.h>
#include <wildcards_and_files_ext.h>
#include <wx/regex.h>
#include <wx/dir.h>
...
...
@@ -37,10 +38,10 @@ const wxChar* s_AllowedExtensionsToList[] =
{
wxT
(
"^.*
\\
.pro$"
),
wxT
(
"^.*
\\
.pdf$"
),
wxT
(
"^[^$].*
\\
.brd$"
),
wxT
(
"^[^$].*
\\
.brd$"
),
// Pcbnew files
wxT
(
"^.*
\\
.net$"
),
wxT
(
"^.*
\\
.txt$"
),
wxT
(
"^.*
\\
.pho$"
),
// Gerber file
wxT
(
"^.*
\\
.pho$"
),
// Gerber file
(Kicad extension)
wxT
(
"^.*
\\
.gbr$"
),
// Gerber file
wxT
(
"^.*
\\
.gb[alops]$"
),
// Gerber back (or bottom) layer file
wxT
(
"^.*
\\
.gt[alops]$"
),
// Gerber front (or top) layer file
...
...
@@ -49,8 +50,10 @@ const wxChar* s_AllowedExtensionsToList[] =
wxT
(
"^.*
\\
.sxw$"
),
wxT
(
"^.*
\\
.htm$"
),
wxT
(
"^.*
\\
.html$"
),
wxT
(
"^.*
\\
.rpt$"
),
wxT
(
"^.*
\\
.csv$"
),
wxT
(
"^.*
\\
.rpt$"
),
// Report files
wxT
(
"^.*
\\
.csv$"
),
// Report files in comma separateed format
wxT
(
"^.*
\\
.pos$"
),
// Footprint position files
wxT
(
"^.*
\\
.cmp$"
),
// Cvpcb cmp/footprint link files
wxT
(
"^.*
\\
.drl$"
),
// Excellon drill files
NULL
// end of list
};
...
...
@@ -440,6 +443,23 @@ wxString TREE_PROJECT_FRAME::GetFileExt( TreeFileType type )
case
TREE_NET
:
ext
=
NetlistFileExtension
;
break
;
case
TREE_CMP_LINK
:
ext
=
ComponentFileExtension
;
break
;
case
TREE_REPORT
:
ext
=
ReportFileExtension
;
break
;
case
TREE_FP_PLACE
:
ext
=
FootprintPlaceFileExtension
;
break
;
case
TREE_DRILL
:
ext
=
DrillFileExtension
;
break
;
default
:
/* Eliminates unnecessary GCC warning. */
break
;
}
...
...
@@ -483,6 +503,23 @@ wxString TREE_PROJECT_FRAME::GetFileWildcard( TreeFileType type )
case
TREE_NET
:
ext
=
NetlistFileWildcard
;
break
;
case
TREE_CMP_LINK
:
ext
=
ComponentFileWildcard
;
break
;
case
TREE_REPORT
:
ext
=
ReportFileWildcard
;
break
;
case
TREE_FP_PLACE
:
ext
=
FootprintPlaceFileWildcard
;
break
;
case
TREE_DRILL
:
ext
=
DrillFileWildcard
;
break
;
default
:
/* Eliminates unnecessary GCC warning. */
break
;
}
...
...
pcbnew/dialogs/dialog_netlist.cpp
View file @
ba689c10
...
...
@@ -14,6 +14,7 @@
#include <pcbnew_config.h>
#include <class_board_design_settings.h>
#include <wildcards_and_files_ext.h>
#include <dialog_netlist.h>
...
...
pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp
View file @
ba689c10
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_pcbnew_config_libs_and_paths.cpp
// Author: jean-pierre Charras
// Created: 2009 apr 18
// Licence: GPL
/////////////////////////////////////////////////////////////////////////////
/**
* @file ^pcbnew/dialogs/dialog_pcbnew_config_libs_and_paths.cpp
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004-2012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* Handle the Pcbnew library config (library list, and default lib path)
*/
...
...
@@ -17,6 +40,7 @@
#include <macros.h>
#include <wxPcbStruct.h>
#include <pcbcommon.h>
#include <wildcards_and_files_ext.h>
#include <dialog_pcbnew_config_libs_and_paths.h>
...
...
pcbnew/files.cpp
View file @
ba689c10
...
...
@@ -45,6 +45,7 @@
#include <protos.h>
#include <pcbnew_id.h>
#include <io_mgr.h>
#include <wildcards_and_files_ext.h>
#include <class_board.h>
#include <build_version.h> // BOARD_FILE_VERSION
...
...
pcbnew/gen_modules_placefile.cpp
View file @
ba689c10
...
...
@@ -45,6 +45,7 @@
#include <pcbnew.h>
#include <pcb_plot_params.h>
#include <wildcards_and_files_ext.h>
#include <dialog_gen_module_position_file_base.h>
...
...
@@ -207,7 +208,7 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
else
fn
.
SetName
(
fn
.
GetName
()
+
wxT
(
"_"
)
+
frontLayerName
);
fn
.
SetExt
(
wxT
(
"pos"
)
);
fn
.
SetExt
(
FootprintPlaceFileExtension
);
int
fpcount
=
m_parent
->
DoGenFootprintsPositionFile
(
fn
.
GetFullPath
(),
UnitsMM
(),
ForceAllSmd
(),
side
);
...
...
pcbnew/gendrill.cpp
View file @
ba689c10
...
...
@@ -52,15 +52,11 @@
#include <pcbplot.h>
#include <pcbnew.h>
#include <gendrill.h>
#include <wildcards_and_files_ext.h>
#include <dialog_gendrill.h> // Dialog box for drill file generation
const
wxString
DrillFileExtension
(
wxT
(
"drl"
)
);
const
wxString
DrillFileWildcard
(
_
(
"Drill files (*.drl)|*.drl"
)
);
const
wxString
RptFileExtension
(
wxT
(
"rpt"
)
);
const
wxString
RptFileWildcard
=
_
(
"Drill report files (*.rpt)|*.rpt"
);
/*
* Creates the drill files in EXCELLON format
* Number format:
...
...
@@ -653,10 +649,10 @@ void DIALOG_GENDRILL::GenDrillReport( const wxString aFileName )
fn
=
aFileName
;
fn
.
SetName
(
fn
.
GetName
()
+
wxT
(
"-drl"
)
);
fn
.
SetExt
(
R
p
tFileExtension
);
fn
.
SetExt
(
R
epor
tFileExtension
);
wxFileDialog
dlg
(
this
,
_
(
"Save Drill Report File"
),
fn
.
GetPath
(),
fn
.
GetFullName
(),
wxGetTranslation
(
R
p
tFileWildcard
),
fn
.
GetFullName
(),
wxGetTranslation
(
R
epor
tFileWildcard
),
wxFD_SAVE
);
if
(
dlg
.
ShowModal
()
==
wxID_CANCEL
)
...
...
pcbnew/pcbnew.cpp
View file @
ba689c10
...
...
@@ -44,6 +44,7 @@
#include <pcbnew.h>
#include <protos.h>
#include <hotkeys.h>
#include <wildcards_and_files_ext.h>
// Colors for layers and items
...
...
pcbnew/pcbnew_config.cpp
View file @
ba689c10
...
...
@@ -52,10 +52,9 @@
#include <dialog_mask_clearance.h>
#include <dialog_general_options.h>
#include <wildcards_and_files_ext.h>
#define HOTKEY_FILENAME wxT( "pcbnew" )
void
PCB_EDIT_FRAME
::
Process_Config
(
wxCommandEvent
&
event
)
{
int
id
=
event
.
GetId
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment