KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PANEL_CABLE_SIZE Class Reference

#include <panel_cable_size.h>

Inheritance diagram for PANEL_CABLE_SIZE:
PANEL_CABLE_SIZE_BASE CALCULATOR_PANEL

Public Member Functions

 PANEL_CABLE_SIZE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_CABLE_SIZE ()
 
void LoadSettings (PCB_CALCULATOR_SETTINGS *aCfg) override
 Load the settings into the panel.
 
void SaveSettings (PCB_CALCULATOR_SETTINGS *aCfg) override
 Save the settings from the panel.
 
void ThemeChanged () override
 Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appropriate for the new theme.
 
void OnCableSizeChange (wxCommandEvent &aEvent) override
 
void OnConductorResistivityChange (wxCommandEvent &aEvent) override
 
void OnConductorResistivity_Button (wxCommandEvent &aEvent) override
 
void OnConductorThermCoefChange (wxCommandEvent &aEvent) override
 
void OnConductorThermCoefChange_Button (wxCommandEvent &aEvent) override
 
void OnUpdateUnit (wxCommandEvent &aEvent) override
 
void OnDiameterChange (wxCommandEvent &aEvent) override
 
void OnAreaChange (wxCommandEvent &aEvent) override
 
void OnLinResistanceChange (wxCommandEvent &aEvent) override
 
void OnFrequencyChange (wxCommandEvent &aEvent) override
 
void OnAmpacityChange (wxCommandEvent &aEvent) override
 
void OnConductorTempChange (wxCommandEvent &aEvent) override
 
void OnCurrentChange (wxCommandEvent &aEvent) override
 
void OnLengthChange (wxCommandEvent &aEvent) override
 
void OnResistanceDcChange (wxCommandEvent &aEvent) override
 
void OnVDropChange (wxCommandEvent &aEvent) override
 
void OnPowerChange (wxCommandEvent &aEvent) override
 
void onUpdateCurrentDensity (wxScrollEvent &aEvent) override
 

Protected Attributes

wxStaticText * m_staticTextSize
 
wxChoice * m_sizeChoice
 
wxStaticText * m_staticTextDiameter
 
wxTextCtrl * m_diameterCtrl
 
UNIT_SELECTOR_LENm_diameterUnit
 
wxStaticText * m_staticTextArea
 
wxTextCtrl * m_areaCtrl
 
wxStaticText * m_stUnitmmSq
 
wxStaticText * m_staticTextResitivity
 
wxTextCtrl * m_textCtrlConductorResistivity
 
wxButton * m_button_ResistivityConductor
 
wxStaticText * m_stUnitOhmMeter
 
wxStaticText * m_staticTextTempCoeff
 
wxTextCtrl * m_textCtrlConductorThermCoef
 
wxButton * m_button_Temp_Coef_Conductor
 
wxStaticText * m_staticTextLinRes
 
wxTextCtrl * m_linResistanceCtrl
 
UNIT_SELECTOR_LINEAR_RESISTANCEm_linResistanceUnit
 
wxStaticText * m_staticTextSkin
 
wxTextCtrl * m_frequencyCtrl
 
UNIT_SELECTOR_FREQUENCYm_frequencyUnit
 
wxStaticText * m_staticTextAmpacity
 
wxTextCtrl * m_AmpacityCtrl
 
wxStaticText * m_staticText16421
 
wxStaticText * m_staticTextDensity
 
wxSlider * m_slCurrentDensity
 
wxStaticText * m_stUnitAmp_mmSq
 
wxStaticText * m_staticTextCableTemp
 
wxTextCtrl * m_conductorTempCtrl
 
wxStaticText * m_stUnitDegC
 
wxStaticText * m_staticTextCurrent
 
wxTextCtrl * m_currentCtrl
 
wxStaticText * m_staticText
 
wxStaticText * m_staticTextLen
 
wxTextCtrl * m_lengthCtrl
 
UNIT_SELECTOR_LEN_CABLEm_lengthUnit
 
wxStaticText * m_staticTextResDC
 
wxTextCtrl * m_resistanceDcCtrl
 
wxStaticText * m_stUnitOhm
 
wxStaticText * m_staticTextDrop
 
wxTextCtrl * m_vDropCtrl
 
UNIT_SELECTOR_VOLTAGEm_vDropUnit
 
wxStaticText * m_staticTextPower
 
wxTextCtrl * m_powerCtrl
 
UNIT_SELECTOR_POWERm_powerUnit
 

Private Member Functions

void updateAll (double aRadius)
 
void updateApplication ()
 
void printAll ()
 
void buildCableList ()
 
double m2_by_ampere ()
 

Private Attributes

std::vector< CABLE_SIZE_ENTRYm_entries
 
bool m_updatingUI
 
bool m_updatingDiameter
 
bool m_updatingArea
 
bool m_updatingConductorMaterialResitivity
 
bool m_updatingLinResistance
 
bool m_updatingFrequency
 
bool m_updatingAmpacity
 
bool m_updatingCurrent
 
bool m_updatingLength
 
bool m_updatingResistanceDc
 
bool m_updatingRVdrop
 
bool m_updatingPower
 
bool m_imperial
 
double m_conductorMaterialResitivity
 
double m_conductorMaterialResitivityRef
 
double m_conductorMaterialThermalCoef
 
double m_diameter
 
double m_conductorTemperature
 
double m_current
 
double m_length
 
double m_area
 
double m_linearResistance
 
double m_maxFrequency
 
double m_resistanceDc
 
double m_voltageDrop
 
double m_dissipatedPower
 
double m_ampacity
 
double m_amp_by_mm2
 

Detailed Description

Definition at line 40 of file panel_cable_size.h.

Constructor & Destructor Documentation

◆ PANEL_CABLE_SIZE()

◆ ~PANEL_CABLE_SIZE()

PANEL_CABLE_SIZE::~PANEL_CABLE_SIZE ( )

Definition at line 86 of file panel_cable_size.cpp.

Member Function Documentation

◆ buildCableList()

void PANEL_CABLE_SIZE::buildCableList ( )
private

Definition at line 91 of file panel_cable_size.cpp.

References _, m_entries, and PANEL_CABLE_SIZE_BASE::m_sizeChoice.

Referenced by PANEL_CABLE_SIZE().

◆ LoadSettings()

◆ m2_by_ampere()

double PANEL_CABLE_SIZE::m2_by_ampere ( )
inlineprivate
Returns
the area of the conductor in m2 by ampere, depending on m_amp_by_mm2 setting

Definition at line 79 of file panel_cable_size.h.

References M2_to_MM2, and m_amp_by_mm2.

Referenced by OnAmpacityChange(), and updateAll().

◆ OnAmpacityChange()

void PANEL_CABLE_SIZE::OnAmpacityChange ( wxCommandEvent &  aEvent)
overridevirtual

◆ OnAreaChange()

void PANEL_CABLE_SIZE::OnAreaChange ( wxCommandEvent &  aEvent)
overridevirtual

◆ OnCableSizeChange()

void PANEL_CABLE_SIZE::OnCableSizeChange ( wxCommandEvent &  aEvent)
overridevirtual

Reimplemented from PANEL_CABLE_SIZE_BASE.

Definition at line 208 of file panel_cable_size.cpp.

References m_entries, PANEL_CABLE_SIZE_BASE::m_sizeChoice, m_updatingUI, and updateAll().

◆ OnConductorResistivity_Button()

void PANEL_CABLE_SIZE::OnConductorResistivity_Button ( wxCommandEvent &  aEvent)
overridevirtual

◆ OnConductorResistivityChange()

void PANEL_CABLE_SIZE::OnConductorResistivityChange ( wxCommandEvent &  aEvent)
overridevirtual

◆ OnConductorTempChange()

void PANEL_CABLE_SIZE::OnConductorTempChange ( wxCommandEvent &  aEvent)
overridevirtual

◆ OnConductorThermCoefChange()

void PANEL_CABLE_SIZE::OnConductorThermCoefChange ( wxCommandEvent &  aEvent)
overridevirtual

◆ OnConductorThermCoefChange_Button()

void PANEL_CABLE_SIZE::OnConductorThermCoefChange_Button ( wxCommandEvent &  aEvent)
overridevirtual

◆ OnCurrentChange()

void PANEL_CABLE_SIZE::OnCurrentChange ( wxCommandEvent &  aEvent)
overridevirtual

◆ OnDiameterChange()

void PANEL_CABLE_SIZE::OnDiameterChange ( wxCommandEvent &  aEvent)
overridevirtual

◆ OnFrequencyChange()

◆ OnLengthChange()

void PANEL_CABLE_SIZE::OnLengthChange ( wxCommandEvent &  aEvent)
overridevirtual

◆ OnLinResistanceChange()

◆ OnPowerChange()

◆ OnResistanceDcChange()

void PANEL_CABLE_SIZE::OnResistanceDcChange ( wxCommandEvent &  aEvent)
overridevirtual

◆ onUpdateCurrentDensity()

void PANEL_CABLE_SIZE::onUpdateCurrentDensity ( wxScrollEvent &  aEvent)
overridevirtual

◆ OnUpdateUnit()

void PANEL_CABLE_SIZE::OnUpdateUnit ( wxCommandEvent &  aEvent)
overridevirtual

Reimplemented from PANEL_CABLE_SIZE_BASE.

Definition at line 136 of file panel_cable_size.cpp.

References printAll().

◆ OnVDropChange()

◆ printAll()

void PANEL_CABLE_SIZE::printAll ( )
private

Definition at line 466 of file panel_cable_size.cpp.

References UNIT_SELECTOR_LEN::GetUnitScale(), UNIT_SELECTOR_FREQUENCY::GetUnitScale(), UNIT_SELECTOR_LINEAR_RESISTANCE::GetUnitScale(), UNIT_SELECTOR_LEN_CABLE::GetUnitScale(), UNIT_SELECTOR_VOLTAGE::GetUnitScale(), UNIT_SELECTOR_POWER::GetUnitScale(), M2_to_MM2, m_ampacity, PANEL_CABLE_SIZE_BASE::m_AmpacityCtrl, m_area, PANEL_CABLE_SIZE_BASE::m_areaCtrl, m_conductorMaterialResitivity, m_conductorMaterialResitivityRef, m_conductorTemperature, m_current, PANEL_CABLE_SIZE_BASE::m_currentCtrl, m_diameter, PANEL_CABLE_SIZE_BASE::m_diameterCtrl, PANEL_CABLE_SIZE_BASE::m_diameterUnit, m_dissipatedPower, PANEL_CABLE_SIZE_BASE::m_frequencyCtrl, PANEL_CABLE_SIZE_BASE::m_frequencyUnit, m_length, PANEL_CABLE_SIZE_BASE::m_lengthCtrl, PANEL_CABLE_SIZE_BASE::m_lengthUnit, m_linearResistance, PANEL_CABLE_SIZE_BASE::m_linResistanceCtrl, PANEL_CABLE_SIZE_BASE::m_linResistanceUnit, m_maxFrequency, PANEL_CABLE_SIZE_BASE::m_powerCtrl, PANEL_CABLE_SIZE_BASE::m_powerUnit, m_resistanceDc, PANEL_CABLE_SIZE_BASE::m_resistanceDcCtrl, PANEL_CABLE_SIZE_BASE::m_textCtrlConductorResistivity, m_updatingAmpacity, m_updatingArea, m_updatingConductorMaterialResitivity, m_updatingCurrent, m_updatingDiameter, m_updatingFrequency, m_updatingLength, m_updatingLinResistance, m_updatingPower, m_updatingResistanceDc, m_updatingRVdrop, m_updatingUI, PANEL_CABLE_SIZE_BASE::m_vDropCtrl, PANEL_CABLE_SIZE_BASE::m_vDropUnit, and m_voltageDrop.

Referenced by OnUpdateUnit(), updateAll(), and updateApplication().

◆ SaveSettings()

◆ ThemeChanged()

void PANEL_CABLE_SIZE::ThemeChanged ( )
inlineoverridevirtual

Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appropriate for the new theme.

Implements CALCULATOR_PANEL.

Definition at line 51 of file panel_cable_size.h.

◆ updateAll()

◆ updateApplication()

void PANEL_CABLE_SIZE::updateApplication ( )
private

Member Data Documentation

◆ m_amp_by_mm2

double PANEL_CABLE_SIZE::m_amp_by_mm2
private

◆ m_ampacity

double PANEL_CABLE_SIZE::m_ampacity
private

Definition at line 116 of file panel_cable_size.h.

Referenced by printAll(), and updateAll().

◆ m_AmpacityCtrl

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_AmpacityCtrl
protectedinherited

◆ m_area

double PANEL_CABLE_SIZE::m_area
private

Definition at line 110 of file panel_cable_size.h.

Referenced by printAll(), and updateAll().

◆ m_areaCtrl

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_areaCtrl
protectedinherited

◆ m_button_ResistivityConductor

wxButton* PANEL_CABLE_SIZE_BASE::m_button_ResistivityConductor
protectedinherited

◆ m_button_Temp_Coef_Conductor

wxButton* PANEL_CABLE_SIZE_BASE::m_button_Temp_Coef_Conductor
protectedinherited

◆ m_conductorMaterialResitivity

double PANEL_CABLE_SIZE::m_conductorMaterialResitivity
private

◆ m_conductorMaterialResitivityRef

double PANEL_CABLE_SIZE::m_conductorMaterialResitivityRef
private

◆ m_conductorMaterialThermalCoef

double PANEL_CABLE_SIZE::m_conductorMaterialThermalCoef
private

Definition at line 105 of file panel_cable_size.h.

Referenced by OnConductorThermCoefChange(), PANEL_CABLE_SIZE(), and updateAll().

◆ m_conductorTempCtrl

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_conductorTempCtrl
protectedinherited

◆ m_conductorTemperature

double PANEL_CABLE_SIZE::m_conductorTemperature
private

Definition at line 107 of file panel_cable_size.h.

Referenced by OnConductorTempChange(), PANEL_CABLE_SIZE(), printAll(), and updateAll().

◆ m_current

double PANEL_CABLE_SIZE::m_current
private

◆ m_currentCtrl

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_currentCtrl
protectedinherited

◆ m_diameter

◆ m_diameterCtrl

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_diameterCtrl
protectedinherited

◆ m_diameterUnit

◆ m_dissipatedPower

double PANEL_CABLE_SIZE::m_dissipatedPower
private

Definition at line 115 of file panel_cable_size.h.

Referenced by printAll(), updateAll(), and updateApplication().

◆ m_entries

std::vector<CABLE_SIZE_ENTRY> PANEL_CABLE_SIZE::m_entries
private

Definition at line 85 of file panel_cable_size.h.

Referenced by buildCableList(), and OnCableSizeChange().

◆ m_frequencyCtrl

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_frequencyCtrl
protectedinherited

◆ m_frequencyUnit

◆ m_imperial

bool PANEL_CABLE_SIZE::m_imperial
private

Definition at line 100 of file panel_cable_size.h.

Referenced by PANEL_CABLE_SIZE().

◆ m_length

double PANEL_CABLE_SIZE::m_length
private

◆ m_lengthCtrl

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_lengthCtrl
protectedinherited

◆ m_lengthUnit

◆ m_linearResistance

double PANEL_CABLE_SIZE::m_linearResistance
private

Definition at line 111 of file panel_cable_size.h.

Referenced by printAll(), updateAll(), and updateApplication().

◆ m_linResistanceCtrl

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_linResistanceCtrl
protectedinherited

◆ m_linResistanceUnit

◆ m_maxFrequency

double PANEL_CABLE_SIZE::m_maxFrequency
private

Definition at line 112 of file panel_cable_size.h.

Referenced by printAll(), and updateAll().

◆ m_powerCtrl

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_powerCtrl
protectedinherited

◆ m_powerUnit

UNIT_SELECTOR_POWER* PANEL_CABLE_SIZE_BASE::m_powerUnit
protectedinherited

◆ m_resistanceDc

double PANEL_CABLE_SIZE::m_resistanceDc
private

Definition at line 113 of file panel_cable_size.h.

Referenced by printAll(), updateAll(), and updateApplication().

◆ m_resistanceDcCtrl

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_resistanceDcCtrl
protectedinherited

◆ m_sizeChoice

◆ m_slCurrentDensity

wxSlider* PANEL_CABLE_SIZE_BASE::m_slCurrentDensity
protectedinherited

◆ m_staticText

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticText
protectedinherited

◆ m_staticText16421

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticText16421
protectedinherited

◆ m_staticTextAmpacity

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextAmpacity
protectedinherited

◆ m_staticTextArea

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextArea
protectedinherited

◆ m_staticTextCableTemp

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextCableTemp
protectedinherited

◆ m_staticTextCurrent

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextCurrent
protectedinherited

◆ m_staticTextDensity

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextDensity
protectedinherited

◆ m_staticTextDiameter

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextDiameter
protectedinherited

◆ m_staticTextDrop

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextDrop
protectedinherited

◆ m_staticTextLen

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextLen
protectedinherited

◆ m_staticTextLinRes

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextLinRes
protectedinherited

◆ m_staticTextPower

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextPower
protectedinherited

◆ m_staticTextResDC

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextResDC
protectedinherited

◆ m_staticTextResitivity

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextResitivity
protectedinherited

◆ m_staticTextSize

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextSize
protectedinherited

◆ m_staticTextSkin

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextSkin
protectedinherited

◆ m_staticTextTempCoeff

wxStaticText* PANEL_CABLE_SIZE_BASE::m_staticTextTempCoeff
protectedinherited

◆ m_stUnitAmp_mmSq

wxStaticText* PANEL_CABLE_SIZE_BASE::m_stUnitAmp_mmSq
protectedinherited

◆ m_stUnitDegC

wxStaticText* PANEL_CABLE_SIZE_BASE::m_stUnitDegC
protectedinherited

◆ m_stUnitmmSq

wxStaticText* PANEL_CABLE_SIZE_BASE::m_stUnitmmSq
protectedinherited

◆ m_stUnitOhm

wxStaticText* PANEL_CABLE_SIZE_BASE::m_stUnitOhm
protectedinherited

◆ m_stUnitOhmMeter

wxStaticText* PANEL_CABLE_SIZE_BASE::m_stUnitOhmMeter
protectedinherited

◆ m_textCtrlConductorResistivity

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_textCtrlConductorResistivity
protectedinherited

◆ m_textCtrlConductorThermCoef

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_textCtrlConductorThermCoef
protectedinherited

◆ m_updatingAmpacity

bool PANEL_CABLE_SIZE::m_updatingAmpacity
private

Definition at line 93 of file panel_cable_size.h.

Referenced by OnAmpacityChange(), PANEL_CABLE_SIZE(), and printAll().

◆ m_updatingArea

bool PANEL_CABLE_SIZE::m_updatingArea
private

Definition at line 89 of file panel_cable_size.h.

Referenced by OnAreaChange(), PANEL_CABLE_SIZE(), and printAll().

◆ m_updatingConductorMaterialResitivity

bool PANEL_CABLE_SIZE::m_updatingConductorMaterialResitivity
private

Definition at line 90 of file panel_cable_size.h.

Referenced by OnConductorResistivityChange(), PANEL_CABLE_SIZE(), and printAll().

◆ m_updatingCurrent

bool PANEL_CABLE_SIZE::m_updatingCurrent
private

Definition at line 94 of file panel_cable_size.h.

Referenced by OnCurrentChange(), PANEL_CABLE_SIZE(), and printAll().

◆ m_updatingDiameter

bool PANEL_CABLE_SIZE::m_updatingDiameter
private

Definition at line 88 of file panel_cable_size.h.

Referenced by OnDiameterChange(), PANEL_CABLE_SIZE(), and printAll().

◆ m_updatingFrequency

bool PANEL_CABLE_SIZE::m_updatingFrequency
private

Definition at line 92 of file panel_cable_size.h.

Referenced by OnFrequencyChange(), PANEL_CABLE_SIZE(), and printAll().

◆ m_updatingLength

bool PANEL_CABLE_SIZE::m_updatingLength
private

Definition at line 95 of file panel_cable_size.h.

Referenced by OnLengthChange(), PANEL_CABLE_SIZE(), and printAll().

◆ m_updatingLinResistance

bool PANEL_CABLE_SIZE::m_updatingLinResistance
private

Definition at line 91 of file panel_cable_size.h.

Referenced by OnLinResistanceChange(), PANEL_CABLE_SIZE(), and printAll().

◆ m_updatingPower

bool PANEL_CABLE_SIZE::m_updatingPower
private

Definition at line 98 of file panel_cable_size.h.

Referenced by OnPowerChange(), PANEL_CABLE_SIZE(), and printAll().

◆ m_updatingResistanceDc

bool PANEL_CABLE_SIZE::m_updatingResistanceDc
private

Definition at line 96 of file panel_cable_size.h.

Referenced by OnResistanceDcChange(), PANEL_CABLE_SIZE(), and printAll().

◆ m_updatingRVdrop

bool PANEL_CABLE_SIZE::m_updatingRVdrop
private

Definition at line 97 of file panel_cable_size.h.

Referenced by OnVDropChange(), PANEL_CABLE_SIZE(), and printAll().

◆ m_updatingUI

◆ m_vDropCtrl

wxTextCtrl* PANEL_CABLE_SIZE_BASE::m_vDropCtrl
protectedinherited

◆ m_vDropUnit

UNIT_SELECTOR_VOLTAGE* PANEL_CABLE_SIZE_BASE::m_vDropUnit
protectedinherited

◆ m_voltageDrop

double PANEL_CABLE_SIZE::m_voltageDrop
private

Definition at line 114 of file panel_cable_size.h.

Referenced by printAll(), updateAll(), and updateApplication().


The documentation for this class was generated from the following files: