KiCad PCB EDA Suite
dialog_netlist.h
Go to the documentation of this file.
1 
5 /*
6  * This program source code file is part of KiCad, a free EDA CAD application.
7  *
8  * Copyright (C) 1992-2015 KiCad Developers, see change_log.txt for contributors.
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, you may find one here:
22  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
23  * or you may search the http://www.gnu.org website for the version 2 license,
24  * or you may write to the Free Software Foundation, Inc.,
25  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
26  */
27 
28 #ifndef _DIALOG_NETLIST_H_
29 #define _DIALOG_NETLIST_H_
30 
31 #include <dialog_netlist_fbp.h>
32 
33 
34 class MODULE;
35 class NETLIST;
36 
37 
39 {
40 private:
42  wxDC* m_dc;
43  bool m_silentMode; // if true, do not display warning message about undo
44  wxConfigBase* m_config;
45 
46 public:
47  DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC* aDC, const wxString & aNetlistFullFilename );
49 
50 private:
66  bool verifyFootprints( const wxString& aNetlistFilename,
67  const wxString& aCmpFilename,
68  std::vector< MODULE* >& aDuplicate,
69  wxArrayString& aMissing,
70  std::vector< MODULE* >& aNotInNetlist );
71 
78  void loadFootprints( NETLIST& aNetlist );
79 
80  // Virtual event handlers:
81  void OnOpenNetlistClick( wxCommandEvent& event ) override;
82  void OnReadNetlistFileClick( wxCommandEvent& event ) override;
83  void OnTestFootprintsClick( wxCommandEvent& event ) override;
84  void OnCompileRatsnestClick( wxCommandEvent& event ) override;
85  void OnCancelClick( wxCommandEvent& event ) override;
86  void OnSaveMessagesToFile( wxCommandEvent& aEvent ) override;
87  void OnClickSilentMode( wxCommandEvent& event ) override
88  {
89  m_silentMode = m_checkBoxSilentMode->GetValue();
90  }
91 
92  void OnUpdateUISaveMessagesToFile( wxUpdateUIEvent& aEvent ) override;
93  void OnUpdateUIValidNetlistFile( wxUpdateUIEvent& aEvent ) override;
94 };
95 
96 
97 #endif // _DIALOG_NETLIST_H_
void OnSaveMessagesToFile(wxCommandEvent &aEvent) override
wxCheckBox * m_checkBoxSilentMode
PCB_EDIT_FRAME * m_parent
DIALOG_NETLIST(PCB_EDIT_FRAME *aParent, wxDC *aDC, const wxString &aNetlistFullFilename)
wxConfigBase * m_config
void OnTestFootprintsClick(wxCommandEvent &event) override
Class NETLIST stores all of information read from a netlist along with the flags used to update the N...
Definition: pcb_netlist.h:205
void OnOpenNetlistClick(wxCommandEvent &event) override
void OnClickSilentMode(wxCommandEvent &event) override
void OnCancelClick(wxCommandEvent &event) override
void OnUpdateUIValidNetlistFile(wxUpdateUIEvent &aEvent) override
void OnCompileRatsnestClick(wxCommandEvent &event) override
void loadFootprints(NETLIST &aNetlist)
Function loadFootprints loads the footprints for each COMPONENT in aNetlist from the list of librarie...
void OnUpdateUISaveMessagesToFile(wxUpdateUIEvent &aEvent) override
Class DIALOG_NETLIST_FBP.
bool verifyFootprints(const wxString &aNetlistFilename, const wxString &aCmpFilename, std::vector< MODULE * > &aDuplicate, wxArrayString &aMissing, std::vector< MODULE * > &aNotInNetlist)
Function verifyFootprints compares the netlist to the board and builds a list of duplicate, missing, and extra footprints.
void OnReadNetlistFileClick(wxCommandEvent &event) override