KiCad PCB EDA Suite
pcbnew/dialogs/dialog_netlist_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
10#include "dialog_netlist_base.h"
11
13
14DIALOG_NETLIST_IMPORT_BASE::DIALOG_NETLIST_IMPORT_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( wxDefaultSize, wxDefaultSize );
17
18 wxBoxSizer* bMainSizer;
19 bMainSizer = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* bSizerNetlistFilename;
22 bSizerNetlistFilename = new wxBoxSizer( wxHORIZONTAL );
23
24 wxStaticText* staticTextNetlistFile;
25 staticTextNetlistFile = new wxStaticText( this, wxID_ANY, _("Netlist file:"), wxDefaultPosition, wxDefaultSize, 0 );
26 staticTextNetlistFile->Wrap( -1 );
27 bSizerNetlistFilename->Add( staticTextNetlistFile, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
28
29 m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
30 bSizerNetlistFilename->Add( m_NetlistFilenameCtrl, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
31
32 m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
33 m_browseButton->SetMinSize( wxSize( 30,28 ) );
34
35 bSizerNetlistFilename->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 2 );
36
37
38 bMainSizer->Add( bSizerNetlistFilename, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
39
40 wxBoxSizer* bUpperSizer;
41 bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
42
43 wxString m_matchByTimestampChoices[] = { _("Link footprints using component tstamps (unique ids)"), _("Link footprints using reference designators") };
44 int m_matchByTimestampNChoices = sizeof( m_matchByTimestampChoices ) / sizeof( wxString );
45 m_matchByTimestamp = new wxRadioBox( this, wxID_ANY, _("Link Method"), wxDefaultPosition, wxDefaultSize, m_matchByTimestampNChoices, m_matchByTimestampChoices, 1, wxRA_SPECIFY_COLS );
46 m_matchByTimestamp->SetSelection( 0 );
47 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.") );
48
49 bUpperSizer->Add( m_matchByTimestamp, 1, wxALIGN_TOP|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
50
51 wxStaticBoxSizer* sbSizer1;
52 sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
53
54 m_cbUpdateFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Replace footprints with those specified in netlist"), wxDefaultPosition, wxDefaultSize, 0 );
55 sbSizer1->Add( m_cbUpdateFootprints, 0, wxBOTTOM, 5 );
56
57 m_cbDeleteExtraFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete footprints with no components in netlist"), wxDefaultPosition, wxDefaultSize, 0 );
58 sbSizer1->Add( m_cbDeleteExtraFootprints, 0, wxBOTTOM, 5 );
59
60 m_cbDeleteShortingTracks = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete tracks shorting multiple nets"), wxDefaultPosition, wxDefaultSize, 0 );
61 sbSizer1->Add( m_cbDeleteShortingTracks, 0, wxBOTTOM, 5 );
62
63
64 bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
65
66
67 bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
68
69 wxBoxSizer* bLowerSizer;
70 bLowerSizer = new wxBoxSizer( wxVERTICAL );
71
72 bLowerSizer->SetMinSize( wxSize( -1,250 ) );
73 m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
74 bLowerSizer->Add( m_MessageWindow, 1, wxEXPAND | wxALL, 5 );
75
76
77 bMainSizer->Add( bLowerSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
78
79 m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
80
81 m_sdbSizer = new wxStdDialogButtonSizer();
82 m_sdbSizerOK = new wxButton( this, wxID_OK );
83 m_sdbSizer->AddButton( m_sdbSizerOK );
84 m_sdbSizerApply = new wxButton( this, wxID_APPLY );
85 m_sdbSizer->AddButton( m_sdbSizerApply );
86 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
87 m_sdbSizer->AddButton( m_sdbSizerCancel );
88 m_sdbSizer->Realize();
89
90 m_buttonsSizer->Add( m_sdbSizer, 1, wxEXPAND, 5 );
91
92
93 bMainSizer->Add( m_buttonsSizer, 0, wxEXPAND|wxALL, 5 );
94
95
96 this->SetSizer( bMainSizer );
97 this->Layout();
98 bMainSizer->Fit( this );
99
100 // Connect Events
101 m_NetlistFilenameCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnFilenameKillFocus ), NULL, this );
102 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onBrowseNetlistFiles ), NULL, this );
103 m_matchByTimestamp->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnMatchChanged ), NULL, this );
104 m_cbUpdateFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this );
105 m_cbDeleteExtraFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this );
106 m_cbDeleteShortingTracks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this );
107 m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onUpdatePCB ), NULL, this );
108 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onImportNetlist ), NULL, this );
109}
110
112{
113 // Disconnect Events
114 m_NetlistFilenameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnFilenameKillFocus ), NULL, this );
115 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onBrowseNetlistFiles ), NULL, this );
116 m_matchByTimestamp->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnMatchChanged ), NULL, this );
117 m_cbUpdateFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this );
118 m_cbDeleteExtraFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this );
119 m_cbDeleteShortingTracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::OnOptionChanged ), NULL, this );
120 m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onUpdatePCB ), NULL, this );
121 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_IMPORT_BASE::onImportNetlist ), NULL, this );
122
123}
DIALOG_NETLIST_IMPORT_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 OnFilenameKillFocus(wxFocusEvent &event)
virtual void onBrowseNetlistFiles(wxCommandEvent &event)
virtual void onImportNetlist(wxCommandEvent &event)
virtual void onUpdatePCB(wxCommandEvent &event)
virtual void OnMatchChanged(wxCommandEvent &event)
virtual void OnOptionChanged(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
A widget for browsing a rich text error/status report.
#define _(s)