14PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID
id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString&
name ) :
CALCULATOR_PANEL( parent, id, pos, size, style,
name )
16 wxBoxSizer* bSizerMain;
17 bSizerMain =
new wxBoxSizer( wxVERTICAL );
20 bSizer9 =
new wxBoxSizer( wxHORIZONTAL );
23 bSizer4 =
new wxBoxSizer( wxHORIZONTAL );
25 wxStaticBoxSizer* sbSizerLeft;
26 sbSizerLeft =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Wire properties") ), wxVERTICAL );
28 wxFlexGridSizer* fgSizerLeft;
29 fgSizerLeft =
new wxFlexGridSizer( 0, 3, 0, 0 );
30 fgSizerLeft->AddGrowableCol( 1 );
31 fgSizerLeft->SetFlexibleDirection( wxBOTH );
32 fgSizerLeft->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
34 m_staticTextSize =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"Standard Size:"), wxDefaultPosition, wxDefaultSize, 0 );
38 wxArrayString m_sizeChoiceChoices;
39 m_sizeChoice =
new wxChoice( sbSizerLeft->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_sizeChoiceChoices, 0 );
41 fgSizerLeft->Add(
m_sizeChoice, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
44 fgSizerLeft->Add( 0, 0, 1, wxEXPAND, 5 );
46 m_staticTextDiameter =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"Diameter:"), wxDefaultPosition, wxDefaultSize, 0 );
50 m_diameterCtrl =
new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
51 fgSizerLeft->Add(
m_diameterCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
53 wxArrayString m_diameterUnitChoices;
58 m_staticTextArea =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"Area:"), wxDefaultPosition, wxDefaultSize, 0 );
62 m_areaCtrl =
new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
63 fgSizerLeft->Add(
m_areaCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
65 m_stUnitmmSq =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"mm^2"), wxDefaultPosition, wxDefaultSize, 0 );
67 fgSizerLeft->Add(
m_stUnitmmSq, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP, 5 );
69 m_staticTextResitivity =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"Conductor resistivity:"), wxDefaultPosition, wxDefaultSize, 0 );
75 wxBoxSizer* bSizerResistivity;
76 bSizerResistivity =
new wxBoxSizer( wxHORIZONTAL );
87 fgSizerLeft->Add( bSizerResistivity, 0, wxEXPAND, 5 );
89 m_stUnitOhmMeter =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"ohm-meter"), wxDefaultPosition, wxDefaultSize, 0 );
91 fgSizerLeft->Add(
m_stUnitOhmMeter, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP, 5 );
93 m_staticTextTempCoeff =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"Temperature Coefficient:"), wxDefaultPosition, wxDefaultSize, 0 );
99 wxBoxSizer* bSizerTempCoeff;
100 bSizerTempCoeff =
new wxBoxSizer( wxHORIZONTAL );
102 m_textCtrlConductorThermCoef =
new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
105 m_button_Temp_Coef_Conductor =
new wxButton( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
109 fgSizerLeft->Add( bSizerTempCoeff, 0, wxEXPAND, 5 );
112 fgSizerLeft->Add( 0, 0, 1, wxEXPAND, 5 );
114 m_staticTextLinRes =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"Linear resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
118 m_linResistanceCtrl =
new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
121 wxArrayString m_linResistanceUnitChoices;
126 m_staticTextSkin =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"Frequency for 100% skin depth:"), wxDefaultPosition, wxDefaultSize, 0 );
130 m_frequencyCtrl =
new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
131 fgSizerLeft->Add(
m_frequencyCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
133 wxArrayString m_frequencyUnitChoices;
138 m_staticTextAmpacity =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"Ampacity:"), wxDefaultPosition, wxDefaultSize, 0 );
142 m_AmpacityCtrl =
new wxTextCtrl( sbSizerLeft->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
143 fgSizerLeft->Add(
m_AmpacityCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
145 m_staticText16421 =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"A"), wxDefaultPosition, wxDefaultSize, 0 );
149 m_staticTextDensity =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"Current density"), wxDefaultPosition, wxDefaultSize, 0 );
153 m_slCurrentDensity =
new wxSlider( sbSizerLeft->GetStaticBox(), wxID_ANY, 3, 3, 12, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS|wxSL_VALUE_LABEL );
156 m_stUnitAmp_mmSq =
new wxStaticText( sbSizerLeft->GetStaticBox(), wxID_ANY,
_(
"A/mm^2"), wxDefaultPosition, wxDefaultSize, 0 );
161 sbSizerLeft->Add( fgSizerLeft, 0, wxALL|wxEXPAND, 5 );
164 bSizer4->Add( sbSizerLeft, 0, wxALL|wxEXPAND, 5 );
166 wxStaticBoxSizer* sbSizerRight;
167 sbSizerRight =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Application") ), wxVERTICAL );
169 wxFlexGridSizer* fgSizerRight;
170 fgSizerRight =
new wxFlexGridSizer( 0, 3, 0, 0 );
171 fgSizerRight->AddGrowableCol( 1 );
172 fgSizerRight->SetFlexibleDirection( wxBOTH );
173 fgSizerRight->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
175 m_staticTextCableTemp =
new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY,
_(
"Cable temperature:"), wxDefaultPosition, wxDefaultSize, 0 );
181 m_conductorTempCtrl =
new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
186 m_stUnitDegC =
new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY,
_(
"deg C"), wxDefaultPosition, wxDefaultSize, 0 );
188 fgSizerRight->Add(
m_stUnitDegC, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
190 m_staticTextCurrent =
new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY,
_(
"Current:"), wxDefaultPosition, wxDefaultSize, 0 );
194 m_currentCtrl =
new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
195 fgSizerRight->Add(
m_currentCtrl, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
197 m_staticText =
new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY,
_(
"A"), wxDefaultPosition, wxDefaultSize, 0 );
199 fgSizerRight->Add(
m_staticText, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP, 5 );
201 m_staticTextLen =
new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY,
_(
"Length:"), wxDefaultPosition, wxDefaultSize, 0 );
205 fgSizerRight->Add(
m_staticTextLen, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
207 m_lengthCtrl =
new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
208 fgSizerRight->Add(
m_lengthCtrl, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
210 wxArrayString m_lengthUnitChoices;
213 fgSizerRight->Add(
m_lengthUnit, 0, wxTOP|wxEXPAND, 5 );
215 m_staticTextResDC =
new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY,
_(
"Resistance DC:"), wxDefaultPosition, wxDefaultSize, 0 );
221 m_resistanceDcCtrl =
new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
224 m_stUnitOhm =
new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY,
_(
"ohm"), wxDefaultPosition, wxDefaultSize, 0 );
226 fgSizerRight->Add(
m_stUnitOhm, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
228 m_staticTextDrop =
new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY,
_(
"Voltage drop:"), wxDefaultPosition, wxDefaultSize, 0 );
232 m_vDropCtrl =
new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
233 fgSizerRight->Add(
m_vDropCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
235 wxArrayString m_vDropUnitChoices;
238 fgSizerRight->Add(
m_vDropUnit, 0, wxEXPAND|wxTOP, 5 );
240 m_staticTextPower =
new wxStaticText( sbSizerRight->GetStaticBox(), wxID_ANY,
_(
"Dissipated power:"), wxDefaultPosition, wxDefaultSize, 0 );
244 m_powerCtrl =
new wxTextCtrl( sbSizerRight->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
245 fgSizerRight->Add(
m_powerCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
247 wxArrayString m_powerUnitChoices;
250 fgSizerRight->Add(
m_powerUnit, 0, wxEXPAND|wxTOP, 5 );
253 sbSizerRight->Add( fgSizerRight, 1, wxALL, 5 );
256 bSizer4->Add( sbSizerRight, 1, wxALL|wxEXPAND, 5 );
259 bSizer9->Add( bSizer4, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
262 bSizerMain->Add( bSizer9, 0, wxEXPAND, 5 );
265 this->SetSizer( bSizerMain );
267 bSizerMain->Fit(
this );
wxStaticText * m_staticTextTempCoeff
wxStaticText * m_staticTextResitivity
PANEL_CABLE_SIZE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
UNIT_SELECTOR_LEN_CABLE * m_lengthUnit
virtual void OnResistanceDcChange(wxCommandEvent &event)
UNIT_SELECTOR_POWER * m_powerUnit
wxSlider * m_slCurrentDensity
wxStaticText * m_staticTextDiameter
wxStaticText * m_stUnitmmSq
wxStaticText * m_staticTextResDC
wxStaticText * m_stUnitOhm
virtual void OnConductorTempChange(wxCommandEvent &event)
UNIT_SELECTOR_FREQUENCY * m_frequencyUnit
wxTextCtrl * m_frequencyCtrl
wxStaticText * m_staticTextAmpacity
wxStaticText * m_staticTextSize
virtual void OnPowerChange(wxCommandEvent &event)
virtual void OnCurrentChange(wxCommandEvent &event)
virtual void onUpdateCurrentDensity(wxScrollEvent &event)
wxStaticText * m_staticText16421
virtual void OnLengthChange(wxCommandEvent &event)
wxTextCtrl * m_textCtrlConductorResistivity
wxStaticText * m_stUnitAmp_mmSq
virtual void OnVDropChange(wxCommandEvent &event)
virtual void OnAreaChange(wxCommandEvent &event)
wxStaticText * m_staticTextDensity
virtual void OnConductorResistivity_Button(wxCommandEvent &event)
wxButton * m_button_Temp_Coef_Conductor
wxStaticText * m_staticTextDrop
wxTextCtrl * m_lengthCtrl
virtual void OnConductorThermCoefChange_Button(wxCommandEvent &event)
wxButton * m_button_ResistivityConductor
wxTextCtrl * m_currentCtrl
virtual void OnUpdateUnit(wxCommandEvent &event)
virtual void OnLinResistanceChange(wxCommandEvent &event)
wxTextCtrl * m_conductorTempCtrl
virtual void OnConductorThermCoefChange(wxCommandEvent &event)
wxStaticText * m_stUnitDegC
wxStaticText * m_staticText
UNIT_SELECTOR_LEN * m_diameterUnit
wxStaticText * m_stUnitOhmMeter
wxStaticText * m_staticTextCableTemp
wxTextCtrl * m_AmpacityCtrl
wxTextCtrl * m_linResistanceCtrl
wxStaticText * m_staticTextPower
virtual void OnDiameterChange(wxCommandEvent &event)
virtual void OnConductorResistivityChange(wxCommandEvent &event)
wxStaticText * m_staticTextSkin
virtual void OnFrequencyChange(wxCommandEvent &event)
virtual void OnCableSizeChange(wxCommandEvent &event)
wxTextCtrl * m_diameterCtrl
wxStaticText * m_staticTextLen
wxStaticText * m_staticTextLinRes
UNIT_SELECTOR_VOLTAGE * m_vDropUnit
virtual void OnAmpacityChange(wxCommandEvent &event)
wxStaticText * m_staticTextCurrent
wxTextCtrl * m_resistanceDcCtrl
UNIT_SELECTOR_LINEAR_RESISTANCE * m_linResistanceUnit
wxStaticText * m_staticTextArea
wxTextCtrl * m_textCtrlConductorThermCoef