KiCad PCB EDA Suite
dialog_update_pcb_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Oct 26 2018)
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_update_pcb_base.h"
11 
13 
14 DIALOG_UPDATE_PCB_BASE::DIALOG_UPDATE_PCB_BASE( 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( wxSize( -1,-1 ), wxDefaultSize );
17 
18  wxBoxSizer* bMainSizer;
19  bMainSizer = new wxBoxSizer( wxVERTICAL );
20 
21  wxBoxSizer* bUpperSizer;
22  bUpperSizer = new wxBoxSizer( wxVERTICAL );
23 
24  wxStaticBoxSizer* sbSizer1;
25  sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
26 
27  m_cbRelinkFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Re-link footprints to schematic symbols based on their reference designators"), wxDefaultPosition, wxDefaultSize, 0 );
28  m_cbRelinkFootprints->SetToolTip( _("Normally footprints are linked to their symbols via their Unique IDs. Select this option only if you want to reset the footprint linkages based on their reference designators.") );
29 
30  sbSizer1->Add( m_cbRelinkFootprints, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
31 
32  m_cbDeleteExtraFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete footprints with no symbols"), wxDefaultPosition, wxDefaultSize, 0 );
33  m_cbDeleteExtraFootprints->SetToolTip( _("Remove from the board unlocked footprints which are not linked to a schematic symbol.") );
34 
35  sbSizer1->Add( m_cbDeleteExtraFootprints, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
36 
37  m_cbUpdateFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Replace footprints with those specified in the schematic"), wxDefaultPosition, wxDefaultSize, 0 );
38  m_cbUpdateFootprints->SetValue(true);
39  m_cbUpdateFootprints->SetToolTip( _("Normally footprints on the board should be changed to match footprint assignment changes made in the schematic. Uncheck this only if you don't want to change existing footprints on the board.") );
40 
41  sbSizer1->Add( m_cbUpdateFootprints, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
42 
43  wxBoxSizer* bSizer4;
44  bSizer4 = new wxBoxSizer( wxHORIZONTAL );
45 
46  m_cbDeleteSinglePadNets = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete nets containing only a single pad"), wxDefaultPosition, wxDefaultSize, 0 );
47  m_cbDeleteSinglePadNets->SetToolTip( _("Clear the net name of pads when there is only one pad belonging to this net.") );
48 
49  bSizer4->Add( m_cbDeleteSinglePadNets, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
50 
51  m_cbWarnNoNetPad = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Generate warnings for pads with no nets"), wxDefaultPosition, wxDefaultSize, 0 );
52  m_cbWarnNoNetPad->SetValue(true);
53  m_cbWarnNoNetPad->SetToolTip( _("Display a warning if a pad in a footprint does not appear in netlist.\nOnly pads on a copper layer and having a name are tested.") );
54 
55  bSizer4->Add( m_cbWarnNoNetPad, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
56 
57 
58  sbSizer1->Add( bSizer4, 1, wxEXPAND|wxTOP, 5 );
59 
60 
61  bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
62 
63 
64  bMainSizer->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 );
65 
66  wxBoxSizer* bLowerSizer;
67  bLowerSizer = new wxBoxSizer( wxVERTICAL );
68 
69  bLowerSizer->SetMinSize( wxSize( 660,300 ) );
70  m_messagePanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
71  bLowerSizer->Add( m_messagePanel, 1, wxEXPAND | wxALL, 5 );
72 
73 
74  bMainSizer->Add( bLowerSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
75 
76  m_sdbSizer1 = new wxStdDialogButtonSizer();
77  m_sdbSizer1OK = new wxButton( this, wxID_OK );
78  m_sdbSizer1->AddButton( m_sdbSizer1OK );
79  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
80  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
81  m_sdbSizer1->Realize();
82 
83  bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
84 
85 
86  this->SetSizer( bMainSizer );
87  this->Layout();
88  bMainSizer->Fit( this );
89 
90  // Connect Events
91  m_cbRelinkFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
92  m_cbDeleteExtraFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
93  m_cbUpdateFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
94  m_cbDeleteSinglePadNets->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
95  m_cbWarnNoNetPad->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
96  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
97 }
98 
100 {
101  // Disconnect Events
102  m_cbRelinkFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
103  m_cbDeleteExtraFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
104  m_cbUpdateFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
105  m_cbDeleteSinglePadNets->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
106  m_cbWarnNoNetPad->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
107  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
108 
109 }
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
#define NULL
virtual void OnOptionChanged(wxCommandEvent &event)
WX_HTML_REPORT_PANEL * m_messagePanel
DIALOG_UPDATE_PCB_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Update PCB from Schematic"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
#define _(s)
Definition: 3d_actions.cpp:33
virtual void OnUpdateClick(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer1
WX_HTML_REPORT_PANEL.