KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_r_calculator_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12PANEL_R_CALCULATOR_BASE::PANEL_R_CALCULATOR_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name )
13{
14 wxBoxSizer* bSizerESeries;
15 bSizerESeries = new wxBoxSizer( wxVERTICAL );
16
17 wxBoxSizer* bMiddleSizerESeries;
18 bMiddleSizerESeries = new wxBoxSizer( wxHORIZONTAL );
19
20 wxStaticBoxSizer* sbSizerESeriesInput;
21 sbSizerESeriesInput = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Inputs") ), wxVERTICAL );
22
23 wxFlexGridSizer* fgSizerAttPrms1;
24 fgSizerAttPrms1 = new wxFlexGridSizer( 4, 3, 3, 0 );
25 fgSizerAttPrms1->AddGrowableCol( 1 );
26 fgSizerAttPrms1->SetFlexibleDirection( wxHORIZONTAL );
27 fgSizerAttPrms1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
28
29 m_ESrequired = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("Required resistance:"), wxDefaultPosition, wxDefaultSize, 0 );
30 m_ESrequired->Wrap( -1 );
31 fgSizerAttPrms1->Add( m_ESrequired, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
32
33 m_ResRequired = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
34 fgSizerAttPrms1->Add( m_ResRequired, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
35
36 m_reqResUnits = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
37 m_reqResUnits->Wrap( -1 );
38 fgSizerAttPrms1->Add( m_reqResUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
39
40 m_ESrequired1 = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("Exclude value 1:"), wxDefaultPosition, wxDefaultSize, 0 );
41 m_ESrequired1->Wrap( -1 );
42 fgSizerAttPrms1->Add( m_ESrequired1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
43
44 m_ResExclude1 = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
45 fgSizerAttPrms1->Add( m_ResExclude1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
46
47 m_exclude1Units = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
48 m_exclude1Units->Wrap( -1 );
49 fgSizerAttPrms1->Add( m_exclude1Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
50
51 m_ESrequired11 = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("Exclude value 2:"), wxDefaultPosition, wxDefaultSize, 0 );
52 m_ESrequired11->Wrap( -1 );
53 fgSizerAttPrms1->Add( m_ESrequired11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
54
55 m_ResExclude2 = new wxTextCtrl( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
56 fgSizerAttPrms1->Add( m_ResExclude2, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
57
58 m_exclude2Units = new wxStaticText( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("kOhm"), wxDefaultPosition, wxDefaultSize, 0 );
59 m_exclude2Units->Wrap( -1 );
60 fgSizerAttPrms1->Add( m_exclude2Units, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
61
62
63 sbSizerESeriesInput->Add( fgSizerAttPrms1, 0, wxEXPAND|wxBOTTOM, 5 );
64
65 m_staticline6 = new wxStaticLine( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
66 sbSizerESeriesInput->Add( m_staticline6, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
67
68 wxBoxSizer* bSizer40;
69 bSizer40 = new wxBoxSizer( wxHORIZONTAL );
70
71 m_e1 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E1"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
72 bSizer40->Add( m_e1, 1, wxALL, 5 );
73
74 m_e3 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E3"), wxDefaultPosition, wxDefaultSize, 0 );
75 bSizer40->Add( m_e3, 1, wxALL, 5 );
76
77 m_e6 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E6"), wxDefaultPosition, wxDefaultSize, 0 );
78 m_e6->SetValue( true );
79 bSizer40->Add( m_e6, 1, wxALL, 5 );
80
81 m_e12 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E12"), wxDefaultPosition, wxDefaultSize, 0 );
82 bSizer40->Add( m_e12, 1, wxALL, 5 );
83
84 m_e24 = new wxRadioButton( sbSizerESeriesInput->GetStaticBox(), wxID_ANY, _("E24"), wxDefaultPosition, wxDefaultSize, 0 );
85 bSizer40->Add( m_e24, 0, wxALL, 5 );
86
87
88 sbSizerESeriesInput->Add( bSizer40, 1, wxEXPAND, 5 );
89
90
91 bMiddleSizerESeries->Add( sbSizerESeriesInput, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5 );
92
93 wxStaticBoxSizer* sbSizerESeriesSolutions;
94 sbSizerESeriesSolutions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Solutions") ), wxVERTICAL );
95
96 wxFlexGridSizer* fgSizerESeriesResults;
97 fgSizerESeriesResults = new wxFlexGridSizer( 6, 5, 3, 0 );
98 fgSizerESeriesResults->AddGrowableCol( 1 );
99 fgSizerESeriesResults->SetFlexibleDirection( wxBOTH );
100 fgSizerESeriesResults->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
101
102 m_ESeriesSimpleSolution = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Simple solution:"), wxDefaultPosition, wxDefaultSize, 0 );
103 m_ESeriesSimpleSolution->Wrap( -1 );
104 fgSizerESeriesResults->Add( m_ESeriesSimpleSolution, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
105
106 m_ESeries_Sol2R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
107 m_ESeries_Sol2R->SetMinSize( wxSize( 200,-1 ) );
108
109 fgSizerESeriesResults->Add( m_ESeries_Sol2R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
110
111 m_ESeriesSimpleErr = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Approximation:"), wxDefaultPosition, wxDefaultSize, 0 );
112 m_ESeriesSimpleErr->Wrap( -1 );
113 fgSizerESeriesResults->Add( m_ESeriesSimpleErr, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
114
115 m_ESeriesError2R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
116 fgSizerESeriesResults->Add( m_ESeriesError2R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
117
118 m_ESeriesSimplePercent = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
119 m_ESeriesSimplePercent->Wrap( -1 );
120 fgSizerESeriesResults->Add( m_ESeriesSimplePercent, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
121
122 m_ESeries3RSolution1 = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("3R solution:"), wxDefaultPosition, wxDefaultSize, 0 );
123 m_ESeries3RSolution1->Wrap( -1 );
124 fgSizerESeriesResults->Add( m_ESeries3RSolution1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
125
126 m_ESeries_Sol3R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
127 m_ESeries_Sol3R->SetMinSize( wxSize( 200,-1 ) );
128
129 fgSizerESeriesResults->Add( m_ESeries_Sol3R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
130
131 m_ESeriesAltErr = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Approximation:"), wxDefaultPosition, wxDefaultSize, 0 );
132 m_ESeriesAltErr->Wrap( -1 );
133 fgSizerESeriesResults->Add( m_ESeriesAltErr, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
134
135 m_ESeriesError3R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
136 fgSizerESeriesResults->Add( m_ESeriesError3R, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 3 );
137
138 m_ESeriesAltPercent = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
139 m_ESeriesAltPercent->Wrap( -1 );
140 fgSizerESeriesResults->Add( m_ESeriesAltPercent, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
141
142 m_ESeries4RSolution = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("4R solution:"), wxDefaultPosition, wxDefaultSize, 0 );
143 m_ESeries4RSolution->Wrap( -1 );
144 fgSizerESeriesResults->Add( m_ESeries4RSolution, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
145
146 m_ESeries_Sol4R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
147 m_ESeries_Sol4R->SetMinSize( wxSize( 200,-1 ) );
148
149 fgSizerESeriesResults->Add( m_ESeries_Sol4R, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxEXPAND, 5 );
150
151 m_ESeriesAltErr1 = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Approximation:"), wxDefaultPosition, wxDefaultSize, 0 );
152 m_ESeriesAltErr1->Wrap( -1 );
153 fgSizerESeriesResults->Add( m_ESeriesAltErr1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
154
155 m_ESeriesError4R = new wxTextCtrl( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
156 fgSizerESeriesResults->Add( m_ESeriesError4R, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
157
158 m_ESeriesAltPercent1 = new wxStaticText( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
159 m_ESeriesAltPercent1->Wrap( -1 );
160 fgSizerESeriesResults->Add( m_ESeriesAltPercent1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
161
162
163 sbSizerESeriesSolutions->Add( fgSizerESeriesResults, 0, wxBOTTOM|wxEXPAND, 5 );
164
165 m_staticline7 = new wxStaticLine( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
166 sbSizerESeriesSolutions->Add( m_staticline7, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
167
168 m_buttonEScalculate = new wxButton( sbSizerESeriesSolutions->GetStaticBox(), wxID_ANY, _("Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
169 sbSizerESeriesSolutions->Add( m_buttonEScalculate, 0, wxALL, 5 );
170
171
172 bMiddleSizerESeries->Add( sbSizerESeriesSolutions, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
173
174 wxBoxSizer* bSizer47;
175 bSizer47 = new wxBoxSizer( wxVERTICAL );
176
177
178 bMiddleSizerESeries->Add( bSizer47, 1, wxALIGN_BOTTOM, 5 );
179
180
181 bSizerESeries->Add( bMiddleSizerESeries, 0, wxEXPAND|wxTOP|wxRIGHT, 5 );
182
183 wxBoxSizer* bLowerESeries;
184 bLowerESeries = new wxBoxSizer( wxHORIZONTAL );
185
186 wxStaticBoxSizer* sbLowerSizerEseriesHelp;
187 sbLowerSizerEseriesHelp = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Help") ), wxVERTICAL );
188
189 m_panelESeriesHelp = new HTML_WINDOW( sbLowerSizerEseriesHelp->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
190 m_panelESeriesHelp->SetMinSize( wxSize( -1,100 ) );
191
192 sbLowerSizerEseriesHelp->Add( m_panelESeriesHelp, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
193
194
195 bLowerESeries->Add( sbLowerSizerEseriesHelp, 1, wxEXPAND|wxALL, 5 );
196
197
198 bSizerESeries->Add( bLowerESeries, 1, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
199
200
201 this->SetSizer( bSizerESeries );
202 this->Layout();
203 bSizerESeries->Fit( this );
204
205 // Connect Events
206 m_e1->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnESeriesSelection ), NULL, this );
207 m_e3->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnESeriesSelection ), NULL, this );
208 m_e6->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnESeriesSelection ), NULL, this );
209 m_e12->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnESeriesSelection ), NULL, this );
210 m_e24->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnESeriesSelection ), NULL, this );
211 m_buttonEScalculate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnCalculateESeries ), NULL, this );
212}
213
215{
216 // Disconnect Events
217 m_e1->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnESeriesSelection ), NULL, this );
218 m_e3->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnESeriesSelection ), NULL, this );
219 m_e6->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnESeriesSelection ), NULL, this );
220 m_e12->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnESeriesSelection ), NULL, this );
221 m_e24->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnESeriesSelection ), NULL, this );
222 m_buttonEScalculate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_R_CALCULATOR_BASE::OnCalculateESeries ), NULL, this );
223
224}
const char * name
Definition: DXF_plotter.cpp:57
Add dark theme support to wxHtmlWindow.
Definition: html_window.h:35
PANEL_R_CALCULATOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void OnCalculateESeries(wxCommandEvent &event)
virtual void OnESeriesSelection(wxCommandEvent &event)
#define _(s)