KiCad PCB EDA Suite
dialog_netlist_fbp.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Aug 4 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
8 #include "wx_html_report_panel.h"
9 
10 #include "dialog_netlist_fbp.h"
11 
13 
14 DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
15 {
16  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17 
18  wxBoxSizer* bMainSizer;
19  bMainSizer = new wxBoxSizer( wxVERTICAL );
20 
21  wxBoxSizer* bUpperSizer;
22  bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
23 
24  wxBoxSizer* bleftSizer;
25  bleftSizer = new wxBoxSizer( wxVERTICAL );
26 
27  wxBoxSizer* bnetlistOptSizer;
28  bnetlistOptSizer = new wxBoxSizer( wxHORIZONTAL );
29 
30  wxBoxSizer* bmodulesOptSizer;
31  bmodulesOptSizer = new wxBoxSizer( wxVERTICAL );
32 
33  wxString m_Select_By_TimestampChoices[] = { _("Reference"), _("Timestamp") };
34  int m_Select_By_TimestampNChoices = sizeof( m_Select_By_TimestampChoices ) / sizeof( wxString );
35  m_Select_By_Timestamp = new wxRadioBox( this, wxID_ANY, _("Footprint Selection"), wxDefaultPosition, wxDefaultSize, m_Select_By_TimestampNChoices, m_Select_By_TimestampChoices, 1, wxRA_SPECIFY_COLS );
36  m_Select_By_Timestamp->SetSelection( 0 );
37  m_Select_By_Timestamp->SetToolTip( _("Select how footprints are recognized:\nby their reference (U1, R3...) (normal setting)\nor their time stamp (special setting after a full schematic reannotation)") );
38 
39  bmodulesOptSizer->Add( m_Select_By_Timestamp, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
40 
41  wxString m_ChangeExistingFootprintCtrlChoices[] = { _("Keep"), _("Change") };
42  int m_ChangeExistingFootprintCtrlNChoices = sizeof( m_ChangeExistingFootprintCtrlChoices ) / sizeof( wxString );
43  m_ChangeExistingFootprintCtrl = new wxRadioBox( this, wxID_ANY, _("Exchange Footprint"), wxDefaultPosition, wxDefaultSize, m_ChangeExistingFootprintCtrlNChoices, m_ChangeExistingFootprintCtrlChoices, 1, wxRA_SPECIFY_COLS );
44  m_ChangeExistingFootprintCtrl->SetSelection( 0 );
45  m_ChangeExistingFootprintCtrl->SetToolTip( _("Keep or change an existing footprint when the netlist gives a different footprint") );
46 
47  bmodulesOptSizer->Add( m_ChangeExistingFootprintCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
48 
49 
50  bnetlistOptSizer->Add( bmodulesOptSizer, 1, wxEXPAND, 5 );
51 
52  wxBoxSizer* bTracksSizer;
53  bTracksSizer = new wxBoxSizer( wxVERTICAL );
54 
55  wxString m_DeleteBadTracksChoices[] = { _("Keep"), _("Delete") };
56  int m_DeleteBadTracksNChoices = sizeof( m_DeleteBadTracksChoices ) / sizeof( wxString );
57  m_DeleteBadTracks = new wxRadioBox( this, wxID_ANY, _("Tracks Connecting 2 Nets"), wxDefaultPosition, wxDefaultSize, m_DeleteBadTracksNChoices, m_DeleteBadTracksChoices, 1, wxRA_SPECIFY_COLS );
58  m_DeleteBadTracks->SetSelection( 0 );
59  m_DeleteBadTracks->SetToolTip( _("Keep or delete tracks creating a short circuit between two nets after a netlist change") );
60 
61  bTracksSizer->Add( m_DeleteBadTracks, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
62 
63  wxString m_RemoveExtraFootprintsCtrlChoices[] = { _("Keep"), _("Delete") };
64  int m_RemoveExtraFootprintsCtrlNChoices = sizeof( m_RemoveExtraFootprintsCtrlChoices ) / sizeof( wxString );
65  m_RemoveExtraFootprintsCtrl = new wxRadioBox( this, wxID_ANY, _("Extra Footprints"), wxDefaultPosition, wxDefaultSize, m_RemoveExtraFootprintsCtrlNChoices, m_RemoveExtraFootprintsCtrlChoices, 1, wxRA_SPECIFY_COLS );
66  m_RemoveExtraFootprintsCtrl->SetSelection( 0 );
67  m_RemoveExtraFootprintsCtrl->SetToolTip( _("Remove footprints found on the Board but not in netlist\nNote: only not locked footprints will be removed") );
68 
69  bTracksSizer->Add( m_RemoveExtraFootprintsCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
70 
71  wxString m_rbSingleNetsChoices[] = { _("Keep"), _("Delete") };
72  int m_rbSingleNetsNChoices = sizeof( m_rbSingleNetsChoices ) / sizeof( wxString );
73  m_rbSingleNets = new wxRadioBox( this, wxID_ANY, _("Single Pad Nets"), wxDefaultPosition, wxDefaultSize, m_rbSingleNetsNChoices, m_rbSingleNetsChoices, 1, wxRA_SPECIFY_COLS );
74  m_rbSingleNets->SetSelection( 0 );
75  bTracksSizer->Add( m_rbSingleNets, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
76 
77 
78  bnetlistOptSizer->Add( bTracksSizer, 1, wxEXPAND, 5 );
79 
80 
81  bleftSizer->Add( bnetlistOptSizer, 1, wxEXPAND, 5 );
82 
83 
84  bUpperSizer->Add( bleftSizer, 1, wxEXPAND, 5 );
85 
86  wxBoxSizer* bRightSizerButtons;
87  bRightSizerButtons = new wxBoxSizer( wxVERTICAL );
88 
89  m_buttonRead = new wxButton( this, ID_READ_NETLIST_FILE, _("Read Current Netlist"), wxDefaultPosition, wxDefaultSize, 0 );
90  m_buttonRead->SetDefault();
91  m_buttonRead->SetToolTip( _("Read the current netlist and update connections and connectivity info") );
92 
93  bRightSizerButtons->Add( m_buttonRead, 0, wxEXPAND|wxALL, 5 );
94 
95  m_buttonClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
96  bRightSizerButtons->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 );
97 
98  m_buttonFPTest = new wxButton( this, ID_TEST_NETLIST, _("Test Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
99  m_buttonFPTest->SetToolTip( _("Read the current netlist file and list missing and extra footprints") );
100 
101  bRightSizerButtons->Add( m_buttonFPTest, 0, wxEXPAND|wxALL, 5 );
102 
103  m_buttonRebild = new wxButton( this, ID_COMPILE_RATSNEST, _("Rebuild Board Connectivity"), wxDefaultPosition, wxDefaultSize, 0 );
104  m_buttonRebild->SetToolTip( _("Rebuild the full ratsnest (useful after a manual pad netname edition)") );
105 
106  bRightSizerButtons->Add( m_buttonRebild, 0, wxEXPAND|wxALL, 5 );
107 
108  m_buttonSaveMessages = new wxButton( this, wxID_ANY, _("Save Messages to File"), wxDefaultPosition, wxDefaultSize, 0 );
109  bRightSizerButtons->Add( m_buttonSaveMessages, 0, wxALL|wxEXPAND, 5 );
110 
111 
112  bUpperSizer->Add( bRightSizerButtons, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
113 
114 
115  bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
116 
117  m_staticline11 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
118  bMainSizer->Add( m_staticline11, 0, wxEXPAND | wxALL, 5 );
119 
120  wxBoxSizer* bCenterSizer;
121  bCenterSizer = new wxBoxSizer( wxVERTICAL );
122 
123  m_checkDryRun = new wxCheckBox( this, wxID_ANY, _("Dry run. Only report changes in message panel"), wxDefaultPosition, wxDefaultSize, 0 );
124  m_checkDryRun->SetToolTip( _("Dry Run:\nThe netlist is read, but no change is actually made on board.\nChanges are only reported in message panel, for info") );
125 
126  bCenterSizer->Add( m_checkDryRun, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
127 
128  m_checkBoxSilentMode = new wxCheckBox( this, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 );
129  m_checkBoxSilentMode->SetToolTip( _("Silent mode:\nDo not show the warning message before reading the netlist") );
130 
131  bCenterSizer->Add( m_checkBoxSilentMode, 0, wxRIGHT|wxLEFT, 5 );
132 
133 
134  bMainSizer->Add( bCenterSizer, 0, wxALL|wxEXPAND, 5 );
135 
136  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
137  bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
138 
139  wxBoxSizer* bLowerSizer;
140  bLowerSizer = new wxBoxSizer( wxVERTICAL );
141 
142  m_staticTextNetfilename = new wxStaticText( this, wxID_ANY, _("Netlist File:"), wxDefaultPosition, wxDefaultSize, 0 );
143  m_staticTextNetfilename->Wrap( -1 );
144  bLowerSizer->Add( m_staticTextNetfilename, 0, wxRIGHT|wxLEFT, 5 );
145 
146  wxBoxSizer* bSizerNetlistFilename;
147  bSizerNetlistFilename = new wxBoxSizer( wxHORIZONTAL );
148 
149  m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
150  bSizerNetlistFilename->Add( m_NetlistFilenameCtrl, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
151 
152  m_buttonBrowse = new wxButton( this, ID_OPEN_NELIST, _("Browse"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
153  bSizerNetlistFilename->Add( m_buttonBrowse, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
154 
155 
156  bLowerSizer->Add( bSizerNetlistFilename, 0, wxEXPAND, 5 );
157 
158  m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
159  m_MessageWindow->SetMinSize( wxSize( -300,150 ) );
160 
161  bLowerSizer->Add( m_MessageWindow, 1, wxEXPAND | wxALL, 5 );
162 
163 
164  bMainSizer->Add( bLowerSizer, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
165 
166 
167  this->SetSizer( bMainSizer );
168  this->Layout();
169  bMainSizer->Fit( this );
170 
171  // Connect Events
172  m_buttonRead->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this );
173  m_buttonRead->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
174  m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this );
175  m_buttonFPTest->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this );
176  m_buttonFPTest->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
177  m_buttonRebild->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this );
178  m_buttonRebild->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
179  m_buttonSaveMessages->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnSaveMessagesToFile ), NULL, this );
180  m_buttonSaveMessages->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUISaveMessagesToFile ), NULL, this );
181  m_checkBoxSilentMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickSilentMode ), NULL, this );
182  m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this );
183 }
184 
186 {
187  // Disconnect Events
188  m_buttonRead->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this );
189  m_buttonRead->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
190  m_buttonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this );
191  m_buttonFPTest->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this );
192  m_buttonFPTest->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
193  m_buttonRebild->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this );
194  m_buttonRebild->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
195  m_buttonSaveMessages->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnSaveMessagesToFile ), NULL, this );
196  m_buttonSaveMessages->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUISaveMessagesToFile ), NULL, this );
197  m_checkBoxSilentMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickSilentMode ), NULL, this );
198  m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this );
199 
200 }
wxCheckBox * m_checkBoxSilentMode
virtual void OnClickSilentMode(wxCommandEvent &event)
virtual void OnTestFootprintsClick(wxCommandEvent &event)
wxStaticLine * m_staticline1
wxRadioBox * m_rbSingleNets
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
wxRadioBox * m_RemoveExtraFootprintsCtrl
virtual void OnCompileRatsnestClick(wxCommandEvent &event)
virtual void OnReadNetlistFileClick(wxCommandEvent &event)
virtual void OnUpdateUISaveMessagesToFile(wxUpdateUIEvent &event)
virtual void OnUpdateUIValidNetlistFile(wxUpdateUIEvent &event)
virtual void OnOpenNetlistClick(wxCommandEvent &event)
wxButton * m_buttonSaveMessages
virtual void OnCancelClick(wxCommandEvent &event)
wxStaticLine * m_staticline11
wxRadioBox * m_DeleteBadTracks
DIALOG_NETLIST_FBP(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Netlist"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxTextCtrl * m_NetlistFilenameCtrl
virtual void OnSaveMessagesToFile(wxCommandEvent &event)
wxStaticText * m_staticTextNetfilename
wxRadioBox * m_ChangeExistingFootprintCtrl
wxCheckBox * m_checkDryRun
WX_HTML_REPORT_PANEL * m_MessageWindow
Class WX_HTML_REPORT_PANEL.
wxRadioBox * m_Select_By_Timestamp