KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_rf_attenuators_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
10
12
14
15PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name )
16{
17 wxBoxSizer* bSizerAtt;
18 bSizerAtt = new wxBoxSizer( wxHORIZONTAL );
19
20 wxBoxSizer* bLeftSizerAtt;
21 bLeftSizerAtt = new wxBoxSizer( wxVERTICAL );
22
23 bLeftSizerAtt->SetMinSize( wxSize( 260,-1 ) );
24 wxString m_AttenuatorsSelectionChoices[] = { _("Pi"), _("Tee"), _("Bridged tee"), _("Resistive splitter") };
25 int m_AttenuatorsSelectionNChoices = sizeof( m_AttenuatorsSelectionChoices ) / sizeof( wxString );
26 m_AttenuatorsSelection = new wxRadioBox( this, wxID_ANY, _("Attenuators"), wxDefaultPosition, wxDefaultSize, m_AttenuatorsSelectionNChoices, m_AttenuatorsSelectionChoices, 1, wxRA_SPECIFY_COLS );
27 m_AttenuatorsSelection->SetSelection( 1 );
28 bLeftSizerAtt->Add( m_AttenuatorsSelection, 0, wxEXPAND|wxALL, 5 );
29
30
31 bLeftSizerAtt->Add( 0, 5, 0, wxEXPAND, 5 );
32
33 m_attenuatorBitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
34 bLeftSizerAtt->Add( m_attenuatorBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 10 );
35
36
37 bSizerAtt->Add( bLeftSizerAtt, 0, wxBOTTOM|wxEXPAND|wxRIGHT, 5 );
38
39 wxBoxSizer* bMiddleSizerAtt;
40 bMiddleSizerAtt = new wxBoxSizer( wxVERTICAL );
41
42 wxStaticBoxSizer* sbSizerAttPrms;
43 sbSizerAttPrms = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Parameters") ), wxVERTICAL );
44
45 wxFlexGridSizer* fgSizerAttPrms;
46 fgSizerAttPrms = new wxFlexGridSizer( 3, 3, 3, 0 );
47 fgSizerAttPrms->AddGrowableRow( 1 );
48 fgSizerAttPrms->SetFlexibleDirection( wxBOTH );
49 fgSizerAttPrms->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
50
51 m_attenuationLabel = new wxStaticText( sbSizerAttPrms->GetStaticBox(), wxID_ANY, _("Attenuation (a):"), wxDefaultPosition, wxDefaultSize, 0 );
52 m_attenuationLabel->Wrap( -1 );
53 fgSizerAttPrms->Add( m_attenuationLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
54
55 m_AttValueCtrl = new wxTextCtrl( sbSizerAttPrms->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
56 m_AttValueCtrl->SetMinSize( wxSize( 100,-1 ) );
57
58 fgSizerAttPrms->Add( m_AttValueCtrl, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
59
60 m_attUnit = new wxStaticText( sbSizerAttPrms->GetStaticBox(), wxID_ANY, _("dB"), wxDefaultPosition, wxDefaultSize, 0 );
61 m_attUnit->Wrap( -1 );
62 fgSizerAttPrms->Add( m_attUnit, 0, wxALIGN_CENTER_VERTICAL, 5 );
63
64 m_attenuationZinLabel = new wxStaticText( sbSizerAttPrms->GetStaticBox(), wxID_ANY, _("Zin:"), wxDefaultPosition, wxDefaultSize, 0 );
65 m_attenuationZinLabel->Wrap( -1 );
66 fgSizerAttPrms->Add( m_attenuationZinLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
67
68 m_ZinValueCtrl = new wxTextCtrl( sbSizerAttPrms->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
69 m_ZinValueCtrl->SetMinSize( wxSize( 100,-1 ) );
70
71 fgSizerAttPrms->Add( m_ZinValueCtrl, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
72
73 m_attZinUnit = new wxStaticText( sbSizerAttPrms->GetStaticBox(), wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 );
74 m_attZinUnit->Wrap( -1 );
75 fgSizerAttPrms->Add( m_attZinUnit, 0, wxALIGN_CENTER_VERTICAL, 5 );
76
77 m_ZoutLabel = new wxStaticText( sbSizerAttPrms->GetStaticBox(), wxID_ANY, _("Zout:"), wxDefaultPosition, wxDefaultSize, 0 );
78 m_ZoutLabel->Wrap( -1 );
79 fgSizerAttPrms->Add( m_ZoutLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
80
81 m_ZoutValueCtrl = new wxTextCtrl( sbSizerAttPrms->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
82 m_ZoutValueCtrl->SetMinSize( wxSize( 100,-1 ) );
83
84 fgSizerAttPrms->Add( m_ZoutValueCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
85
86 m_attZoutUnit = new wxStaticText( sbSizerAttPrms->GetStaticBox(), wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 );
87 m_attZoutUnit->Wrap( -1 );
88 fgSizerAttPrms->Add( m_attZoutUnit, 0, wxALIGN_CENTER_VERTICAL, 5 );
89
90
91 sbSizerAttPrms->Add( fgSizerAttPrms, 0, wxALL|wxEXPAND, 5 );
92
93
94 bMiddleSizerAtt->Add( sbSizerAttPrms, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
95
96 wxBoxSizer* bSizerAttButt;
97 bSizerAttButt = new wxBoxSizer( wxHORIZONTAL );
98
99 m_buttonAlcAtt = new wxButton( this, wxID_ANY, _("Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
100 m_buttonAlcAtt->SetMinSize( wxSize( 120,-1 ) );
101
102 bSizerAttButt->Add( m_buttonAlcAtt, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
103
104 m_bpButtonCalcAtt = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
105 bSizerAttButt->Add( m_bpButtonCalcAtt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
106
107
108 bMiddleSizerAtt->Add( bSizerAttButt, 0, 0, 5 );
109
110 wxStaticBoxSizer* sbSizerAttValues;
111 sbSizerAttValues = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Values") ), wxVERTICAL );
112
113 wxFlexGridSizer* fgSizerAttResults;
114 fgSizerAttResults = new wxFlexGridSizer( 3, 3, 3, 0 );
115 fgSizerAttResults->AddGrowableCol( 1 );
116 fgSizerAttResults->SetFlexibleDirection( wxBOTH );
117 fgSizerAttResults->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
118
119 m_attenuatorR1Label = new wxStaticText( sbSizerAttValues->GetStaticBox(), wxID_ANY, _("R1:"), wxDefaultPosition, wxDefaultSize, 0 );
120 m_attenuatorR1Label->Wrap( -1 );
121 fgSizerAttResults->Add( m_attenuatorR1Label, 0, wxALIGN_CENTER_VERTICAL, 5 );
122
123 m_Att_R1_Value = new wxTextCtrl( sbSizerAttValues->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
124 fgSizerAttResults->Add( m_Att_R1_Value, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
125
126 m_attR1Unit = new wxStaticText( sbSizerAttValues->GetStaticBox(), wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 );
127 m_attR1Unit->Wrap( -1 );
128 fgSizerAttResults->Add( m_attR1Unit, 0, wxALIGN_CENTER_VERTICAL, 5 );
129
130 m_attenuatorR2Label = new wxStaticText( sbSizerAttValues->GetStaticBox(), wxID_ANY, _("R2:"), wxDefaultPosition, wxDefaultSize, 0 );
131 m_attenuatorR2Label->Wrap( -1 );
132 fgSizerAttResults->Add( m_attenuatorR2Label, 0, wxALIGN_CENTER_VERTICAL, 5 );
133
134 m_Att_R2_Value = new wxTextCtrl( sbSizerAttValues->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
135 fgSizerAttResults->Add( m_Att_R2_Value, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
136
137 m_attR2Unit = new wxStaticText( sbSizerAttValues->GetStaticBox(), wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 );
138 m_attR2Unit->Wrap( -1 );
139 fgSizerAttResults->Add( m_attR2Unit, 0, wxALIGN_CENTER_VERTICAL, 5 );
140
141 m_attenuatorR3Label = new wxStaticText( sbSizerAttValues->GetStaticBox(), wxID_ANY, _("R3:"), wxDefaultPosition, wxDefaultSize, 0 );
142 m_attenuatorR3Label->Wrap( -1 );
143 fgSizerAttResults->Add( m_attenuatorR3Label, 0, wxALIGN_CENTER_VERTICAL, 5 );
144
145 m_Att_R3_Value = new wxTextCtrl( sbSizerAttValues->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
146 fgSizerAttResults->Add( m_Att_R3_Value, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
147
148 m_attR3Unit = new wxStaticText( sbSizerAttValues->GetStaticBox(), wxID_ANY, _("Ohms"), wxDefaultPosition, wxDefaultSize, 0 );
149 m_attR3Unit->Wrap( -1 );
150 fgSizerAttResults->Add( m_attR3Unit, 0, wxALIGN_CENTER_VERTICAL, 5 );
151
152
153 sbSizerAttValues->Add( fgSizerAttResults, 0, wxALL|wxEXPAND, 5 );
154
155
156 bMiddleSizerAtt->Add( sbSizerAttValues, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
157
158 wxBoxSizer* bSizerMessages;
159 bSizerMessages = new wxBoxSizer( wxVERTICAL );
160
161 wxBoxSizer* bSizerIndentLabel;
162 bSizerIndentLabel = new wxBoxSizer( wxHORIZONTAL );
163
164 m_staticTextAttMsg = new wxStaticText( this, wxID_ANY, _("Messages"), wxDefaultPosition, wxDefaultSize, 0 );
165 m_staticTextAttMsg->Wrap( -1 );
166 bSizerIndentLabel->Add( m_staticTextAttMsg, 0, wxALL, 2 );
167
168
169 bSizerMessages->Add( bSizerIndentLabel, 0, wxLEFT, 6 );
170
171 m_Attenuator_Messages = new HTML_WINDOW( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_NO_SELECTION|wxHW_SCROLLBAR_AUTO );
172 bSizerMessages->Add( m_Attenuator_Messages, 1, wxEXPAND|wxBOTTOM|wxRIGHT, 8 );
173
174
175 bMiddleSizerAtt->Add( bSizerMessages, 1, wxEXPAND|wxLEFT, 3 );
176
177
178 bSizerAtt->Add( bMiddleSizerAtt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
179
180 wxBoxSizer* bSizer7;
181 bSizer7 = new wxBoxSizer( wxVERTICAL );
182
183 wxStaticBoxSizer* sbRightSizerFormula;
184 sbRightSizerFormula = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Formula") ), wxVERTICAL );
185
186 m_panelAttFormula = new HTML_WINDOW( sbRightSizerFormula->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
187 m_panelAttFormula->SetMinSize( wxSize( 200,-1 ) );
188
189 sbRightSizerFormula->Add( m_panelAttFormula, 1, wxALL|wxEXPAND, 5 );
190
191
192 bSizer7->Add( sbRightSizerFormula, 1, wxALL|wxEXPAND, 5 );
193
194
195 bSizerAtt->Add( bSizer7, 1, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
196
197
198 this->SetSizer( bSizerAtt );
199 this->Layout();
200 bSizerAtt->Fit( this );
201
202 // Connect Events
203 m_AttenuatorsSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnAttenuatorSelection ), NULL, this );
204 m_buttonAlcAtt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this );
205 m_bpButtonCalcAtt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this );
206}
207
209{
210 // Disconnect Events
211 m_AttenuatorsSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnAttenuatorSelection ), NULL, this );
212 m_buttonAlcAtt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this );
213 m_bpButtonCalcAtt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this );
214
215}
const char * name
Definition: DXF_plotter.cpp:57
Add dark theme support to wxHtmlWindow.
Definition: html_window.h:35
PANEL_RF_ATTENUATORS_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 OnCalculateAttenuator(wxCommandEvent &event)
virtual void OnAttenuatorSelection(wxCommandEvent &event)
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)