KiCad PCB EDA Suite
dialog_update_pcb_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Sep 8 2016)
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( 800,700 ), wxDefaultSize );
17 
18  wxBoxSizer* bMainSizer;
19  bMainSizer = new wxBoxSizer( wxVERTICAL );
20 
21  wxFlexGridSizer* fgSizer2;
22  fgSizer2 = new wxFlexGridSizer( 0, 3, 0, 0 );
23  fgSizer2->SetFlexibleDirection( wxBOTH );
24  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
25 
26  m_staticText1 = new wxStaticText( this, wxID_ANY, _("Match components by:"), wxDefaultPosition, wxDefaultSize, 0 );
27  m_staticText1->Wrap( -1 );
28  fgSizer2->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
29 
30  m_matchByReference = new wxRadioButton( this, wxID_ANY, _("Reference"), wxDefaultPosition, wxDefaultSize, 0 );
31  fgSizer2->Add( m_matchByReference, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
32 
33  m_matchByTimestamp = new wxRadioButton( this, wxID_ANY, _("Timestamp"), wxDefaultPosition, wxDefaultSize, 0 );
34  fgSizer2->Add( m_matchByTimestamp, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
35 
36 
37  bMainSizer->Add( fgSizer2, 0, wxEXPAND|wxALL, 5 );
38 
39  wxBoxSizer* bLowerSizer;
40  bLowerSizer = new wxBoxSizer( wxVERTICAL );
41 
42  m_messagePanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
43  m_messagePanel->SetMinSize( wxSize( -300,150 ) );
44 
45  bLowerSizer->Add( m_messagePanel, 1, wxEXPAND | wxALL, 5 );
46 
47 
48  bMainSizer->Add( bLowerSizer, 1, wxEXPAND, 5 );
49 
50  wxFlexGridSizer* fgSizer1;
51  fgSizer1 = new wxFlexGridSizer( 1, 5, 0, 0 );
52  fgSizer1->AddGrowableCol( 0 );
53  fgSizer1->SetFlexibleDirection( wxBOTH );
54  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
55 
56  m_btnCancel = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
57  fgSizer1->Add( m_btnCancel, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
58 
59  m_btnPerformUpdate = new wxButton( this, wxID_ANY, _("Perform PCB Update"), wxDefaultPosition, wxDefaultSize, 0 );
60  fgSizer1->Add( m_btnPerformUpdate, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
61 
62 
63  bMainSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
64 
65 
66  this->SetSizer( bMainSizer );
67  this->Layout();
68  bMainSizer->Fit( this );
69 
70  // Connect Events
71  m_matchByReference->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChange ), NULL, this );
72  m_matchByTimestamp->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChange ), NULL, this );
73  m_btnPerformUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
74 }
75 
77 {
78  // Disconnect Events
79  m_matchByReference->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChange ), NULL, this );
80  m_matchByTimestamp->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChange ), NULL, this );
81  m_btnPerformUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
82 
83 }
wxRadioButton * m_matchByReference
wxRadioButton * m_matchByTimestamp
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
WX_HTML_REPORT_PANEL * m_messagePanel
virtual void OnMatchChange(wxCommandEvent &event)
virtual void OnUpdateClick(wxCommandEvent &event)
DIALOG_UPDATE_PCB_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Update PCB from Schematics"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Class WX_HTML_REPORT_PANEL.