40 const wxSize& size,
long style,
const wxString&
name ) :
48 int minWidth =
m_ResRequired->GetTextExtent( wxT(
"XXX.XXX" ) ).GetWidth();
55 minWidth =
m_ESeriesError2R->GetTextExtent( wxT(
"XX" ) +
_(
"Exact" ) ).GetWidth();
67 GetSizer()->SetSizeHints(
this );
96 double error, err3 = 0;
118 catch (std::out_of_range
const& exc)
121 msg <<
"Internal error: " << exc.what();
130 error = ( reqr / error - 1 ) * 100;
135 es.Printf(
"<%.2f", 0.01 );
137 es.Printf(
"%+.2f",error);
149 err3 = ( reqr / err3 - 1 ) * 100;
154 es.Printf(
"<%.2f", 0.01 );
156 es.Printf(
"%+.2f",err3);
169 fs =
_(
"Not worth using" );
181 error = ( reqr / error - 1 ) * 100;
184 es.Printf(
"%+.2f",error );
192 fs =
_(
"Not worth using" );
203 if( event.GetEventObject() ==
m_e1 )
205 else if( event.GetEventObject() ==
m_e3 )
207 else if( event.GetEventObject() ==
m_e12 )
209 else if( event.GetEventObject() ==
m_e24 )
void SetSeries(uint32_t aSeries)
Interface for CheckBox, RadioButton, RequriedResistor and calculated Results.
void Exclude(double aValue)
If any value of the selected E-series not available, it can be entered as an exclude value.
void Calculate()
called on calculate button to execute all the 2R, 3R and 4R calculations
void NewCalc()
initialize next calculation and erase results from previous calculation
void SetRequiredValue(double aValue)
const std::array< R_DATA, S4R+1 > & GetResults()
bool SetPage(const wxString &aSource) override
Class PANEL_E_SERIES_BASE.
wxTextCtrl * m_ESeries_Sol2R
wxTextCtrl * m_ESeriesError4R
wxTextCtrl * m_ESeriesError3R
wxTextCtrl * m_ESeries_Sol3R
HTML_WINDOW * m_panelESeriesHelp
wxTextCtrl * m_ResExclude1
wxTextCtrl * m_ESeries_Sol4R
wxTextCtrl * m_ResExclude2
wxStaticText * m_exclude2Units
wxStaticText * m_reqResUnits
wxStaticText * m_exclude1Units
wxTextCtrl * m_ResRequired
wxTextCtrl * m_ESeriesError2R
PANEL_E_SERIES(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void OnCalculateESeries(wxCommandEvent &event) override
Called on calculate button and executes all E-series calculations.
void OnESeriesSelection(wxCommandEvent &event) override
Radio Buttons to select the E-series for the resistor calculator.
void ThemeChanged() override
Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appr...
void SaveSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Save the settings from the panel.
void LoadSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Load the settings into the panel.
const int minSize
Push and Shove router track width and via size dialog.
Some functions to handle hotkeys in KiCad.
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
double DoubleFromString(const wxString &TextValue)
std::vector< FAB_LAYER_COLOR > dummy
void ConvertMarkdown2Html(const wxString &aMarkdownInput, wxString &aHtmlOutput)