KiCad PCB EDA Suite
panel_electrical_spacing_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
13 
14 PANEL_ELECTRICAL_SPACING_BASE::PANEL_ELECTRICAL_SPACING_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name )
15 {
16  wxBoxSizer* bSizerElectricalClearance;
17  bSizerElectricalClearance = new wxBoxSizer( wxHORIZONTAL );
18 
19  wxBoxSizer* bLeftSizerElectricalClearance;
20  bLeftSizerElectricalClearance = new wxBoxSizer( wxVERTICAL );
21 
22  wxArrayString m_ElectricalSpacingUnitsSelectorChoices;
23  m_ElectricalSpacingUnitsSelector = new UNIT_SELECTOR_LEN( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ElectricalSpacingUnitsSelectorChoices, 0 );
24  m_ElectricalSpacingUnitsSelector->SetSelection( -1 );
25  m_ElectricalSpacingUnitsSelector->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
26 
27  bLeftSizerElectricalClearance->Add( m_ElectricalSpacingUnitsSelector, 0, wxEXPAND|wxALL, 10 );
28 
29  m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
30  bLeftSizerElectricalClearance->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
31 
32  m_staticText891 = new wxStaticText( this, wxID_ANY, _("Voltage > 500 V:"), wxDefaultPosition, wxDefaultSize, 0 );
33  m_staticText891->Wrap( -1 );
34  bLeftSizerElectricalClearance->Add( m_staticText891, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
35 
36  m_ElectricalSpacingVoltage = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
37  bLeftSizerElectricalClearance->Add( m_ElectricalSpacingVoltage, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
38 
39  m_buttonElectSpacingRefresh = new wxButton( this, wxID_ANY, _("Update Values"), wxDefaultPosition, wxDefaultSize, 0 );
40  bLeftSizerElectricalClearance->Add( m_buttonElectSpacingRefresh, 0, wxEXPAND|wxALL, 5 );
41 
42 
43  bSizerElectricalClearance->Add( bLeftSizerElectricalClearance, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
44 
45  m_electricalSpacingSizer = new wxBoxSizer( wxVERTICAL );
46 
47  m_staticTextElectricalSpacing = new wxStaticText( this, wxID_ANY, _("Note: Values are minimal values (from IPC 2221)"), wxDefaultPosition, wxDefaultSize, 0 );
49  m_staticTextElectricalSpacing->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
50 
51  m_electricalSpacingSizer->Add( m_staticTextElectricalSpacing, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
52 
53  m_gridElectricalSpacingValues = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
54 
55  // Grid
56  m_gridElectricalSpacingValues->CreateGrid( 10, 7 );
57  m_gridElectricalSpacingValues->EnableEditing( false );
58  m_gridElectricalSpacingValues->EnableGridLines( true );
59  m_gridElectricalSpacingValues->EnableDragGridSize( false );
60  m_gridElectricalSpacingValues->SetMargins( 0, 0 );
61 
62  // Columns
63  m_gridElectricalSpacingValues->SetColSize( 0, 100 );
64  m_gridElectricalSpacingValues->SetColSize( 1, 100 );
65  m_gridElectricalSpacingValues->SetColSize( 2, 100 );
66  m_gridElectricalSpacingValues->SetColSize( 3, 100 );
67  m_gridElectricalSpacingValues->SetColSize( 4, 100 );
68  m_gridElectricalSpacingValues->SetColSize( 5, 100 );
69  m_gridElectricalSpacingValues->SetColSize( 6, 100 );
70  m_gridElectricalSpacingValues->EnableDragColMove( false );
71  m_gridElectricalSpacingValues->EnableDragColSize( true );
72  m_gridElectricalSpacingValues->SetColLabelValue( 0, _("B1") );
73  m_gridElectricalSpacingValues->SetColLabelValue( 1, _("B2") );
74  m_gridElectricalSpacingValues->SetColLabelValue( 2, _("B3") );
75  m_gridElectricalSpacingValues->SetColLabelValue( 3, _("B4") );
76  m_gridElectricalSpacingValues->SetColLabelValue( 4, _("A5") );
77  m_gridElectricalSpacingValues->SetColLabelValue( 5, _("A6") );
78  m_gridElectricalSpacingValues->SetColLabelValue( 6, _("A7") );
79  m_gridElectricalSpacingValues->SetColLabelSize( 30 );
80  m_gridElectricalSpacingValues->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
81 
82  // Rows
83  m_gridElectricalSpacingValues->SetRowSize( 0, 24 );
84  m_gridElectricalSpacingValues->SetRowSize( 1, 24 );
85  m_gridElectricalSpacingValues->SetRowSize( 2, 24 );
86  m_gridElectricalSpacingValues->SetRowSize( 3, 24 );
87  m_gridElectricalSpacingValues->SetRowSize( 4, 24 );
88  m_gridElectricalSpacingValues->SetRowSize( 5, 24 );
89  m_gridElectricalSpacingValues->SetRowSize( 6, 24 );
90  m_gridElectricalSpacingValues->SetRowSize( 7, 24 );
91  m_gridElectricalSpacingValues->SetRowSize( 8, 24 );
92  m_gridElectricalSpacingValues->SetRowSize( 9, 24 );
93  m_gridElectricalSpacingValues->EnableDragRowSize( false );
94  m_gridElectricalSpacingValues->SetRowLabelValue( 0, _("0 .. 15 V") );
95  m_gridElectricalSpacingValues->SetRowLabelValue( 1, _("16 .. 30 V") );
96  m_gridElectricalSpacingValues->SetRowLabelValue( 2, _("31 .. 50 V") );
97  m_gridElectricalSpacingValues->SetRowLabelValue( 3, _("51 .. 100 V") );
98  m_gridElectricalSpacingValues->SetRowLabelValue( 4, _("101 .. 150 V") );
99  m_gridElectricalSpacingValues->SetRowLabelValue( 5, _("151 .. 170 V") );
100  m_gridElectricalSpacingValues->SetRowLabelValue( 6, _("171 .. 250 V") );
101  m_gridElectricalSpacingValues->SetRowLabelValue( 7, _("251 .. 300 V") );
102  m_gridElectricalSpacingValues->SetRowLabelValue( 8, _("301 .. 500 V") );
103  m_gridElectricalSpacingValues->SetRowLabelValue( 9, _(" > 500 V") );
104  m_gridElectricalSpacingValues->SetRowLabelSize( 100 );
105  m_gridElectricalSpacingValues->SetRowLabelAlignment( wxALIGN_RIGHT, wxALIGN_CENTER );
106 
107  // Label Appearance
108 
109  // Cell Defaults
110  m_gridElectricalSpacingValues->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_TOP );
112 
113  m_staticText88 = new wxStaticText( this, wxID_ANY, _("* B1 - Internal Conductors\n* B2 - External Conductors, uncoated, sea level to 3050 m\n* B3 - External Conductors, uncoated, over 3050 m\n* B4 - External Conductors, with permanent polymer coating (any elevation)\n* A5 - External Conductors, with conformal coating over assembly (any elevation)\n* A6 - External Component lead/termination, uncoated\n* A7 - External Component lead termination, with conformal coating (any elevation)"), wxDefaultPosition, wxDefaultSize, 0 );
114  m_staticText88->Wrap( -1 );
115  m_electricalSpacingSizer->Add( m_staticText88, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
116 
117 
118  bSizerElectricalClearance->Add( m_electricalSpacingSizer, 1, wxEXPAND|wxLEFT, 20 );
119 
120 
121  this->SetSizer( bSizerElectricalClearance );
122  this->Layout();
123 
124  // Connect Events
125  m_ElectricalSpacingUnitsSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
126  m_buttonElectSpacingRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_BASE::OnElectricalSpacingRefresh ), NULL, this );
127 }
128 
130 {
131  // Disconnect Events
132  m_ElectricalSpacingUnitsSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
133  m_buttonElectSpacingRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_ELECTRICAL_SPACING_BASE::OnElectricalSpacingRefresh ), NULL, this );
134 
135 }
virtual void OnElectricalSpacingUnitsSelection(wxCommandEvent &event)
virtual void OnElectricalSpacingRefresh(wxCommandEvent &event)
PANEL_ELECTRICAL_SPACING_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 300), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
#define _(s)
const char * name
Definition: DXF_plotter.cpp:56