KiCad PCB EDA Suite
dialog_update_pcb_base.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_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( wxHORIZONTAL );
23 
24  wxString m_matchByTimestampChoices[] = { _("Keep existing symbol to footprint associations"), _("Re-associate footprints by reference") };
25  int m_matchByTimestampNChoices = sizeof( m_matchByTimestampChoices ) / sizeof( wxString );
26  m_matchByTimestamp = new wxRadioBox( this, wxID_ANY, _("Match Method"), wxDefaultPosition, wxDefaultSize, m_matchByTimestampNChoices, m_matchByTimestampChoices, 1, wxRA_SPECIFY_COLS );
27  m_matchByTimestamp->SetSelection( 0 );
28  m_matchByTimestamp->SetToolTip( _("Select how footprints are recognized:\nby their reference (U1, R3...) (normal setting)\nor their time stamp (special setting after a full schematic reannotation)") );
29 
30  bUpperSizer->Add( m_matchByTimestamp, 1, wxALIGN_TOP|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
31 
32  wxStaticBoxSizer* sbSizer1;
33  sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
34 
35  m_cbUpdateFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Update footprints"), wxDefaultPosition, wxDefaultSize, 0 );
36  sbSizer1->Add( m_cbUpdateFootprints, 0, wxBOTTOM, 5 );
37 
38  m_cbDeleteExtraFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete extra footprints"), wxDefaultPosition, wxDefaultSize, 0 );
39  sbSizer1->Add( m_cbDeleteExtraFootprints, 0, wxBOTTOM, 5 );
40 
41  m_cbDeleteSinglePadNets = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete single-pad nets"), wxDefaultPosition, wxDefaultSize, 0 );
42  sbSizer1->Add( m_cbDeleteSinglePadNets, 0, wxBOTTOM, 5 );
43 
44 
45  bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
46 
47 
48  bMainSizer->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 );
49 
50  wxBoxSizer* bLowerSizer;
51  bLowerSizer = new wxBoxSizer( wxVERTICAL );
52 
53  bLowerSizer->SetMinSize( wxSize( 660,300 ) );
54  m_messagePanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
55  bLowerSizer->Add( m_messagePanel, 1, wxEXPAND | wxALL, 5 );
56 
57 
58  bMainSizer->Add( bLowerSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
59 
60  m_sdbSizer1 = new wxStdDialogButtonSizer();
61  m_sdbSizer1OK = new wxButton( this, wxID_OK );
62  m_sdbSizer1->AddButton( m_sdbSizer1OK );
63  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
64  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
65  m_sdbSizer1->Realize();
66 
67  bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
68 
69 
70  this->SetSizer( bMainSizer );
71  this->Layout();
72  bMainSizer->Fit( this );
73 
74  // Connect Events
75  m_matchByTimestamp->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChanged ), NULL, this );
76  m_cbUpdateFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
77  m_cbDeleteExtraFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
78  m_cbDeleteSinglePadNets->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
79  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
80 }
81 
83 {
84  // Disconnect Events
85  m_matchByTimestamp->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChanged ), NULL, this );
86  m_cbUpdateFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
87  m_cbDeleteExtraFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
88  m_cbDeleteSinglePadNets->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
89  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
90 
91 }
virtual void OnMatchChanged(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:82
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
Class WX_HTML_REPORT_PANEL.