KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_import_netlist_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10
12
14
15DIALOG_IMPORT_NETLIST_BASE::DIALOG_IMPORT_NETLIST_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
16{
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18
19 wxBoxSizer* bMainSizer;
20 bMainSizer = new wxBoxSizer( wxVERTICAL );
21
22 wxBoxSizer* bSizerNetlistFilename;
23 bSizerNetlistFilename = new wxBoxSizer( wxHORIZONTAL );
24
25 wxStaticText* staticTextNetlistFile;
26 staticTextNetlistFile = new wxStaticText( this, wxID_ANY, _("Netlist file:"), wxDefaultPosition, wxDefaultSize, 0 );
27 staticTextNetlistFile->Wrap( -1 );
28 bSizerNetlistFilename->Add( staticTextNetlistFile, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
29
30 m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
31 bSizerNetlistFilename->Add( m_NetlistFilenameCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 );
32
33 m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
34 bSizerNetlistFilename->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 2 );
35
36
37 bMainSizer->Add( bSizerNetlistFilename, 0, wxEXPAND|wxALL, 10 );
38
39 wxBoxSizer* bUpperSizer;
40 bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
41
42 wxString m_matchByTimestampChoices[] = { _("Link footprints using component tstamps (unique ids)"), _("Link footprints using reference designators") };
43 int m_matchByTimestampNChoices = sizeof( m_matchByTimestampChoices ) / sizeof( wxString );
44 m_matchByTimestamp = new wxRadioBox( this, wxID_ANY, _("Link Method"), wxDefaultPosition, wxDefaultSize, m_matchByTimestampNChoices, m_matchByTimestampChoices, 1, wxRA_SPECIFY_COLS );
45 m_matchByTimestamp->SetSelection( 0 );
46 m_matchByTimestamp->SetToolTip( _("Select whether to update footprint references to match their currently-assigned symbols, or to re-assign footprints to symbols which match their current references.") );
47
48 bUpperSizer->Add( m_matchByTimestamp, 1, wxALIGN_TOP|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
49
50 wxStaticBoxSizer* sbSizer1;
51 sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
52
53 m_cbDeleteExtraFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete footprints with no components in netlist"), wxDefaultPosition, wxDefaultSize, 0 );
54 sbSizer1->Add( m_cbDeleteExtraFootprints, 0, wxBOTTOM, 5 );
55
56 m_cbUpdateFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Replace footprints with those specified in netlist"), wxDefaultPosition, wxDefaultSize, 0 );
57 sbSizer1->Add( m_cbUpdateFootprints, 0, wxBOTTOM, 5 );
58
59 m_cbOverrideLocks = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete/replace footprints even if locked"), wxDefaultPosition, wxDefaultSize, 0 );
60 sbSizer1->Add( m_cbOverrideLocks, 0, wxBOTTOM|wxRIGHT, 5 );
61
62 m_cbDeleteShortingTracks = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete tracks shorting multiple nets"), wxDefaultPosition, wxDefaultSize, 0 );
63 sbSizer1->Add( m_cbDeleteShortingTracks, 0, wxBOTTOM, 5 );
64
65
66 bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
67
68
69 bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
70
71 wxBoxSizer* bLowerSizer;
72 bLowerSizer = new wxBoxSizer( wxVERTICAL );
73
74 bLowerSizer->SetMinSize( wxSize( -1,250 ) );
75 m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
76 bLowerSizer->Add( m_MessageWindow, 1, wxEXPAND | wxALL, 5 );
77
78
79 bMainSizer->Add( bLowerSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
80
81 m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
82
83 m_sdbSizer = new wxStdDialogButtonSizer();
84 m_sdbSizerOK = new wxButton( this, wxID_OK );
85 m_sdbSizer->AddButton( m_sdbSizerOK );
86 m_sdbSizerApply = new wxButton( this, wxID_APPLY );
87 m_sdbSizer->AddButton( m_sdbSizerApply );
88 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
89 m_sdbSizer->AddButton( m_sdbSizerCancel );
90 m_sdbSizer->Realize();
91
92 m_buttonsSizer->Add( m_sdbSizer, 1, wxEXPAND, 5 );
93
94
95 bMainSizer->Add( m_buttonsSizer, 0, wxEXPAND|wxALL, 5 );
96
97
98 this->SetSizer( bMainSizer );
99 this->Layout();
100 bMainSizer->Fit( this );
101
102 // Connect Events
103 m_NetlistFilenameCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnFilenameKillFocus ), NULL, this );
104 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onBrowseNetlistFiles ), NULL, this );
105 m_matchByTimestamp->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnMatchChanged ), NULL, this );
106 m_cbDeleteExtraFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this );
107 m_cbUpdateFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this );
108 m_cbOverrideLocks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this );
109 m_cbDeleteShortingTracks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this );
110 m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onUpdatePCB ), NULL, this );
111 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onImportNetlist ), NULL, this );
112}
113
115{
116 // Disconnect Events
117 m_NetlistFilenameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnFilenameKillFocus ), NULL, this );
118 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onBrowseNetlistFiles ), NULL, this );
119 m_matchByTimestamp->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnMatchChanged ), NULL, this );
120 m_cbDeleteExtraFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this );
121 m_cbUpdateFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this );
122 m_cbOverrideLocks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this );
123 m_cbDeleteShortingTracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::OnOptionChanged ), NULL, this );
124 m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onUpdatePCB ), NULL, this );
125 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_NETLIST_BASE::onImportNetlist ), NULL, this );
126
127}
virtual void onUpdatePCB(wxCommandEvent &event)
DIALOG_IMPORT_NETLIST_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Import Netlist"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void onImportNetlist(wxCommandEvent &event)
virtual void OnMatchChanged(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
virtual void OnOptionChanged(wxCommandEvent &event)
WX_HTML_REPORT_PANEL * m_MessageWindow
virtual void onBrowseNetlistFiles(wxCommandEvent &event)
virtual void OnFilenameKillFocus(wxFocusEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
A bitmap button widget that behaves like a standard dialog button except with an icon.
A widget for browsing a rich text error/status report.
#define _(s)