KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_cleanup_tracks_and_vias_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
13
14DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::DIALOG_CLEANUP_TRACKS_AND_VIAS_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* bSizerMain;
19 bSizerMain = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* bSizerTop;
22 bSizerTop = new wxBoxSizer( wxHORIZONTAL );
23
24 wxStaticBoxSizer* sbSizer3;
25 sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Actions") ), wxVERTICAL );
26
27 m_cbRefillZones = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Refill zones before and after cleanup"), wxDefaultPosition, wxDefaultSize, 0 );
28 sbSizer3->Add( m_cbRefillZones, 0, wxRIGHT|wxLEFT, 5 );
29
30
31 sbSizer3->Add( 0, 12, 1, wxEXPAND, 5 );
32
33 m_cleanShortCircuitOpt = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Delete &tracks connecting different nets"), wxDefaultPosition, wxDefaultSize, 0 );
34 m_cleanShortCircuitOpt->SetToolTip( _("remove track segments connecting nodes belonging to different nets (short circuit)") );
35
36 sbSizer3->Add( m_cleanShortCircuitOpt, 0, wxRIGHT|wxLEFT, 5 );
37
38
39 sbSizer3->Add( 0, 10, 1, wxEXPAND, 5 );
40
41 m_cleanViasOpt = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("&Delete redundant vias"), wxDefaultPosition, wxDefaultSize, 0 );
42 m_cleanViasOpt->SetToolTip( _("remove vias on through hole pads and superimposed vias") );
43
44 sbSizer3->Add( m_cleanViasOpt, 0, wxRIGHT|wxLEFT, 5 );
45
46 m_deleteDanglingViasOpt = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Delete vias connected on only one layer"), wxDefaultPosition, wxDefaultSize, 0 );
47 sbSizer3->Add( m_deleteDanglingViasOpt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
48
49
50 sbSizer3->Add( 0, 10, 1, wxEXPAND, 5 );
51
52 m_mergeSegmOpt = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("&Merge co-linear tracks"), wxDefaultPosition, wxDefaultSize, 0 );
53 m_mergeSegmOpt->SetToolTip( _("merge aligned track segments, and remove null segments") );
54
55 sbSizer3->Add( m_mergeSegmOpt, 0, wxRIGHT|wxLEFT, 5 );
56
57 m_deleteUnconnectedOpt = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Delete tracks unconnected at one end"), wxDefaultPosition, wxDefaultSize, 0 );
58 m_deleteUnconnectedOpt->SetToolTip( _("delete tracks having at least one dangling end") );
59
60 sbSizer3->Add( m_deleteUnconnectedOpt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
61
62 m_deleteTracksInPadsOpt = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Delete tracks fully inside pads"), wxDefaultPosition, wxDefaultSize, 0 );
63 m_deleteTracksInPadsOpt->SetToolTip( _("Delete tracks that have both start and end positions inside of a pad") );
64
65 sbSizer3->Add( m_deleteTracksInPadsOpt, 0, wxALL, 5 );
66
67
68 bSizerTop->Add( sbSizer3, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
69
70 wxStaticBoxSizer* sbFilters;
71 sbFilters = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Filter Items") ), wxVERTICAL );
72
73 wxFlexGridSizer* fgSizer3;
74 fgSizer3 = new wxFlexGridSizer( 0, 2, 3, 0 );
75 fgSizer3->AddGrowableCol( 1 );
76 fgSizer3->AddGrowableRow( 0 );
77 fgSizer3->AddGrowableRow( 1 );
78 fgSizer3->AddGrowableRow( 2 );
79 fgSizer3->AddGrowableRow( 3 );
80 fgSizer3->SetFlexibleDirection( wxBOTH );
81 fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
82
83 m_netFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by net:"), wxDefaultPosition, wxDefaultSize, 0 );
84 fgSizer3->Add( m_netFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
85
86 m_netFilter = new NET_SELECTOR( sbFilters->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
87 fgSizer3->Add( m_netFilter, 1, wxEXPAND|wxRIGHT, 5 );
88
89 m_netclassFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by net class:"), wxDefaultPosition, wxDefaultSize, 0 );
90 fgSizer3->Add( m_netclassFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
91
92 wxArrayString m_netclassFilterChoices;
93 m_netclassFilter = new wxChoice( sbFilters->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_netclassFilterChoices, 0 );
94 m_netclassFilter->SetSelection( 0 );
95 m_netclassFilter->SetMinSize( wxSize( 140,-1 ) );
96
97 fgSizer3->Add( m_netclassFilter, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
98
99
100 fgSizer3->Add( 0, 7, 1, wxEXPAND, 5 );
101
102
103 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
104
105 m_layerFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by layer:"), wxDefaultPosition, wxDefaultSize, 0 );
106 fgSizer3->Add( m_layerFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
107
108 m_layerFilter = new PCB_LAYER_BOX_SELECTOR( sbFilters->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
109 fgSizer3->Add( m_layerFilter, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
110
111
112 fgSizer3->Add( 0, 7, 1, wxEXPAND, 5 );
113
114
115 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
116
117
118 sbFilters->Add( fgSizer3, 0, wxEXPAND|wxBOTTOM, 5 );
119
120
121 sbFilters->Add( 0, 5, 0, 0, 5 );
122
123 m_selectedItemsFilter = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Selected items only"), wxDefaultPosition, wxDefaultSize, 0 );
124 sbFilters->Add( m_selectedItemsFilter, 0, wxALL, 5 );
125
126
127 sbFilters->Add( 0, 0, 1, wxEXPAND, 5 );
128
129
130 bSizerTop->Add( sbFilters, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
131
132
133 bSizerMain->Add( bSizerTop, 0, wxEXPAND|wxALL, 5 );
134
135 wxBoxSizer* bLowerSizer;
136 bLowerSizer = new wxBoxSizer( wxVERTICAL );
137
138 bLowerSizer->SetMinSize( wxSize( 660,250 ) );
139 m_outputBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
140 m_changesPanel = new wxPanel( m_outputBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
141 wxBoxSizer* changesSizer;
142 changesSizer = new wxBoxSizer( wxVERTICAL );
143
144 staticChangesLabel = new wxStaticText( m_changesPanel, wxID_ANY, _("Changes to be applied:"), wxDefaultPosition, wxDefaultSize, 0 );
145 staticChangesLabel->Wrap( -1 );
146 changesSizer->Add( staticChangesLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
147
148 m_changesDataView = new wxDataViewCtrl( m_changesPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER );
149 changesSizer->Add( m_changesDataView, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
150
151
152 m_changesPanel->SetSizer( changesSizer );
153 m_changesPanel->Layout();
154 changesSizer->Fit( m_changesPanel );
155 m_outputBook->AddPage( m_changesPanel, _("a page"), false );
156 m_runningPanel = new wxPanel( m_outputBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
157 wxBoxSizer* progressSizer;
158 progressSizer = new wxBoxSizer( wxVERTICAL );
159
160 staticProgressLabel = new wxStaticText( m_runningPanel, wxID_ANY, _("Progress:"), wxDefaultPosition, wxDefaultSize, 0 );
161 staticProgressLabel->Wrap( -1 );
162 progressSizer->Add( staticProgressLabel, 0, wxALL, 5 );
163
164 m_tcReport = new wxTextCtrl( m_runningPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
165 progressSizer->Add( m_tcReport, 1, wxEXPAND|wxRIGHT|wxLEFT, 3 );
166
167
168 m_runningPanel->SetSizer( progressSizer );
169 m_runningPanel->Layout();
170 progressSizer->Fit( m_runningPanel );
171 m_outputBook->AddPage( m_runningPanel, _("a page"), false );
172
173 bLowerSizer->Add( m_outputBook, 1, wxEXPAND, 5 );
174
175
176 bSizerMain->Add( bLowerSizer, 1, wxEXPAND|wxALL, 5 );
177
178 m_sdbSizer = new wxStdDialogButtonSizer();
179 m_sdbSizerOK = new wxButton( this, wxID_OK );
180 m_sdbSizer->AddButton( m_sdbSizerOK );
181 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
182 m_sdbSizer->AddButton( m_sdbSizerCancel );
183 m_sdbSizer->Realize();
184
185 bSizerMain->Add( m_sdbSizer, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_RIGHT, 5 );
186
187
188 this->SetSizer( bSizerMain );
189 this->Layout();
190 bSizerMain->Fit( this );
191
192 this->Centre( wxBOTH );
193
194 // Connect Events
195 this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::onInitDialog ) );
196 m_cleanShortCircuitOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
197 m_cleanViasOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
198 m_deleteDanglingViasOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
199 m_mergeSegmOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
200 m_deleteUnconnectedOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
201 m_deleteTracksInPadsOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
202 m_netFilterOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
203 m_netclassFilterOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
204 m_netclassFilter->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
205 m_layerFilterOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
206 m_layerFilter->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
207 m_selectedItemsFilter->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
208 m_changesDataView->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnSelectItem ), NULL, this );
209 m_changesDataView->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnLeftDClickItem ), NULL, this );
210}
211
213{
214 // Disconnect Events
215 this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::onInitDialog ) );
216 m_cleanShortCircuitOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
217 m_cleanViasOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
218 m_deleteDanglingViasOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
219 m_mergeSegmOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
220 m_deleteUnconnectedOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
221 m_deleteTracksInPadsOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
222 m_netFilterOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
223 m_netclassFilterOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
224 m_netclassFilter->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnNetclassFilterSelect ), NULL, this );
225 m_layerFilterOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
226 m_layerFilter->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnLayerFilterSelect ), NULL, this );
227 m_selectedItemsFilter->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnCheckBox ), NULL, this );
228 m_changesDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnSelectItem ), NULL, this );
229 m_changesDataView->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::OnLeftDClickItem ), NULL, this );
230
231}
virtual void OnLayerFilterSelect(wxCommandEvent &event)
virtual void onInitDialog(wxInitDialogEvent &event)
DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Cleanup Tracks and Vias"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnNetclassFilterSelect(wxCommandEvent &event)
virtual void OnCheckBox(wxCommandEvent &event)
virtual void OnLeftDClickItem(wxMouseEvent &event)
virtual void OnSelectItem(wxDataViewEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
Class to display a pcb layer list in a wxBitmapComboBox.
#define _(s)