diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt
index 262b8e30dc..824caa934e 100644
--- a/pcb_calculator/CMakeLists.txt
+++ b/pcb_calculator/CMakeLists.txt
@@ -18,6 +18,7 @@ set( PCB_CALCULATOR_SRCS
panel_board_class.cpp
panel_color_code.cpp
panel_electrical_spacing.cpp
+ panel_eserie.cpp
panel_regulator.cpp
panel_track_width.cpp
panel_via_size.cpp
@@ -40,6 +41,7 @@ set( PCB_CALCULATOR_SRCS
dialogs/panel_board_class_base.cpp
dialogs/panel_regulator_base.cpp
dialogs/panel_color_code_base.cpp
+ dialogs/panel_eserie_base.cpp
dialogs/panel_via_size_base.cpp
dialogs/panel_track_width_base.cpp
dialogs/panel_electrical_spacing_base.cpp
diff --git a/pcb_calculator/dialogs/panel_eserie.h b/pcb_calculator/dialogs/panel_eserie.h
new file mode 100644
index 0000000000..a615e74d33
--- /dev/null
+++ b/pcb_calculator/dialogs/panel_eserie.h
@@ -0,0 +1,53 @@
+/*
+ * This program source code file is part of KICAD, a free EDA CAD application.
+ *
+ * Copyright (C) 1992-2021 Kicad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see .
+ */
+
+#ifndef PANEL_E_SERIE_H
+#define PANEL_E_SERIE_H
+
+#include "panel_eserie_base.h"
+
+class PCB_CALCULATOR_SETTINGS;
+
+
+class PANEL_E_SERIE : public PANEL_E_SERIE_BASE
+{
+public:
+ PANEL_E_SERIE( wxWindow* parent, wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
+ ~PANEL_E_SERIE();
+
+ void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg );
+ void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg );
+
+ /**
+ * Called on calculate button and executes all E-series calculations
+ */
+ void OnCalculateESeries( wxCommandEvent& event ) override;
+
+ /**
+ * Radio Buttons to select the E-serie for the resistor calculator.
+ *
+ * @param event contains the radio button state.
+ */
+ void OnESeriesSelection( wxCommandEvent& event ) override;
+};
+
+#endif
\ No newline at end of file
diff --git a/pcb_calculator/dialogs/panel_eserie_base.cpp b/pcb_calculator/dialogs/panel_eserie_base.cpp
new file mode 100644
index 0000000000..2f926e3ca2
--- /dev/null
+++ b/pcb_calculator/dialogs/panel_eserie_base.cpp
@@ -0,0 +1,216 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 26 2018)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO *NOT* EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "panel_eserie_base.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+PANEL_E_SERIE_BASE::PANEL_E_SERIE_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
+{
+ wxBoxSizer* bSizerESerie;
+ bSizerESerie = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bMiddleSizerESeries;
+ bMiddleSizerESeries = new wxBoxSizer( wxHORIZONTAL );
+
+ wxStaticBoxSizer* sbSizerESeriesInput;
+ sbSizerESeriesInput = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Inputs") ), wxVERTICAL );
+
+ wxFlexGridSizer* fgSizerAttPrms1;
+ fgSizerAttPrms1 = new wxFlexGridSizer( 4, 3, 3, 0 );
+ fgSizerAttPrms1->AddGrowableRow( 1 );
+ fgSizerAttPrms1->SetFlexibleDirection( wxBOTH );
+ fgSizerAttPrms1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_ESrequired = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("Required resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESrequired->Wrap( -1 );
+ fgSizerAttPrms1->Add( m_ESrequired, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_ResRequired = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerAttPrms1->Add( m_ResRequired, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ m_reqResUnits = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_reqResUnits->Wrap( -1 );
+ fgSizerAttPrms1->Add( m_reqResUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_ESrequired1 = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("Exclude value 1:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESrequired1->Wrap( -1 );
+ fgSizerAttPrms1->Add( m_ESrequired1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ m_ResExclude1 = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerAttPrms1->Add( m_ResExclude1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ m_exclude1Units = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_exclude1Units->Wrap( -1 );
+ fgSizerAttPrms1->Add( m_exclude1Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_ESrequired11 = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("Exclude value 2:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESrequired11->Wrap( -1 );
+ fgSizerAttPrms1->Add( m_ESrequired11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ m_ResExclude2 = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerAttPrms1->Add( m_ResExclude2, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_exclude2Units = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_exclude2Units->Wrap( -1 );
+ fgSizerAttPrms1->Add( m_exclude2Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+
+ sbSizerESeriesInput->Add( fgSizerAttPrms1, 0, wxEXPAND|wxBOTTOM, 5 );
+
+ m_staticline6 = new wxStaticLine( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ sbSizerESeriesInput->Add( m_staticline6, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
+
+ wxBoxSizer* bSizer40;
+ bSizer40 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_e1 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E1"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ bSizer40->Add( m_e1, 1, wxALL, 5 );
+
+ m_e3 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E3"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer40->Add( m_e3, 1, wxALL, 5 );
+
+ m_e6 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E6"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_e6->SetValue( true );
+ bSizer40->Add( m_e6, 1, wxALL, 5 );
+
+ m_e12 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E12"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer40->Add( m_e12, 1, wxALL, 5 );
+
+
+ sbSizerESeriesInput->Add( bSizer40, 1, wxEXPAND, 5 );
+
+
+ bMiddleSizerESeries->Add( sbSizerESeriesInput, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5 );
+
+ wxStaticBoxSizer* sbSizerESeriesSolutions;
+ sbSizerESeriesSolutions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Solutions") ), wxVERTICAL );
+
+ wxFlexGridSizer* fgSizerESerieResults;
+ fgSizerESerieResults = new wxFlexGridSizer( 6, 5, 3, 0 );
+ fgSizerESerieResults->AddGrowableCol( 1 );
+ fgSizerESerieResults->SetFlexibleDirection( wxBOTH );
+ fgSizerESerieResults->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_ESerieSimpleSolution = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Simple solution:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESerieSimpleSolution->Wrap( -1 );
+ fgSizerESerieResults->Add( m_ESerieSimpleSolution, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ m_ESeries_Sol2R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESeries_Sol2R->SetMinSize( wxSize( 150,-1 ) );
+
+ fgSizerESerieResults->Add( m_ESeries_Sol2R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_ESeriesSimpleErr = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Error:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESeriesSimpleErr->Wrap( -1 );
+ fgSizerESerieResults->Add( m_ESeriesSimpleErr, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ m_ESeriesError2R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerESerieResults->Add( m_ESeriesError2R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+ m_ESeriesSimplePercent = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESeriesSimplePercent->Wrap( -1 );
+ fgSizerESerieResults->Add( m_ESeriesSimplePercent, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_ESerie3RSolution1 = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("3R solution:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESerie3RSolution1->Wrap( -1 );
+ fgSizerESerieResults->Add( m_ESerie3RSolution1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ m_ESeries_Sol3R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESeries_Sol3R->SetMinSize( wxSize( 220,-1 ) );
+
+ fgSizerESerieResults->Add( m_ESeries_Sol3R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_ESeriesAltErr = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Error:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESeriesAltErr->Wrap( -1 );
+ fgSizerESerieResults->Add( m_ESeriesAltErr, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ m_ESeriesError3R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerESerieResults->Add( m_ESeriesError3R, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_ESeriesAltPercent = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESeriesAltPercent->Wrap( -1 );
+ fgSizerESerieResults->Add( m_ESeriesAltPercent, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+ m_ESeries4RSolution = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("4R solution:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESeries4RSolution->Wrap( -1 );
+ fgSizerESerieResults->Add( m_ESeries4RSolution, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ m_ESeries_Sol4R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESeries_Sol4R->SetMinSize( wxSize( 290,-1 ) );
+
+ fgSizerESerieResults->Add( m_ESeries_Sol4R, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxEXPAND, 5 );
+
+ m_ESeriesAltErr1 = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Error:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESeriesAltErr1->Wrap( -1 );
+ fgSizerESerieResults->Add( m_ESeriesAltErr1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ m_ESeriesError4R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerESerieResults->Add( m_ESeriesError4R, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ m_ESeriesAltPercent1 = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ESeriesAltPercent1->Wrap( -1 );
+ fgSizerESerieResults->Add( m_ESeriesAltPercent1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+
+ sbSizerESeriesSolutions->Add( fgSizerESerieResults, 0, wxBOTTOM|wxEXPAND, 5 );
+
+ m_staticline7 = new wxStaticLine( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ sbSizerESeriesSolutions->Add( m_staticline7, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
+
+ m_buttonEScalculate = new wxButton( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
+ sbSizerESeriesSolutions->Add( m_buttonEScalculate, 0, wxALL, 5 );
+
+
+ bMiddleSizerESeries->Add( sbSizerESeriesSolutions, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer47;
+ bSizer47 = new wxBoxSizer( wxVERTICAL );
+
+
+ bMiddleSizerESeries->Add( bSizer47, 1, wxALIGN_BOTTOM, 5 );
+
+
+ bSizerESerie->Add( bMiddleSizerESeries, 0, wxEXPAND|wxTOP, 5 );
+
+ wxBoxSizer* bLowerESerie;
+ bLowerESerie = new wxBoxSizer( wxHORIZONTAL );
+
+ wxStaticBoxSizer* sbLowerSizerEseriesHelp;
+ sbLowerSizerEseriesHelp = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Help") ), wxVERTICAL );
+
+ m_panelESeriesHelp = new wxHtmlWindow( sbLowerSizerEseriesHelp->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
+ sbLowerSizerEseriesHelp->Add( m_panelESeriesHelp, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bLowerESerie->Add( sbLowerSizerEseriesHelp, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerESerie->Add( bLowerESerie, 1, wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizerESerie );
+ this->Layout();
+
+ // Connect Events
+ m_e1->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_E_SERIE_BASE::OnESeriesSelection ), NULL, this );
+ m_e3->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_E_SERIE_BASE::OnESeriesSelection ), NULL, this );
+ m_e6->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_E_SERIE_BASE::OnESeriesSelection ), NULL, this );
+ m_e12->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_E_SERIE_BASE::OnESeriesSelection ), NULL, this );
+ m_buttonEScalculate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_E_SERIE_BASE::OnCalculateESeries ), NULL, this );
+}
+
+PANEL_E_SERIE_BASE::~PANEL_E_SERIE_BASE()
+{
+ // Disconnect Events
+ m_e1->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_E_SERIE_BASE::OnESeriesSelection ), NULL, this );
+ m_e3->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_E_SERIE_BASE::OnESeriesSelection ), NULL, this );
+ m_e6->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_E_SERIE_BASE::OnESeriesSelection ), NULL, this );
+ m_e12->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_E_SERIE_BASE::OnESeriesSelection ), NULL, this );
+ m_buttonEScalculate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_E_SERIE_BASE::OnCalculateESeries ), NULL, this );
+
+}
diff --git a/pcb_calculator/dialogs/panel_eserie_base.fbp b/pcb_calculator/dialogs/panel_eserie_base.fbp
new file mode 100644
index 0000000000..d23b1634f2
--- /dev/null
+++ b/pcb_calculator/dialogs/panel_eserie_base.fbp
@@ -0,0 +1,2180 @@
+
+
+
+
+
diff --git a/pcb_calculator/dialogs/panel_eserie_base.h b/pcb_calculator/dialogs/panel_eserie_base.h
new file mode 100644
index 0000000000..9a696aae4e
--- /dev/null
+++ b/pcb_calculator/dialogs/panel_eserie_base.h
@@ -0,0 +1,86 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 26 2018)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO *NOT* EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PANEL_E_SERIE_BASE
+///////////////////////////////////////////////////////////////////////////////
+class PANEL_E_SERIE_BASE : public wxPanel
+{
+ private:
+
+ protected:
+ wxStaticText* m_ESrequired;
+ wxTextCtrl* m_ResRequired;
+ wxStaticText* m_reqResUnits;
+ wxStaticText* m_ESrequired1;
+ wxTextCtrl* m_ResExclude1;
+ wxStaticText* m_exclude1Units;
+ wxStaticText* m_ESrequired11;
+ wxTextCtrl* m_ResExclude2;
+ wxStaticText* m_exclude2Units;
+ wxStaticLine* m_staticline6;
+ wxRadioButton* m_e1;
+ wxRadioButton* m_e3;
+ wxRadioButton* m_e6;
+ wxRadioButton* m_e12;
+ wxStaticText* m_ESerieSimpleSolution;
+ wxTextCtrl* m_ESeries_Sol2R;
+ wxStaticText* m_ESeriesSimpleErr;
+ wxTextCtrl* m_ESeriesError2R;
+ wxStaticText* m_ESeriesSimplePercent;
+ wxStaticText* m_ESerie3RSolution1;
+ wxTextCtrl* m_ESeries_Sol3R;
+ wxStaticText* m_ESeriesAltErr;
+ wxTextCtrl* m_ESeriesError3R;
+ wxStaticText* m_ESeriesAltPercent;
+ wxStaticText* m_ESeries4RSolution;
+ wxTextCtrl* m_ESeries_Sol4R;
+ wxStaticText* m_ESeriesAltErr1;
+ wxTextCtrl* m_ESeriesError4R;
+ wxStaticText* m_ESeriesAltPercent1;
+ wxStaticLine* m_staticline7;
+ wxButton* m_buttonEScalculate;
+ wxHtmlWindow* m_panelESeriesHelp;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnESeriesSelection( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCalculateESeries( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ PANEL_E_SERIE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 677,453 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
+ ~PANEL_E_SERIE_BASE();
+
+};
+
diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp
index 91e6c4643e..f2f0591537 100644
--- a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp
+++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp
@@ -26,192 +26,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
m_Notebook->AddPage( m_panelRegulators, _("Regulators"), true );
m_panelAttenuators = new PANEL_ATTENUATORS( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Notebook->AddPage( m_panelAttenuators, _("RF Attenuators"), false );
- m_panelESeries = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
- wxBoxSizer* bSizerESerie;
- bSizerESerie = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer* bMiddleSizerESeries;
- bMiddleSizerESeries = new wxBoxSizer( wxHORIZONTAL );
-
- wxStaticBoxSizer* sbSizerESeriesInput;
- sbSizerESeriesInput = new wxStaticBoxSizer( new wxStaticBox( m_panelESeries, wxID_ANY, _("Inputs") ), wxVERTICAL );
-
- wxFlexGridSizer* fgSizerAttPrms1;
- fgSizerAttPrms1 = new wxFlexGridSizer( 4, 3, 3, 0 );
- fgSizerAttPrms1->AddGrowableRow( 1 );
- fgSizerAttPrms1->SetFlexibleDirection( wxBOTH );
- fgSizerAttPrms1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_ESrequired = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("Required resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESrequired->Wrap( -1 );
- fgSizerAttPrms1->Add( m_ESrequired, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_ResRequired = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerAttPrms1->Add( m_ResRequired, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
- m_reqResUnits = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
- m_reqResUnits->Wrap( -1 );
- fgSizerAttPrms1->Add( m_reqResUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_ESrequired1 = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("Exclude value 1:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESrequired1->Wrap( -1 );
- fgSizerAttPrms1->Add( m_ESrequired1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
- m_ResExclude1 = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerAttPrms1->Add( m_ResExclude1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
- m_exclude1Units = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
- m_exclude1Units->Wrap( -1 );
- fgSizerAttPrms1->Add( m_exclude1Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_ESrequired11 = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("Exclude value 2:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESrequired11->Wrap( -1 );
- fgSizerAttPrms1->Add( m_ESrequired11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
- m_ResExclude2 = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerAttPrms1->Add( m_ResExclude2, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_exclude2Units = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
- m_exclude2Units->Wrap( -1 );
- fgSizerAttPrms1->Add( m_exclude2Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
-
- sbSizerESeriesInput->Add( fgSizerAttPrms1, 0, wxEXPAND|wxBOTTOM, 5 );
-
- m_staticline6 = new wxStaticLine( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- sbSizerESeriesInput->Add( m_staticline6, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
-
- wxBoxSizer* bSizer40;
- bSizer40 = new wxBoxSizer( wxHORIZONTAL );
-
- m_e1 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E1"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
- bSizer40->Add( m_e1, 1, wxALL, 5 );
-
- m_e3 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E3"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer40->Add( m_e3, 1, wxALL, 5 );
-
- m_e6 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E6"), wxDefaultPosition, wxDefaultSize, 0 );
- m_e6->SetValue( true );
- bSizer40->Add( m_e6, 1, wxALL, 5 );
-
- m_e12 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E12"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer40->Add( m_e12, 1, wxALL, 5 );
-
-
- sbSizerESeriesInput->Add( bSizer40, 1, wxEXPAND, 5 );
-
-
- bMiddleSizerESeries->Add( sbSizerESeriesInput, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5 );
-
- wxStaticBoxSizer* sbSizerESeriesSolutions;
- sbSizerESeriesSolutions = new wxStaticBoxSizer( new wxStaticBox( m_panelESeries, wxID_ANY, _("Solutions") ), wxVERTICAL );
-
- wxFlexGridSizer* fgSizerESerieResults;
- fgSizerESerieResults = new wxFlexGridSizer( 6, 5, 3, 0 );
- fgSizerESerieResults->AddGrowableCol( 1 );
- fgSizerESerieResults->SetFlexibleDirection( wxBOTH );
- fgSizerESerieResults->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- m_ESerieSimpleSolution = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Simple solution:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESerieSimpleSolution->Wrap( -1 );
- fgSizerESerieResults->Add( m_ESerieSimpleSolution, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- m_ESeries_Sol2R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_ESeries_Sol2R->SetMinSize( wxSize( 150,-1 ) );
-
- fgSizerESerieResults->Add( m_ESeries_Sol2R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- m_ESeriesSimpleErr = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Error:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESeriesSimpleErr->Wrap( -1 );
- fgSizerESerieResults->Add( m_ESeriesSimpleErr, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- m_ESeriesError2R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerESerieResults->Add( m_ESeriesError2R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
-
- m_ESeriesSimplePercent = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESeriesSimplePercent->Wrap( -1 );
- fgSizerESerieResults->Add( m_ESeriesSimplePercent, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_ESerie3RSolution1 = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("3R solution:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESerie3RSolution1->Wrap( -1 );
- fgSizerESerieResults->Add( m_ESerie3RSolution1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- m_ESeries_Sol3R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_ESeries_Sol3R->SetMinSize( wxSize( 220,-1 ) );
-
- fgSizerESerieResults->Add( m_ESeries_Sol3R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
-
- m_ESeriesAltErr = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Error:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESeriesAltErr->Wrap( -1 );
- fgSizerESerieResults->Add( m_ESeriesAltErr, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- m_ESeriesError3R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerESerieResults->Add( m_ESeriesError3R, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_ESeriesAltPercent = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESeriesAltPercent->Wrap( -1 );
- fgSizerESerieResults->Add( m_ESeriesAltPercent, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
- m_ESeries4RSolution = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("4R solution:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESeries4RSolution->Wrap( -1 );
- fgSizerESerieResults->Add( m_ESeries4RSolution, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- m_ESeries_Sol4R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_ESeries_Sol4R->SetMinSize( wxSize( 290,-1 ) );
-
- fgSizerESerieResults->Add( m_ESeries_Sol4R, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxEXPAND, 5 );
-
- m_ESeriesAltErr1 = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Error:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESeriesAltErr1->Wrap( -1 );
- fgSizerESerieResults->Add( m_ESeriesAltErr1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- m_ESeriesError4R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizerESerieResults->Add( m_ESeriesError4R, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
-
- m_ESeriesAltPercent1 = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ESeriesAltPercent1->Wrap( -1 );
- fgSizerESerieResults->Add( m_ESeriesAltPercent1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
-
-
- sbSizerESeriesSolutions->Add( fgSizerESerieResults, 0, wxBOTTOM|wxEXPAND, 5 );
-
- m_staticline7 = new wxStaticLine( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- sbSizerESeriesSolutions->Add( m_staticline7, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
-
- m_buttonEScalculate = new wxButton( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
- sbSizerESeriesSolutions->Add( m_buttonEScalculate, 0, wxALL, 5 );
-
-
- bMiddleSizerESeries->Add( sbSizerESeriesSolutions, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
-
- wxBoxSizer* bSizer47;
- bSizer47 = new wxBoxSizer( wxVERTICAL );
-
-
- bMiddleSizerESeries->Add( bSizer47, 1, wxALIGN_BOTTOM, 5 );
-
-
- bSizerESerie->Add( bMiddleSizerESeries, 0, wxEXPAND|wxTOP, 5 );
-
- wxBoxSizer* bLowerESerie;
- bLowerESerie = new wxBoxSizer( wxHORIZONTAL );
-
- wxStaticBoxSizer* sbLowerSizerEseriesHelp;
- sbLowerSizerEseriesHelp = new wxStaticBoxSizer( new wxStaticBox( m_panelESeries, wxID_ANY, _("Help") ), wxVERTICAL );
-
- m_panelESeriesHelp = new wxHtmlWindow( sbLowerSizerEseriesHelp->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
- sbLowerSizerEseriesHelp->Add( m_panelESeriesHelp, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
-
-
- bLowerESerie->Add( sbLowerSizerEseriesHelp, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
-
-
- bSizerESerie->Add( bLowerESerie, 1, wxEXPAND, 5 );
-
-
- m_panelESeries->SetSizer( bSizerESerie );
- m_panelESeries->Layout();
- bSizerESerie->Fit( m_panelESeries );
+ m_panelESeries = new PANEL_E_SERIE( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Notebook->AddPage( m_panelESeries, _("E-Series"), false );
m_panelColorCode = new PANEL_COLOR_CODE( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Notebook->AddPage( m_panelColorCode, _("Color Code"), false );
@@ -695,11 +510,6 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PCB_CALCULATOR_FRAME_BASE::OnClosePcbCalc ) );
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PCB_CALCULATOR_FRAME_BASE::OnUpdateUI ) );
- m_e1->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnESeriesSelection ), NULL, this );
- m_e3->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnESeriesSelection ), NULL, this );
- m_e6->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnESeriesSelection ), NULL, this );
- m_e12->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnESeriesSelection ), NULL, this );
- m_buttonEScalculate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnCalculateESeries ), NULL, this );
m_TranslineSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
m_button_EpsilonR->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineEpsilonR_Button ), NULL, this );
m_button_TanD->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineTanD_Button ), NULL, this );
@@ -716,11 +526,6 @@ PCB_CALCULATOR_FRAME_BASE::~PCB_CALCULATOR_FRAME_BASE()
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PCB_CALCULATOR_FRAME_BASE::OnClosePcbCalc ) );
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PCB_CALCULATOR_FRAME_BASE::OnUpdateUI ) );
- m_e1->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnESeriesSelection ), NULL, this );
- m_e3->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnESeriesSelection ), NULL, this );
- m_e6->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnESeriesSelection ), NULL, this );
- m_e12->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnESeriesSelection ), NULL, this );
- m_buttonEScalculate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnCalculateESeries ), NULL, this );
m_TranslineSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
m_button_EpsilonR->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineEpsilonR_Button ), NULL, this );
m_button_TanD->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineTanD_Button ), NULL, this );
diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp
index b39087f4c0..c489bc2d67 100644
--- a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp
+++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp
@@ -255,11 +255,11 @@
wxTAB_TRAVERSAL
-
+
E-Series
0
-
+
1
1
1
@@ -304,2138 +304,12 @@
Resizable
1
-
+ PANEL_E_SERIE; panel_eserie.h; Not forward_declare
0
wxTAB_TRAVERSAL
-
-
- bSizerESerie
- wxVERTICAL
- none
-
- 5
- wxEXPAND|wxTOP
- 0
-
-
- bMiddleSizerESeries
- wxHORIZONTAL
- none
-
- 5
- wxLEFT|wxRIGHT|wxTOP|wxEXPAND
- 0
-
- wxID_ANY
- Inputs
-
- sbSizerESeriesInput
- wxVERTICAL
- 1
- none
-
- 5
- wxEXPAND|wxBOTTOM
- 0
-
- 3
- wxBOTH
-
- 1
- 0
-
- fgSizerAttPrms1
- wxFLEX_GROWMODE_SPECIFIED
- none
- 4
- 3
-
- 5
- wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Required resistance:
- 0
-
- 0
-
-
- 0
- -1,-1
- 1
- m_ESrequired
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_ResRequired
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- kOhm
- 0
-
- 0
-
-
- 0
-
- 1
- m_reqResUnits
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Exclude value 1:
- 0
-
- 0
-
-
- 0
- -1,-1
- 1
- m_ESrequired1
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_ResExclude1
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- kOhm
- 0
-
- 0
-
-
- 0
-
- 1
- m_exclude1Units
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Exclude value 2:
- 0
-
- 0
-
-
- 0
- -1,-1
- 1
- m_ESrequired11
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_ResExclude2
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- kOhm
- 0
-
- 0
-
-
- 0
-
- 1
- m_exclude2Units
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
-
-
- 5
- wxEXPAND|wxTOP|wxBOTTOM
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
-
- 1
- m_staticline6
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
- wxLI_HORIZONTAL
- ; ; forward_declare
- 0
-
-
-
-
-
-
-
- 5
- wxEXPAND
- 1
-
-
- bSizer40
- wxHORIZONTAL
- none
-
- 5
- wxALL
- 1
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- E1
-
- 0
-
-
- 0
-
- 1
- m_e1
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
- wxRB_GROUP
- ; ; forward_declare
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
- 0
-
-
-
- OnESeriesSelection
-
-
-
- 5
- wxALL
- 1
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- E3
-
- 0
-
-
- 0
-
- 1
- m_e3
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
- ; ; forward_declare
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
- 0
-
-
-
- OnESeriesSelection
-
-
-
- 5
- wxALL
- 1
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- E6
-
- 0
-
-
- 0
-
- 1
- m_e6
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
- ; ; forward_declare
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
- 1
-
-
-
- OnESeriesSelection
-
-
-
- 5
- wxALL
- 1
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- E12
-
- 0
-
-
- 0
-
- 1
- m_e12
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
- ; ; forward_declare
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
- 0
-
-
-
- OnESeriesSelection
-
-
-
-
-
-
-
- 5
- wxEXPAND|wxTOP|wxRIGHT|wxLEFT
- 1
-
- wxID_ANY
- Solutions
-
- sbSizerESeriesSolutions
- wxVERTICAL
- 1
- none
-
- 5
- wxBOTTOM|wxEXPAND
- 0
-
- 5
- wxBOTH
- 1
-
- 0
-
- fgSizerESerieResults
- wxFLEX_GROWMODE_SPECIFIED
- none
- 6
- 3
-
- 5
- wxALIGN_CENTER_VERTICAL|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Simple solution:
- 0
-
- 0
-
-
- 0
-
- 1
- m_ESerieSimpleSolution
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
- 150,-1
- 1
- m_ESeries_Sol2R
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Error:
- 0
-
- 0
-
-
- 0
-
- 1
- m_ESeriesSimpleErr
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_ESeriesError2R
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- %
- 0
-
- 0
-
-
- 0
-
- 1
- m_ESeriesSimplePercent
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- 3R solution:
- 0
-
- 0
-
-
- 0
-
- 1
- m_ESerie3RSolution1
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
- 220,-1
- 1
- m_ESeries_Sol3R
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Error:
- 0
-
- 0
-
-
- 0
-
- 1
- m_ESeriesAltErr
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_ESeriesError3R
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- %
- 0
-
- 0
-
-
- 0
-
- 1
- m_ESeriesAltPercent
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- 4R solution:
- 0
-
- 0
-
-
- 0
-
- 1
- m_ESeries4RSolution
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxEXPAND
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
- 290,-1
- 1
- m_ESeries_Sol4R
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- Error:
- 0
-
- 0
-
-
- 0
-
- 1
- m_ESeriesAltErr1
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxLEFT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
- 0
-
- 0
-
- 1
- m_ESeriesError4R
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
-
-
-
-
- 5
- wxALIGN_CENTER_VERTICAL|wxRIGHT
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
- %
- 0
-
- 0
-
-
- 0
-
- 1
- m_ESeriesAltPercent1
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
-
-
- 0
-
-
-
-
- -1
-
-
-
-
-
- 5
- wxEXPAND|wxTOP|wxBOTTOM
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
-
- 1
- m_staticline7
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
- wxLI_HORIZONTAL
- ; ; forward_declare
- 0
-
-
-
-
-
-
-
- 5
- wxALL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
-
- 0
- 0
-
- Dock
- 0
- Left
- 1
-
- 1
-
-
- 0
- 0
- wxID_ANY
- Calculate
-
- 0
-
- 0
-
-
- 0
-
- 1
- m_buttonEScalculate
- 1
-
-
- protected
- 1
-
-
-
- Resizable
- 1
-
-
-
- 0
-
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
-
- OnCalculateESeries
-
-
-
-
-
- 5
- wxALIGN_BOTTOM
- 1
-
-
- bSizer47
- wxVERTICAL
- none
-
-
-
-
-
- 5
- wxEXPAND
- 1
-
-
- bLowerESerie
- wxHORIZONTAL
- none
-
- 5
- wxEXPAND|wxTOP|wxRIGHT|wxLEFT
- 1
-
- wxID_ANY
- Help
-
- sbLowerSizerEseriesHelp
- wxVERTICAL
- 1
- none
-
- 5
- wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT
- 1
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
-
- 1
- m_panelESeriesHelp
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
- wxHW_SCROLLBAR_AUTO
-
- 0
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.h b/pcb_calculator/dialogs/pcb_calculator_frame_base.h
index 002bfd5104..1edbdeaa47 100644
--- a/pcb_calculator/dialogs/pcb_calculator_frame_base.h
+++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.h
@@ -17,6 +17,7 @@ class UNIT_SELECTOR_RESISTOR;
#include "panel_regulator.h"
#include "panel_attenuators.h"
+#include "panel_eserie.h"
#include "panel_color_code.h"
#include "panel_via_size.h"
#include "panel_track_width.h"
@@ -33,17 +34,15 @@ class UNIT_SELECTOR_RESISTOR;
#include
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
#include
#include
+#include
+#include
+#include
+#include
#include
+#include
+#include
#include
#include
#include
@@ -63,39 +62,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
wxNotebook* m_Notebook;
PANEL_REGULATOR* m_panelRegulators;
PANEL_ATTENUATORS* m_panelAttenuators;
- wxPanel* m_panelESeries;
- wxStaticText* m_ESrequired;
- wxTextCtrl* m_ResRequired;
- wxStaticText* m_reqResUnits;
- wxStaticText* m_ESrequired1;
- wxTextCtrl* m_ResExclude1;
- wxStaticText* m_exclude1Units;
- wxStaticText* m_ESrequired11;
- wxTextCtrl* m_ResExclude2;
- wxStaticText* m_exclude2Units;
- wxStaticLine* m_staticline6;
- wxRadioButton* m_e1;
- wxRadioButton* m_e3;
- wxRadioButton* m_e6;
- wxRadioButton* m_e12;
- wxStaticText* m_ESerieSimpleSolution;
- wxTextCtrl* m_ESeries_Sol2R;
- wxStaticText* m_ESeriesSimpleErr;
- wxTextCtrl* m_ESeriesError2R;
- wxStaticText* m_ESeriesSimplePercent;
- wxStaticText* m_ESerie3RSolution1;
- wxTextCtrl* m_ESeries_Sol3R;
- wxStaticText* m_ESeriesAltErr;
- wxTextCtrl* m_ESeriesError3R;
- wxStaticText* m_ESeriesAltPercent;
- wxStaticText* m_ESeries4RSolution;
- wxTextCtrl* m_ESeries_Sol4R;
- wxStaticText* m_ESeriesAltErr1;
- wxTextCtrl* m_ESeriesError4R;
- wxStaticText* m_ESeriesAltPercent1;
- wxStaticLine* m_staticline7;
- wxButton* m_buttonEScalculate;
- wxHtmlWindow* m_panelESeriesHelp;
+ PANEL_E_SERIE* m_panelESeries;
PANEL_COLOR_CODE* m_panelColorCode;
wxPanel* m_panelTransline;
wxRadioBox* m_TranslineSelection;
@@ -183,8 +150,6 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
// Virtual event handlers, overide them in your derived class
virtual void OnClosePcbCalc( wxCloseEvent& event ) { event.Skip(); }
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
- virtual void OnESeriesSelection( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnCalculateESeries( wxCommandEvent& event ) { event.Skip(); }
virtual void OnTranslineSelection( wxCommandEvent& event ) { event.Skip(); }
virtual void OnTranslineEpsilonR_Button( wxCommandEvent& event ) { event.Skip(); }
virtual void OnTranslineTanD_Button( wxCommandEvent& event ) { event.Skip(); }
diff --git a/pcb_calculator/eserie.cpp b/pcb_calculator/eserie.cpp
index 28f60b73ff..05c1adfe62 100644
--- a/pcb_calculator/eserie.cpp
+++ b/pcb_calculator/eserie.cpp
@@ -20,9 +20,7 @@
*/
#include
-
-#include
-#include "pcb_calculator_frame.h"
+#include "panel_eserie.h"
extern double DoubleFromString( const wxString& TextValue );
@@ -38,10 +36,6 @@ extern double DoubleFromString( const wxString& TextValue );
#include "eserie.h"
-
-wxString eseries_help =
-#include "eserie_help.h"
-
E_SERIE r;
@@ -289,7 +283,7 @@ void E_SERIE::strip4( void )
}
-void PCB_CALCULATOR_FRAME::OnCalculateESeries( wxCommandEvent& event )
+void PANEL_E_SERIE::OnCalculateESeries( wxCommandEvent& event )
{
double reqr; // required resistor stored in local copy
double error, err3 = 0;
@@ -382,7 +376,8 @@ void PCB_CALCULATOR_FRAME::OnCalculateESeries( wxCommandEvent& event )
m_ESeries_Sol4R->SetValue( fs );
}
-void PCB_CALCULATOR_FRAME::OnESeriesSelection( wxCommandEvent& event )
+
+void PANEL_E_SERIE::OnESeriesSelection( wxCommandEvent& event )
{
if( event.GetEventObject() == m_e1 )
r.SetSeries( E1 );
@@ -393,12 +388,3 @@ void PCB_CALCULATOR_FRAME::OnESeriesSelection( wxCommandEvent& event )
else
r.SetSeries( E6 );
}
-
-void PCB_CALCULATOR_FRAME::initESeriesPanel() // initialize ESeries tab at each pcb-calculator start
-{
- wxString msg;
-
- // show markdown formula explanation in lower help panel
- ConvertMarkdown2Html( wxGetTranslation( eseries_help ), msg );
- m_panelESeriesHelp->SetPage( msg );
-}
diff --git a/pcb_calculator/panel_eserie.cpp b/pcb_calculator/panel_eserie.cpp
new file mode 100644
index 0000000000..ad48177525
--- /dev/null
+++ b/pcb_calculator/panel_eserie.cpp
@@ -0,0 +1,66 @@
+/*
+ * This program source code file is part of KICAD, a free EDA CAD application.
+ *
+ * Copyright (C) 2011 jean-pierre.charras
+ * Copyright (C) 1992-2021 Kicad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see .
+ */
+
+/* see
+ * http://www.desmith.net/NMdS/Electronics/TraceWidth.html
+ * http://www.ultracad.com/articles/pcbtemp.pdf
+ * for more info
+ */
+
+#include
+#include "pcb_calculator_settings.h"
+#include
+//#include
+
+#include // For _HKI definition
+wxString eseries_help =
+#include "eserie_help.h"
+
+
+PANEL_E_SERIE::PANEL_E_SERIE( wxWindow* parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size,
+ long style, const wxString& name ) :
+ PANEL_E_SERIE_BASE( parent, id, pos, size, style, name )
+{
+ m_reqResUnits->SetLabel( wxT( "kΩ" ) );
+ m_exclude1Units->SetLabel( wxT( "kΩ" ) );
+ m_exclude2Units->SetLabel( wxT( "kΩ" ) );
+}
+
+
+PANEL_E_SERIE::~PANEL_E_SERIE()
+{
+}
+
+
+void PANEL_E_SERIE::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg )
+{
+}
+
+
+void PANEL_E_SERIE::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg )
+{
+ // initialize ESeries tab at each pcb-calculator start
+ wxString msg;
+
+ // show markdown formula explanation in lower help panel
+ ConvertMarkdown2Html( wxGetTranslation( eseries_help ), msg );
+ m_panelESeriesHelp->SetPage( msg );
+}
diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp
index fa44a5a345..9dd8fd646f 100644
--- a/pcb_calculator/pcb_calculator_frame.cpp
+++ b/pcb_calculator/pcb_calculator_frame.cpp
@@ -61,10 +61,6 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
for( int ii = 0; ii < 8; ii++ )
m_transline_list.push_back( new TRANSLINE_IDENT( tltype_list[ii] ) );
- m_reqResUnits->SetLabel( wxT( "kΩ" ) );
- m_exclude1Units->SetLabel( wxT( "kΩ" ) );
- m_exclude2Units->SetLabel( wxT( "kΩ" ) );
-
m_EpsilonR_label->SetLabel( wxT( "εr" ) );
LoadSettings( config() );
@@ -74,8 +70,6 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
TranslineTypeSelection( m_currTransLineType );
m_TranslineSelection->SetSelection( m_currTransLineType );
- initESeriesPanel();
-
// Give an icon
wxIcon icon;
wxIconBundle icon_bundle;
@@ -139,9 +133,6 @@ void PCB_CALCULATOR_FRAME::OnUpdateUI( wxUpdateUIEvent& event )
m_panelRegulators->Layout();
- m_panelESeriesHelp->Refresh();
- //m_htmlWinFormulas->Refresh();
-
// Until it's shown on screen the above won't work; but doing it anyway at least keeps
// putting new OnUpdateUI events into the queue until it *is* shown on screen.
if( m_Notebook->IsShownOnScreen() )
@@ -232,6 +223,7 @@ void PCB_CALCULATOR_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
m_panelTrackWidth->LoadSettings( cfg );
m_panelElectricalSpacing->LoadSettings( cfg );
m_panelBoardClass->LoadSettings( cfg );
+ m_panelESeries->LoadSettings( cfg );
}
diff --git a/pcb_calculator/pcb_calculator_frame.h b/pcb_calculator/pcb_calculator_frame.h
index c3d2f453ee..48a8815769 100644
--- a/pcb_calculator/pcb_calculator_frame.h
+++ b/pcb_calculator/pcb_calculator_frame.h
@@ -95,23 +95,6 @@ private:
void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
- /**
- * Panel-specific initializers
- */
- void initESeriesPanel();
-
- /**
- * Called on calculate button and executes all E-series calculations
- */
- void OnCalculateESeries( wxCommandEvent& event ) override;
-
- /**
- * Radio Buttons to select the E-serie for the resistor calculator.
- *
- * @param event contains the radio button state.
- */
- void OnESeriesSelection( wxCommandEvent& event ) override;
-
/**
* Called on new transmission line selection.
*/