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 
44  bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
45 
46 
47  bMainSizer->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 );
48 
49  wxBoxSizer* bLowerSizer;
50  bLowerSizer = new wxBoxSizer( wxVERTICAL );
51 
52  bLowerSizer->SetMinSize( wxSize( 660,300 ) );
53  m_messagePanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
54  bLowerSizer->Add( m_messagePanel, 1, wxEXPAND | wxALL, 5 );
55 
56 
57  bMainSizer->Add( bLowerSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
58 
59  m_sdbSizer1 = new wxStdDialogButtonSizer();
60  m_sdbSizer1OK = new wxButton( this, wxID_OK );
61  m_sdbSizer1->AddButton( m_sdbSizer1OK );
62  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
63  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
64  m_sdbSizer1->Realize();
65 
66  bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
67 
68 
69  this->SetSizer( bMainSizer );
70  this->Layout();
71  bMainSizer->Fit( this );
72 
73  // Connect Events
74  m_cbRelinkFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
75  m_cbDeleteExtraFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
76  m_cbUpdateFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
77  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
78 }
79 
81 {
82  // Disconnect Events
83  m_cbRelinkFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
84  m_cbDeleteExtraFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
85  m_cbUpdateFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
86  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
87 
88 }
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:82
#define _(s)
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)
virtual void OnUpdateClick(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer1
A widget for browsing a rich text error/status report.