KiCad PCB EDA Suite
dialog_netlist_fbp.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 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 
90  bRightSizerButtons->Add( 0, 0, 1, wxALL|wxEXPAND, 5 );
91 
92  m_buttonRead = new wxButton( this, ID_READ_NETLIST_FILE, _("Read Current Netlist"), wxDefaultPosition, wxDefaultSize, 0 );
93  m_buttonRead->SetDefault();
94  m_buttonRead->SetToolTip( _("Read the current netlist and update connections and connectivity info") );
95 
96  bRightSizerButtons->Add( m_buttonRead, 0, wxEXPAND|wxALL, 5 );
97 
98  m_buttonClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
99  bRightSizerButtons->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 );
100 
101  m_buttonFPTest = new wxButton( this, ID_TEST_NETLIST, _("Test Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
102  m_buttonFPTest->SetToolTip( _("Read the current netlist file and list missing and extra footprints") );
103 
104  bRightSizerButtons->Add( m_buttonFPTest, 0, wxEXPAND|wxALL, 5 );
105 
106  m_buttonRebild = new wxButton( this, ID_COMPILE_RATSNEST, _("Rebuild Board Connectivity"), wxDefaultPosition, wxDefaultSize, 0 );
107  m_buttonRebild->SetToolTip( _("Rebuild the full ratsnest (useful after a manual pad netname edition)") );
108 
109  bRightSizerButtons->Add( m_buttonRebild, 0, wxEXPAND|wxALL, 5 );
110 
111 
112  bUpperSizer->Add( bRightSizerButtons, 0, wxBOTTOM|wxLEFT|wxTOP, 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  wxBoxSizer* bSizerNetlistFilename;
143  bSizerNetlistFilename = new wxBoxSizer( wxHORIZONTAL );
144 
145  wxStaticText* staticTextNetlistFile;
146  staticTextNetlistFile = new wxStaticText( this, wxID_ANY, _("Netlist file:"), wxDefaultPosition, wxDefaultSize, 0 );
147  staticTextNetlistFile->Wrap( -1 );
148  bSizerNetlistFilename->Add( staticTextNetlistFile, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
149 
150  m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
151  bSizerNetlistFilename->Add( m_NetlistFilenameCtrl, 1, wxBOTTOM|wxEXPAND|wxTOP, 5 );
152 
153  m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
154  bSizerNetlistFilename->Add( m_browseButton, 0, 0, 5 );
155 
156 
157  bLowerSizer->Add( bSizerNetlistFilename, 0, wxEXPAND, 5 );
158 
159  m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
160  m_MessageWindow->SetMinSize( wxSize( -300,150 ) );
161 
162  bLowerSizer->Add( m_MessageWindow, 1, wxEXPAND | wxALL, 5 );
163 
164 
165  bMainSizer->Add( bLowerSizer, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
166 
167 
168  this->SetSizer( bMainSizer );
169  this->Layout();
170  bMainSizer->Fit( this );
171 
172  // Connect Events
173  m_buttonRead->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this );
174  m_buttonRead->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
175  m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this );
176  m_buttonFPTest->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this );
177  m_buttonFPTest->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
178  m_buttonRebild->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this );
179  m_buttonRebild->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
180  m_checkBoxSilentMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickSilentMode ), NULL, this );
181  m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this );
182 }
183 
185 {
186  // Disconnect Events
187  m_buttonRead->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this );
188  m_buttonRead->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
189  m_buttonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this );
190  m_buttonFPTest->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this );
191  m_buttonFPTest->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
192  m_buttonRebild->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this );
193  m_buttonRebild->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this );
194  m_checkBoxSilentMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickSilentMode ), NULL, this );
195  m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this );
196 
197 }
wxCheckBox * m_checkBoxSilentMode
virtual void OnClickSilentMode(wxCommandEvent &event)
wxBitmapButton * m_browseButton
virtual void OnTestFootprintsClick(wxCommandEvent &event)
wxStaticLine * m_staticline1
DIALOG_NETLIST_FBP(wxWindow *parent, wxWindowID id=wxID_CANCEL, const wxString &title=_("Netlist"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxRadioBox * m_rbSingleNets
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:70
wxRadioBox * m_RemoveExtraFootprintsCtrl
virtual void OnCompileRatsnestClick(wxCommandEvent &event)
virtual void OnReadNetlistFileClick(wxCommandEvent &event)
virtual void OnUpdateUIValidNetlistFile(wxUpdateUIEvent &event)
virtual void OnOpenNetlistClick(wxCommandEvent &event)
virtual void OnCancelClick(wxCommandEvent &event)
wxStaticLine * m_staticline11
wxRadioBox * m_DeleteBadTracks
wxTextCtrl * m_NetlistFilenameCtrl
wxRadioBox * m_ChangeExistingFootprintCtrl
wxCheckBox * m_checkDryRun
WX_HTML_REPORT_PANEL * m_MessageWindow
Class WX_HTML_REPORT_PANEL.
wxRadioBox * m_Select_By_Timestamp