KiCad PCB EDA Suite
|
#include <panel_rf_attenuators.h>
Public Member Functions | |
PANEL_RF_ATTENUATORS (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString) | |
~PANEL_RF_ATTENUATORS () | |
wxRadioBox * | GetAttenuatorsSelector () |
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 | UpdateUI () |
void | OnAttenuatorSelection (wxCommandEvent &event) override |
void | SetAttenuator (unsigned aIdx) |
void | OnCalculateAttenuator (wxCommandEvent &event) override |
void | TransfPanelDataToAttenuator () |
void | TransfAttenuatorDataToPanel () |
void | TransfAttenuatorResultsToPanel () |
Public Attributes | |
ATTENUATOR * | m_CurrAttenuator |
std::vector< ATTENUATOR * > | m_AttenuatorList |
Protected Attributes | |
wxRadioBox * | m_AttenuatorsSelection |
wxStaticBitmap * | m_attenuatorBitmap |
wxStaticText * | m_attenuationLabel |
wxTextCtrl * | m_AttValueCtrl |
wxStaticText * | m_attUnit |
wxStaticText * | m_attenuationZinLabel |
wxTextCtrl * | m_ZinValueCtrl |
wxStaticText * | m_attZinUnit |
wxStaticText * | m_ZoutLabel |
wxTextCtrl * | m_ZoutValueCtrl |
wxStaticText * | m_attZoutUnit |
wxButton * | m_buttonAlcAtt |
STD_BITMAP_BUTTON * | m_bpButtonCalcAtt |
wxStaticText * | m_attenuatorR1Label |
wxTextCtrl * | m_Att_R1_Value |
wxStaticText * | m_attR1Unit |
wxStaticText * | m_attenuatorR2Label |
wxTextCtrl * | m_Att_R2_Value |
wxStaticText * | m_attR2Unit |
wxStaticText * | m_attenuatorR3Label |
wxTextCtrl * | m_Att_R3_Value |
wxStaticText * | m_attR3Unit |
wxStaticText * | m_staticTextAttMsg |
HTML_WINDOW * | m_Attenuator_Messages |
HTML_WINDOW * | m_panelAttFormula |
Definition at line 30 of file panel_rf_attenuators.h.
PANEL_RF_ATTENUATORS::PANEL_RF_ATTENUATORS | ( | 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 36 of file panel_rf_attenuators.cpp.
References KIUI::GetInfoFont(), KiBitmapBundle(), m_AttenuatorList, PANEL_RF_ATTENUATORS_BASE::m_attR1Unit, PANEL_RF_ATTENUATORS_BASE::m_attR2Unit, PANEL_RF_ATTENUATORS_BASE::m_attR3Unit, PANEL_RF_ATTENUATORS_BASE::m_attZinUnit, PANEL_RF_ATTENUATORS_BASE::m_attZoutUnit, PANEL_RF_ATTENUATORS_BASE::m_bpButtonCalcAtt, m_CurrAttenuator, PANEL_RF_ATTENUATORS_BASE::m_staticTextAttMsg, SetAttenuator(), and STD_BITMAP_BUTTON::SetBitmap().
PANEL_RF_ATTENUATORS::~PANEL_RF_ATTENUATORS | ( | ) |
Definition at line 64 of file panel_rf_attenuators.cpp.
References m_AttenuatorList.
|
inline |
Definition at line 39 of file panel_rf_attenuators.h.
References PANEL_RF_ATTENUATORS_BASE::m_AttenuatorsSelection.
Referenced by PCB_CALCULATOR_FRAME::OnUpdateUI().
|
overridevirtual |
Load the settings into the panel.
aCfg | is the settings structure to load from |
Implements CALCULATOR_PANEL.
Definition at line 98 of file panel_rf_attenuators.cpp.
References m_AttenuatorList, PCB_CALCULATOR_SETTINGS::m_Attenuators, PANEL_RF_ATTENUATORS_BASE::m_AttenuatorsSelection, SetAttenuator(), and PCB_CALCULATOR_SETTINGS::ATTENUATORS::type.
|
overridevirtual |
Reimplemented from PANEL_RF_ATTENUATORS_BASE.
Definition at line 122 of file panel_rf_attenuators.cpp.
References Refresh(), and SetAttenuator().
|
overridevirtual |
Reimplemented from PANEL_RF_ATTENUATORS_BASE.
Definition at line 149 of file panel_rf_attenuators.cpp.
References ATTENUATOR::Calculate(), m_CurrAttenuator, TransfAttenuatorResultsToPanel(), and TransfPanelDataToAttenuator().
|
overridevirtual |
Save the settings from the panel.
aCfg | is the settings structure to save to |
Implements CALCULATOR_PANEL.
Definition at line 110 of file panel_rf_attenuators.cpp.
References m_AttenuatorList, PCB_CALCULATOR_SETTINGS::m_Attenuators, PANEL_RF_ATTENUATORS_BASE::m_AttenuatorsSelection, and PCB_CALCULATOR_SETTINGS::ATTENUATORS::type.
void PANEL_RF_ATTENUATORS::SetAttenuator | ( | unsigned | aIdx | ) |
Definition at line 129 of file panel_rf_attenuators.cpp.
References PANEL_RF_ATTENUATORS_BASE::m_Att_R1_Value, PANEL_RF_ATTENUATORS_BASE::m_Att_R2_Value, PANEL_RF_ATTENUATORS_BASE::m_Att_R3_Value, PANEL_RF_ATTENUATORS_BASE::m_Attenuator_Messages, m_AttenuatorList, PANEL_RF_ATTENUATORS_BASE::m_attenuatorR3Label, PANEL_RF_ATTENUATORS_BASE::m_attR3Unit, m_CurrAttenuator, HTML_WINDOW::SetPage(), and TransfAttenuatorDataToPanel().
Referenced by LoadSettings(), OnAttenuatorSelection(), and PANEL_RF_ATTENUATORS().
|
overridevirtual |
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 71 of file panel_rf_attenuators.cpp.
References KIUI::GetInfoFont(), KiBitmapBundle(), PANEL_RF_ATTENUATORS_BASE::m_Attenuator_Messages, PANEL_RF_ATTENUATORS_BASE::m_attenuatorBitmap, PANEL_RF_ATTENUATORS_BASE::m_bpButtonCalcAtt, m_CurrAttenuator, PANEL_RF_ATTENUATORS_BASE::m_panelAttFormula, ATTENUATOR::m_SchBitmapName, PANEL_RF_ATTENUATORS_BASE::m_staticTextAttMsg, Refresh(), STD_BITMAP_BUTTON::SetBitmap(), and HTML_WINDOW::ThemeChanged().
void PANEL_RF_ATTENUATORS::TransfAttenuatorDataToPanel | ( | ) |
Definition at line 170 of file panel_rf_attenuators.cpp.
References ConvertMarkdown2Html(), KiBitmapBundle(), ATTENUATOR::m_Attenuation, ATTENUATOR::m_Attenuation_Enable, PANEL_RF_ATTENUATORS_BASE::m_attenuatorBitmap, PANEL_RF_ATTENUATORS_BASE::m_AttValueCtrl, m_CurrAttenuator, ATTENUATOR::m_FormulaName, PANEL_RF_ATTENUATORS_BASE::m_panelAttFormula, ATTENUATOR::m_SchBitmapName, ATTENUATOR::m_Zin, ATTENUATOR::m_Zin_Enable, PANEL_RF_ATTENUATORS_BASE::m_ZinValueCtrl, ATTENUATOR::m_Zout, PANEL_RF_ATTENUATORS_BASE::m_ZoutValueCtrl, and HTML_WINDOW::SetPage().
Referenced by SetAttenuator().
void PANEL_RF_ATTENUATORS::TransfAttenuatorResultsToPanel | ( | ) |
Definition at line 212 of file panel_rf_attenuators.cpp.
References _, HTML_WINDOW::AppendToPage(), PANEL_RF_ATTENUATORS_BASE::m_Att_R1_Value, PANEL_RF_ATTENUATORS_BASE::m_Att_R2_Value, PANEL_RF_ATTENUATORS_BASE::m_Att_R3_Value, PANEL_RF_ATTENUATORS_BASE::m_Attenuator_Messages, m_CurrAttenuator, ATTENUATOR::m_Error, ATTENUATOR::m_MinimumATT, ATTENUATOR::m_R1, ATTENUATOR::m_R2, ATTENUATOR::m_R3, ATTENUATOR::m_ResultCount, and HTML_WINDOW::SetPage().
Referenced by OnCalculateAttenuator().
void PANEL_RF_ATTENUATORS::TransfPanelDataToAttenuator | ( | ) |
Definition at line 157 of file panel_rf_attenuators.cpp.
References DoubleFromString(), ATTENUATOR::m_Attenuation, PANEL_RF_ATTENUATORS_BASE::m_AttValueCtrl, m_CurrAttenuator, ATTENUATOR::m_Zin, PANEL_RF_ATTENUATORS_BASE::m_ZinValueCtrl, ATTENUATOR::m_Zout, and PANEL_RF_ATTENUATORS_BASE::m_ZoutValueCtrl.
Referenced by OnCalculateAttenuator().
void PANEL_RF_ATTENUATORS::UpdateUI | ( | ) |
Definition at line 89 of file panel_rf_attenuators.cpp.
References KiBitmapBundle(), PANEL_RF_ATTENUATORS_BASE::m_attenuatorBitmap, m_CurrAttenuator, and ATTENUATOR::m_SchBitmapName.
Referenced by PCB_CALCULATOR_FRAME::OnUpdateUI().
|
protectedinherited |
Definition at line 62 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), SetAttenuator(), and TransfAttenuatorResultsToPanel().
|
protectedinherited |
Definition at line 65 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), SetAttenuator(), and TransfAttenuatorResultsToPanel().
|
protectedinherited |
Definition at line 68 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), SetAttenuator(), and TransfAttenuatorResultsToPanel().
|
protectedinherited |
Definition at line 50 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 53 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 71 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), SetAttenuator(), ThemeChanged(), and TransfAttenuatorResultsToPanel().
|
protectedinherited |
Definition at line 49 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), ThemeChanged(), TransfAttenuatorDataToPanel(), and UpdateUI().
std::vector<ATTENUATOR*> PANEL_RF_ATTENUATORS::m_AttenuatorList |
Definition at line 57 of file panel_rf_attenuators.h.
Referenced by LoadSettings(), PCB_CALCULATOR_FRAME::OnUpdateUI(), PANEL_RF_ATTENUATORS(), SaveSettings(), SetAttenuator(), and ~PANEL_RF_ATTENUATORS().
|
protectedinherited |
Definition at line 61 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 64 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 67 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), and SetAttenuator().
|
protectedinherited |
Definition at line 48 of file panel_rf_attenuators_base.h.
Referenced by GetAttenuatorsSelector(), LoadSettings(), PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), SaveSettings(), and PANEL_RF_ATTENUATORS_BASE::~PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 63 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS(), and PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 66 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS(), and PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 69 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS(), PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), and SetAttenuator().
|
protectedinherited |
Definition at line 52 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 51 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), TransfAttenuatorDataToPanel(), and TransfPanelDataToAttenuator().
|
protectedinherited |
Definition at line 55 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS(), and PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 58 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS(), and PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 60 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS(), PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), ThemeChanged(), and PANEL_RF_ATTENUATORS_BASE::~PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 59 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), and PANEL_RF_ATTENUATORS_BASE::~PANEL_RF_ATTENUATORS_BASE().
ATTENUATOR* PANEL_RF_ATTENUATORS::m_CurrAttenuator |
Definition at line 56 of file panel_rf_attenuators.h.
Referenced by OnCalculateAttenuator(), PCB_CALCULATOR_FRAME::OnUpdateUI(), PANEL_RF_ATTENUATORS(), SetAttenuator(), ThemeChanged(), TransfAttenuatorDataToPanel(), TransfAttenuatorResultsToPanel(), TransfPanelDataToAttenuator(), and UpdateUI().
|
protectedinherited |
Definition at line 72 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), ThemeChanged(), and TransfAttenuatorDataToPanel().
|
protectedinherited |
Definition at line 70 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS(), PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), and ThemeChanged().
|
protectedinherited |
Definition at line 54 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), TransfAttenuatorDataToPanel(), and TransfPanelDataToAttenuator().
|
protectedinherited |
Definition at line 56 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE().
|
protectedinherited |
Definition at line 57 of file panel_rf_attenuators_base.h.
Referenced by PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE(), TransfAttenuatorDataToPanel(), and TransfPanelDataToAttenuator().