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