KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_board_statistics_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
8#include "widgets/wx_grid.h"
9
11
13
14DIALOG_BOARD_STATISTICS_BASE::DIALOG_BOARD_STATISTICS_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* bMainBoxSizer;
19 bMainBoxSizer = new wxBoxSizer( wxVERTICAL );
20
21 topNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
22 m_generalPanel = new wxPanel( topNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
23 wxBoxSizer* bGeneralPanelSizer;
24 bGeneralPanelSizer = new wxBoxSizer( wxVERTICAL );
25
26 wxFlexGridSizer* fgSizerContents;
27 fgSizerContents = new wxFlexGridSizer( 0, 2, 0, 0 );
28 fgSizerContents->AddGrowableCol( 0 );
29 fgSizerContents->AddGrowableCol( 1 );
30 fgSizerContents->AddGrowableRow( 0 );
31 fgSizerContents->AddGrowableRow( 1 );
32 fgSizerContents->SetFlexibleDirection( wxBOTH );
33 fgSizerContents->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
34
35 wxBoxSizer* bSizerComponents;
36 bSizerComponents = new wxBoxSizer( wxVERTICAL );
37
38 wxStaticText* componentsLabel;
39 componentsLabel = new wxStaticText( m_generalPanel, wxID_ANY, _("Components"), wxDefaultPosition, wxDefaultSize, 0 );
40 componentsLabel->Wrap( -1 );
41 bSizerComponents->Add( componentsLabel, 0, wxALL, 5 );
42
43 m_gridComponents = new wxGrid( m_generalPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
44
45 // Grid
46 m_gridComponents->CreateGrid( 5, 4 );
47 m_gridComponents->EnableEditing( false );
48 m_gridComponents->EnableGridLines( false );
49 m_gridComponents->EnableDragGridSize( false );
50 m_gridComponents->SetMargins( 0, 0 );
51
52 // Columns
53 m_gridComponents->EnableDragColMove( false );
54 m_gridComponents->EnableDragColSize( true );
55 m_gridComponents->SetColLabelSize( 0 );
56 m_gridComponents->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
57
58 // Rows
59 m_gridComponents->EnableDragRowSize( true );
60 m_gridComponents->SetRowLabelSize( 0 );
61 m_gridComponents->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
62
63 // Label Appearance
64
65 // Cell Defaults
66 m_gridComponents->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
67 m_gridComponents->SetMaxSize( wxSize( -1,300 ) );
68
69 bSizerComponents->Add( m_gridComponents, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
70
71
72 fgSizerContents->Add( bSizerComponents, 1, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
73
74 wxBoxSizer* bSizerPads;
75 bSizerPads = new wxBoxSizer( wxVERTICAL );
76
77 wxStaticText* padsLabel;
78 padsLabel = new wxStaticText( m_generalPanel, wxID_ANY, _("Pads"), wxDefaultPosition, wxDefaultSize, 0 );
79 padsLabel->Wrap( -1 );
80 bSizerPads->Add( padsLabel, 0, wxALL, 5 );
81
82 m_gridPads = new wxGrid( m_generalPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
83
84 // Grid
85 m_gridPads->CreateGrid( 5, 2 );
86 m_gridPads->EnableEditing( false );
87 m_gridPads->EnableGridLines( false );
88 m_gridPads->EnableDragGridSize( false );
89 m_gridPads->SetMargins( 0, 0 );
90
91 // Columns
92 m_gridPads->EnableDragColMove( false );
93 m_gridPads->EnableDragColSize( true );
94 m_gridPads->SetColLabelSize( 0 );
95 m_gridPads->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
96
97 // Rows
98 m_gridPads->EnableDragRowSize( true );
99 m_gridPads->SetRowLabelSize( 0 );
100 m_gridPads->SetRowLabelAlignment( wxALIGN_RIGHT, wxALIGN_CENTER );
101
102 // Label Appearance
103
104 // Cell Defaults
105 m_gridPads->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
106 m_gridPads->SetMaxSize( wxSize( -1,300 ) );
107
108 bSizerPads->Add( m_gridPads, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
109
110
111 fgSizerContents->Add( bSizerPads, 1, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
112
113 wxBoxSizer* bSizerBrdSize;
114 bSizerBrdSize = new wxBoxSizer( wxVERTICAL );
115
116 wxStaticText* boardLabel;
117 boardLabel = new wxStaticText( m_generalPanel, wxID_ANY, _("Board Size"), wxDefaultPosition, wxDefaultSize, 0 );
118 boardLabel->Wrap( -1 );
119 bSizerBrdSize->Add( boardLabel, 0, wxALL, 5 );
120
121 m_gridBoard = new wxGrid( m_generalPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
122
123 // Grid
124 m_gridBoard->CreateGrid( 3, 2 );
125 m_gridBoard->EnableEditing( false );
126 m_gridBoard->EnableGridLines( false );
127 m_gridBoard->EnableDragGridSize( false );
128 m_gridBoard->SetMargins( 0, 0 );
129
130 // Columns
131 m_gridBoard->EnableDragColMove( false );
132 m_gridBoard->EnableDragColSize( true );
133 m_gridBoard->SetColLabelSize( 0 );
134 m_gridBoard->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
135
136 // Rows
137 m_gridBoard->EnableDragRowSize( true );
138 m_gridBoard->SetRowLabelSize( 0 );
139 m_gridBoard->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
140
141 // Label Appearance
142
143 // Cell Defaults
144 m_gridBoard->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
145 m_gridBoard->SetMaxSize( wxSize( -1,300 ) );
146
147 bSizerBrdSize->Add( m_gridBoard, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
148
149
150 fgSizerContents->Add( bSizerBrdSize, 1, wxEXPAND|wxRIGHT, 5 );
151
152 wxBoxSizer* bSizerVias;
153 bSizerVias = new wxBoxSizer( wxVERTICAL );
154
155 viasLabel = new wxStaticText( m_generalPanel, wxID_ANY, _("Vias"), wxDefaultPosition, wxDefaultSize, 0 );
156 viasLabel->Wrap( -1 );
157 bSizerVias->Add( viasLabel, 0, wxALL, 5 );
158
159 m_gridVias = new wxGrid( m_generalPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
160
161 // Grid
162 m_gridVias->CreateGrid( 4, 2 );
163 m_gridVias->EnableEditing( false );
164 m_gridVias->EnableGridLines( false );
165 m_gridVias->EnableDragGridSize( false );
166 m_gridVias->SetMargins( 0, 0 );
167
168 // Columns
169 m_gridVias->EnableDragColMove( false );
170 m_gridVias->EnableDragColSize( true );
171 m_gridVias->SetColLabelSize( 0 );
172 m_gridVias->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
173
174 // Rows
175 m_gridVias->EnableDragRowSize( true );
176 m_gridVias->SetRowLabelSize( 0 );
177 m_gridVias->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
178
179 // Label Appearance
180
181 // Cell Defaults
182 m_gridVias->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
183 m_gridVias->SetMaxSize( wxSize( -1,300 ) );
184
185 bSizerVias->Add( m_gridVias, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
186
187
188 fgSizerContents->Add( bSizerVias, 1, wxEXPAND|wxLEFT, 5 );
189
190
191 bGeneralPanelSizer->Add( fgSizerContents, 1, wxEXPAND, 5 );
192
193 wxGridSizer* gOptionsSizer;
194 gOptionsSizer = new wxGridSizer( 0, 1, 0, 0 );
195
196 m_checkBoxSubtractHoles = new wxCheckBox( m_generalPanel, wxID_ANY, _("Subtract holes from board area"), wxDefaultPosition, wxDefaultSize, 0 );
197 gOptionsSizer->Add( m_checkBoxSubtractHoles, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 4 );
198
199 m_checkBoxExcludeComponentsNoPins = new wxCheckBox( m_generalPanel, wxID_ANY, _("Exclude footprints with no pads"), wxDefaultPosition, wxDefaultSize, 0 );
200 gOptionsSizer->Add( m_checkBoxExcludeComponentsNoPins, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 4 );
201
202
203 bGeneralPanelSizer->Add( gOptionsSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 2 );
204
205
206 m_generalPanel->SetSizer( bGeneralPanelSizer );
207 m_generalPanel->Layout();
208 bGeneralPanelSizer->Fit( m_generalPanel );
209 topNotebook->AddPage( m_generalPanel, _("General"), true );
210 m_drillsPanel = new wxPanel( topNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
211 wxBoxSizer* bDrillsSizer;
212 bDrillsSizer = new wxBoxSizer( wxVERTICAL );
213
214 m_gridDrills = new WX_GRID( m_drillsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
215
216 // Grid
217 m_gridDrills->CreateGrid( 0, 8 );
218 m_gridDrills->EnableEditing( false );
219 m_gridDrills->EnableGridLines( true );
220 m_gridDrills->EnableDragGridSize( false );
221 m_gridDrills->SetMargins( 0, 0 );
222
223 // Columns
224 m_gridDrills->AutoSizeColumns();
225 m_gridDrills->EnableDragColMove( true );
226 m_gridDrills->EnableDragColSize( true );
227 m_gridDrills->SetColLabelValue( 0, _("Count") );
228 m_gridDrills->SetColLabelValue( 1, _("Shape") );
229 m_gridDrills->SetColLabelValue( 2, _("X Size") );
230 m_gridDrills->SetColLabelValue( 3, _("Y Size") );
231 m_gridDrills->SetColLabelValue( 4, _("Plated") );
232 m_gridDrills->SetColLabelValue( 5, _("Via/Pad") );
233 m_gridDrills->SetColLabelValue( 6, _("Start Layer") );
234 m_gridDrills->SetColLabelValue( 7, _("Stop Layer") );
236 m_gridDrills->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
237
238 // Rows
239 m_gridDrills->EnableDragRowSize( false );
240 m_gridDrills->SetRowLabelSize( 0 );
241 m_gridDrills->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
242
243 // Label Appearance
244
245 // Cell Defaults
246 m_gridDrills->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
247 bDrillsSizer->Add( m_gridDrills, 1, wxALL|wxEXPAND, 5 );
248
249
250 m_drillsPanel->SetSizer( bDrillsSizer );
251 m_drillsPanel->Layout();
252 bDrillsSizer->Fit( m_drillsPanel );
253 topNotebook->AddPage( m_drillsPanel, _("Drill Holes"), false );
254
255 bMainBoxSizer->Add( topNotebook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
256
257 wxBoxSizer* bSizerBottom;
258 bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
259
260 m_buttonSaveReport = new wxButton( this, wxID_ANY, _("Generate Report File..."), wxDefaultPosition, wxDefaultSize, 0 );
261 bSizerBottom->Add( m_buttonSaveReport, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 15 );
262
263 m_sdbControlSizer = new wxStdDialogButtonSizer();
264 m_sdbControlSizerCancel = new wxButton( this, wxID_CANCEL );
266 m_sdbControlSizer->Realize();
267
268 bSizerBottom->Add( m_sdbControlSizer, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxTOP, 5 );
269
270
271 bMainBoxSizer->Add( bSizerBottom, 0, wxEXPAND, 5 );
272
273
274 this->SetSizer( bMainBoxSizer );
275 this->Layout();
276 bMainBoxSizer->Fit( this );
277
278 this->Centre( wxBOTH );
279
280 // Connect Events
281 this->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_BOARD_STATISTICS_BASE::windowSize ) );
282 m_checkBoxSubtractHoles->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BOARD_STATISTICS_BASE::checkboxClicked ), NULL, this );
283 m_checkBoxExcludeComponentsNoPins->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BOARD_STATISTICS_BASE::checkboxClicked ), NULL, this );
284 m_gridDrills->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_BOARD_STATISTICS_BASE::drillGridSize ), NULL, this );
285 m_buttonSaveReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOARD_STATISTICS_BASE::saveReportClicked ), NULL, this );
286}
287
289{
290 // Disconnect Events
291 this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_BOARD_STATISTICS_BASE::windowSize ) );
292 m_checkBoxSubtractHoles->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BOARD_STATISTICS_BASE::checkboxClicked ), NULL, this );
293 m_checkBoxExcludeComponentsNoPins->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_BOARD_STATISTICS_BASE::checkboxClicked ), NULL, this );
294 m_gridDrills->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_BOARD_STATISTICS_BASE::drillGridSize ), NULL, this );
295 m_buttonSaveReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_BOARD_STATISTICS_BASE::saveReportClicked ), NULL, this );
296
297}
virtual void saveReportClicked(wxCommandEvent &event)
DIALOG_BOARD_STATISTICS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Board Statistics"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void windowSize(wxSizeEvent &event)
virtual void drillGridSize(wxSizeEvent &event)
virtual void checkboxClicked(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbControlSizer
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:249
#define _(s)