KiCad PCB EDA Suite
|
#include <panel_wavelength.h>
Public Member Functions | |
PANEL_WAVELENGTH (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString) | |
~PANEL_WAVELENGTH () | |
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 | OnFrequencyChange (wxCommandEvent &event) override |
void | OnPeriodChange (wxCommandEvent &event) override |
void | OnWavelengthVacuumChange (wxCommandEvent &event) override |
void | OnWavelengthMediumChange (wxCommandEvent &event) override |
void | OnPermittivityChange (wxCommandEvent &event) override |
void | OnPermeabilityChange (wxCommandEvent &event) override |
void | OnButtonPermittivity (wxCommandEvent &event) override |
Protected Attributes | |
wxStaticText * | m_staticText18 |
wxTextCtrl * | m_frequencyCtrl |
UNIT_SELECTOR_FREQUENCY * | m_frequencyUnit |
wxStaticText * | m_staticText181 |
wxTextCtrl * | m_periodCtrl |
UNIT_SELECTOR_TIME * | m_periodUnit |
wxStaticText * | m_staticText1811 |
wxTextCtrl * | m_wavelengthVacuumCtrl |
UNIT_SELECTOR_LEN_CABLE * | m_wavelengthVacuumUnit |
wxStaticText * | m_staticText18111 |
wxTextCtrl * | m_wavelengthMediumCtrl |
UNIT_SELECTOR_LEN_CABLE * | m_wavelengthMediumUnit |
wxStaticText * | m_staticText181112 |
wxTextCtrl * | m_speedCtrl |
UNIT_SELECTOR_SPEED * | m_speedUnit |
wxStaticText * | m_staticText181111 |
wxTextCtrl * | m_permittivityCtrl |
wxButton * | m_button1 |
wxStaticText * | m_staticText42 |
wxTextCtrl * | m_permeabilityCtrl |
Private Member Functions | |
void | update (double aFrequency) |
void | updateUnits (wxCommandEvent &aEvent) override |
Private Attributes | |
double | m_permittivity = 1 |
double | m_permeability = 1 |
double | m_frequency = 1 |
bool | m_updatingFrequency = false |
bool | m_updatingPeriod = false |
bool | m_updatingWavelengthVacuum = false |
bool | m_updatingWavelengthMedium = false |
bool | m_updatingSpeed = false |
bool | m_updatingUI = false |
Definition at line 27 of file panel_wavelength.h.
PANEL_WAVELENGTH::PANEL_WAVELENGTH | ( | wxWindow * | parent, |
wxWindowID | id = wxID_ANY , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxTAB_TRAVERSAL , |
||
const wxString & | name = wxEmptyString |
||
) |
Definition at line 31 of file panel_wavelength.cpp.
References PANEL_WAVELENGTH_BASE::m_speedCtrl, and minSize.
|
inline |
Definition at line 33 of file panel_wavelength.h.
|
overridevirtual |
Load the settings into the panel.
aCfg | is the settings structure to load from |
Implements CALCULATOR_PANEL.
Definition at line 58 of file panel_wavelength.cpp.
References PCB_CALCULATOR_SETTINGS::WAVELENGTH::frequency, PCB_CALCULATOR_SETTINGS::WAVELENGTH::frequencyUnit, m_frequency, PANEL_WAVELENGTH_BASE::m_frequencyUnit, PANEL_WAVELENGTH_BASE::m_periodUnit, m_permeability, PANEL_WAVELENGTH_BASE::m_permeabilityCtrl, m_permittivity, PANEL_WAVELENGTH_BASE::m_permittivityCtrl, PANEL_WAVELENGTH_BASE::m_speedUnit, PCB_CALCULATOR_SETTINGS::m_wavelength, PANEL_WAVELENGTH_BASE::m_wavelengthMediumUnit, PANEL_WAVELENGTH_BASE::m_wavelengthVacuumUnit, PCB_CALCULATOR_SETTINGS::WAVELENGTH::periodUnit, PCB_CALCULATOR_SETTINGS::WAVELENGTH::permeability, PCB_CALCULATOR_SETTINGS::WAVELENGTH::permittivity, PCB_CALCULATOR_SETTINGS::WAVELENGTH::speedUnit, update(), PCB_CALCULATOR_SETTINGS::WAVELENGTH::wavelengthMediumUnit, and PCB_CALCULATOR_SETTINGS::WAVELENGTH::wavelengthVacuumUnit.
|
overridevirtual |
Reimplemented from PANEL_WAVELENGTH_BASE.
Definition at line 248 of file panel_wavelength.cpp.
References _, findMatch(), PANEL_WAVELENGTH_BASE::m_permittivityCtrl, and StandardRelativeDielectricConstantList().
|
overridevirtual |
Reimplemented from PANEL_WAVELENGTH_BASE.
Definition at line 133 of file panel_wavelength.cpp.
References UNIT_SELECTOR_FREQUENCY::GetUnitScale(), PANEL_WAVELENGTH_BASE::m_frequencyCtrl, PANEL_WAVELENGTH_BASE::m_frequencyUnit, m_updatingFrequency, m_updatingUI, and update().
|
overridevirtual |
Reimplemented from PANEL_WAVELENGTH_BASE.
Definition at line 154 of file panel_wavelength.cpp.
References UNIT_SELECTOR_TIME::GetUnitScale(), PANEL_WAVELENGTH_BASE::m_periodCtrl, PANEL_WAVELENGTH_BASE::m_periodUnit, m_updatingPeriod, m_updatingUI, and update().
|
overridevirtual |
Reimplemented from PANEL_WAVELENGTH_BASE.
Definition at line 233 of file panel_wavelength.cpp.
References m_frequency, m_permeability, PANEL_WAVELENGTH_BASE::m_permeabilityCtrl, and update().
|
overridevirtual |
Reimplemented from PANEL_WAVELENGTH_BASE.
Definition at line 218 of file panel_wavelength.cpp.
References m_frequency, m_permittivity, PANEL_WAVELENGTH_BASE::m_permittivityCtrl, and update().
|
overridevirtual |
Reimplemented from PANEL_WAVELENGTH_BASE.
Definition at line 197 of file panel_wavelength.cpp.
References UNIT_SELECTOR_LEN_CABLE::GetUnitScale(), m_permeability, m_permittivity, m_updatingUI, m_updatingWavelengthMedium, PANEL_WAVELENGTH_BASE::m_wavelengthMediumCtrl, PANEL_WAVELENGTH_BASE::m_wavelengthMediumUnit, SPEED_LIGHT, and update().
|
overridevirtual |
Reimplemented from PANEL_WAVELENGTH_BASE.
Definition at line 175 of file panel_wavelength.cpp.
References UNIT_SELECTOR_LEN_CABLE::GetUnitScale(), m_updatingUI, m_updatingWavelengthVacuum, PANEL_WAVELENGTH_BASE::m_wavelengthVacuumCtrl, PANEL_WAVELENGTH_BASE::m_wavelengthVacuumUnit, SPEED_LIGHT, and update().
|
overridevirtual |
Save the settings from the panel.
aCfg | is the settings structure to save to |
Implements CALCULATOR_PANEL.
Definition at line 44 of file panel_wavelength.cpp.
References PCB_CALCULATOR_SETTINGS::WAVELENGTH::frequency, PCB_CALCULATOR_SETTINGS::WAVELENGTH::frequencyUnit, m_frequency, PANEL_WAVELENGTH_BASE::m_frequencyUnit, PANEL_WAVELENGTH_BASE::m_periodUnit, m_permeability, m_permittivity, PANEL_WAVELENGTH_BASE::m_speedUnit, PCB_CALCULATOR_SETTINGS::m_wavelength, PANEL_WAVELENGTH_BASE::m_wavelengthMediumUnit, PANEL_WAVELENGTH_BASE::m_wavelengthVacuumUnit, PCB_CALCULATOR_SETTINGS::WAVELENGTH::periodUnit, PCB_CALCULATOR_SETTINGS::WAVELENGTH::permeability, PCB_CALCULATOR_SETTINGS::WAVELENGTH::permittivity, PCB_CALCULATOR_SETTINGS::WAVELENGTH::speedUnit, PCB_CALCULATOR_SETTINGS::WAVELENGTH::wavelengthMediumUnit, and PCB_CALCULATOR_SETTINGS::WAVELENGTH::wavelengthVacuumUnit.
|
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 38 of file panel_wavelength.h.
|
private |
Definition at line 85 of file panel_wavelength.cpp.
References UNIT_SELECTOR_FREQUENCY::GetUnitScale(), UNIT_SELECTOR_LEN_CABLE::GetUnitScale(), UNIT_SELECTOR_SPEED::GetUnitScale(), UNIT_SELECTOR_TIME::GetUnitScale(), m_frequency, PANEL_WAVELENGTH_BASE::m_frequencyCtrl, PANEL_WAVELENGTH_BASE::m_frequencyUnit, PANEL_WAVELENGTH_BASE::m_periodCtrl, PANEL_WAVELENGTH_BASE::m_periodUnit, m_permeability, m_permittivity, PANEL_WAVELENGTH_BASE::m_speedCtrl, PANEL_WAVELENGTH_BASE::m_speedUnit, m_updatingFrequency, m_updatingPeriod, m_updatingSpeed, m_updatingUI, m_updatingWavelengthMedium, m_updatingWavelengthVacuum, PANEL_WAVELENGTH_BASE::m_wavelengthMediumCtrl, PANEL_WAVELENGTH_BASE::m_wavelengthMediumUnit, PANEL_WAVELENGTH_BASE::m_wavelengthVacuumCtrl, PANEL_WAVELENGTH_BASE::m_wavelengthVacuumUnit, and SPEED_LIGHT.
Referenced by LoadSettings(), OnFrequencyChange(), OnPeriodChange(), OnPermeabilityChange(), OnPermittivityChange(), OnWavelengthMediumChange(), OnWavelengthVacuumChange(), and updateUnits().
|
overrideprivatevirtual |
Reimplemented from PANEL_WAVELENGTH_BASE.
Definition at line 79 of file panel_wavelength.cpp.
References m_frequency, and update().
|
protectedinherited |
Definition at line 62 of file panel_wavelength_base.h.
Referenced by PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().
|
private |
Definition at line 54 of file panel_wavelength.h.
Referenced by LoadSettings(), OnPermeabilityChange(), OnPermittivityChange(), SaveSettings(), update(), and updateUnits().
|
protectedinherited |
Definition at line 46 of file panel_wavelength_base.h.
Referenced by OnFrequencyChange(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), update(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 47 of file panel_wavelength_base.h.
Referenced by LoadSettings(), OnFrequencyChange(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), SaveSettings(), update(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 49 of file panel_wavelength_base.h.
Referenced by OnPeriodChange(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), update(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 50 of file panel_wavelength_base.h.
Referenced by LoadSettings(), OnPeriodChange(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), SaveSettings(), update(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().
|
private |
Definition at line 53 of file panel_wavelength.h.
Referenced by LoadSettings(), OnPermeabilityChange(), OnWavelengthMediumChange(), SaveSettings(), and update().
|
protectedinherited |
Definition at line 64 of file panel_wavelength_base.h.
Referenced by LoadSettings(), OnPermeabilityChange(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().
|
private |
Definition at line 52 of file panel_wavelength.h.
Referenced by LoadSettings(), OnPermittivityChange(), OnWavelengthMediumChange(), SaveSettings(), and update().
|
protectedinherited |
Definition at line 61 of file panel_wavelength_base.h.
Referenced by LoadSettings(), OnButtonPermittivity(), OnPermittivityChange(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 58 of file panel_wavelength_base.h.
Referenced by PANEL_WAVELENGTH(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), and update().
|
protectedinherited |
Definition at line 59 of file panel_wavelength_base.h.
Referenced by LoadSettings(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), SaveSettings(), update(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 45 of file panel_wavelength_base.h.
Referenced by PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 48 of file panel_wavelength_base.h.
Referenced by PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 51 of file panel_wavelength_base.h.
Referenced by PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 54 of file panel_wavelength_base.h.
Referenced by PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 60 of file panel_wavelength_base.h.
Referenced by PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 57 of file panel_wavelength_base.h.
Referenced by PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 63 of file panel_wavelength_base.h.
Referenced by PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE().
|
private |
Definition at line 56 of file panel_wavelength.h.
Referenced by OnFrequencyChange(), and update().
|
private |
Definition at line 57 of file panel_wavelength.h.
Referenced by OnPeriodChange(), and update().
|
private |
Definition at line 60 of file panel_wavelength.h.
Referenced by update().
|
private |
Definition at line 62 of file panel_wavelength.h.
Referenced by OnFrequencyChange(), OnPeriodChange(), OnWavelengthMediumChange(), OnWavelengthVacuumChange(), and update().
|
private |
Definition at line 59 of file panel_wavelength.h.
Referenced by OnWavelengthMediumChange(), and update().
|
private |
Definition at line 58 of file panel_wavelength.h.
Referenced by OnWavelengthVacuumChange(), and update().
|
protectedinherited |
Definition at line 55 of file panel_wavelength_base.h.
Referenced by OnWavelengthMediumChange(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), update(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 56 of file panel_wavelength_base.h.
Referenced by LoadSettings(), OnWavelengthMediumChange(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), SaveSettings(), update(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 52 of file panel_wavelength_base.h.
Referenced by OnWavelengthVacuumChange(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), update(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().
|
protectedinherited |
Definition at line 53 of file panel_wavelength_base.h.
Referenced by LoadSettings(), OnWavelengthVacuumChange(), PANEL_WAVELENGTH_BASE::PANEL_WAVELENGTH_BASE(), SaveSettings(), update(), and PANEL_WAVELENGTH_BASE::~PANEL_WAVELENGTH_BASE().