20#include <wx/choicdlg.h>
21#include <wx/filename.h>
22#include <wx/settings.h>
41 findMatch( list, prevChoiceStr, prevChoice );
43 int index = wxGetSingleChoiceIndex( wxEmptyString,
_(
"Relative Dielectric Constants" ),
46 if( index >= 0 && !list.Item( index ).IsEmpty() )
59 findMatch( list, prevChoiceStr, prevChoice );
61 int index = wxGetSingleChoiceIndex( wxEmptyString,
_(
"Dielectric Loss Factor" ), list,
62 prevChoice,
nullptr );
64 if( index >= 0 && !list.Item( index ).IsEmpty() )
65 m_Value_TanD->SetValue( list.Item( index ).BeforeFirst(
' ' ) );
77 findMatch( list, prevChoiceStr, prevChoice );
79 int index = wxGetSingleChoiceIndex( wxEmptyString,
_(
"Specific Resistance" ), list,
80 prevChoice,
nullptr );
82 if( index >= 0 && !list.Item( index ).IsEmpty() )
83 m_Value_Rho->SetValue( list.Item( index ).BeforeFirst(
' ' ) );
119 wxStaticText* left_msg_list[] =
125 wxStaticText* msg_list[] =
132 for( ; jj < tr_ident->
m_Messages.GetCount(); jj++ )
134 if( left_msg_list[jj] ==
nullptr )
137 left_msg_list[jj]->SetLabel( tr_ident->
m_Messages[jj] );
138 msg_list[jj]->SetLabel( wxEmptyString );
141 while( left_msg_list[jj] )
143 left_msg_list[jj]->SetLabel( wxEmptyString );
144 msg_list[jj]->SetLabel( wxEmptyString );
163#define substrateprms_cnt (sizeof(substrateprms)/sizeof(substrateprms[0]))
172#define physprms_cnt (sizeof(physprms)/sizeof(physprms[0]))
181#define elecprms_cnt (sizeof(elecprms)/sizeof(elecprms[0]))
188#define frequencyprms_cnt (sizeof(frequencyprms)/sizeof(frequencyprms[0]))
190 unsigned idxsubs = 0;
191 unsigned idxphys = 0;
192 unsigned idxelec = 0;
193 unsigned idxfreq = 0;
195 for(
unsigned ii = 0; ii < tr_ident->
GetPrmsCount(); ii++ )
204 data = &substrateprms[idxsubs];
210 data = &physprms[idxphys];
216 data = &elecprms[idxelec];
222 data = &frequencyprms[idxfreq];
234 data->
value->SetValue( wxString::Format( wxS(
"%g" ), prm->
m_Value ) );
235 data->
value->Enable(
true );
239 data->
value->SetValue( wxEmptyString );
240 data->
value->Enable(
false );
257 substrateprms[idxsubs].
name->SetLabel(wxEmptyString);
258 substrateprms[idxsubs].
name->SetToolTip(wxEmptyString);
259 substrateprms[idxsubs].
value->SetValue(wxEmptyString);
260 substrateprms[idxsubs].
value->Enable(
false );
262 if( substrateprms[idxsubs].unit)
264 substrateprms[idxsubs].
unit->Show(
false );
265 substrateprms[idxsubs].
unit->Enable(
false );
266 substrateprms[idxsubs].
unit->SetSelection( 0 );
272 physprms[idxphys].
name->SetLabel(wxEmptyString);
273 physprms[idxphys].
name->SetToolTip(wxEmptyString);
274 physprms[idxphys].
value->SetValue(wxEmptyString);
275 physprms[idxphys].
value->Enable(
false );
277 if( physprms[idxphys].unit)
279 physprms[idxphys].
unit->Show(
false );
280 physprms[idxphys].
unit->Enable(
false );
281 physprms[idxphys].
unit->SetSelection( 0 );
287 elecprms[idxelec].
name->SetLabel(wxEmptyString);
288 elecprms[idxelec].
name->SetToolTip(wxEmptyString);
289 elecprms[idxelec].
value->SetValue(wxEmptyString);
290 elecprms[idxelec].
value->Enable(
false );
292 if( elecprms[idxelec].unit)
294 elecprms[idxelec].
unit->Show(
false );
295 elecprms[idxelec].
unit->Enable(
false );
296 elecprms[idxelec].
unit->SetSelection( 0 );
302 frequencyprms[idxfreq].
name->SetLabel(wxEmptyString);
303 frequencyprms[idxfreq].
name->SetToolTip(wxEmptyString);
304 frequencyprms[idxfreq].
value->SetValue(wxEmptyString);
305 frequencyprms[idxfreq].
value->Enable(
false );
307 if( frequencyprms[idxfreq].unit )
309 frequencyprms[idxfreq].
unit->Show(
false );
310 frequencyprms[idxfreq].
unit->Enable(
false );
311 frequencyprms[idxfreq].
unit->SetSelection( 0 );
321 for(
unsigned ii = 0; ii < tr_ident->
GetPrmsCount(); ii++ )
324 wxTextCtrl * value_ctrl = (wxTextCtrl * ) prm->
m_ValueCtrl;
325 wxString value_txt = value_ctrl->GetValue();
353 GetSizer()->Layout();
363 for(
unsigned ii = 0; ii < tr_ident->
GetPrmsCount(); ii++ )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
wxTextCtrl * m_Substrate_prm5_Value
UNIT_SELECTOR_RESISTOR * m_choiceUnit_ElecPrm2
wxStaticText * m_left_message5
UNIT_SELECTOR_LEN * m_SubsPrm9_choiceUnit
wxStaticText * m_substrate_prm9_label
wxStaticText * m_left_message3
wxTextCtrl * m_Substrate_prm9_Value
wxStaticText * m_left_message8
wxStaticText * m_Message2
UNIT_SELECTOR_LEN * m_SubsPrm4_choiceUnit
wxStaticText * m_phys_prm2_label
wxStaticText * m_Message3
wxStaticText * m_EpsilonR_label
wxTextCtrl * m_Elec_prm1_Value
wxStaticText * m_substrate_prm7_label
wxStaticText * m_Frequency_label
wxTextCtrl * m_Substrate_prm7_Value
wxStaticBitmap * m_bmCMicrostripZoddZeven
wxStaticText * m_substrate_prm6_label
UNIT_SELECTOR_LEN * m_SubsPrm7_choiceUnit
wxStaticText * m_Message6
wxStaticText * m_phys_prm1_label
wxStaticText * m_elec_prm2_label
UNIT_SELECTOR_LEN * m_choiceUnit_Param3
wxTextCtrl * m_Value_EpsilonR
wxTextCtrl * m_Phys_prm2_Value
wxTextCtrl * m_Substrate_prm4_Value
wxRadioButton * m_radioBtnPrm2
wxStaticText * m_left_message2
UNIT_SELECTOR_LEN * m_SubsPrm5_choiceUnit
wxStaticText * m_left_message6
wxStaticText * m_Message7
wxTextCtrl * m_Substrate_prm6_Value
wxRadioButton * m_radioBtnPrm1
wxStaticText * m_substrate_prm8_label
wxStaticText * m_elec_prm1_label
UNIT_SELECTOR_ANGLE * m_choiceUnit_ElecPrm3
wxTextCtrl * m_Elec_prm2_Value
wxStaticText * m_phys_prm3_label
wxStaticText * m_left_message7
UNIT_SELECTOR_LEN * m_SubsPrm6_choiceUnit
wxStaticText * m_elec_prm3_label
wxStaticBitmap * m_translineBitmap
UNIT_SELECTOR_LEN * m_choiceUnit_Param2
wxStaticText * m_Message4
UNIT_SELECTOR_FREQUENCY * m_choiceUnit_Frequency
UNIT_SELECTOR_LEN * m_SubsPrm8_choiceUnit
wxStaticText * m_Message1
wxTextCtrl * m_Elec_prm3_Value
wxTextCtrl * m_Substrate_prm8_Value
wxStaticText * m_Message5
wxStaticText * m_left_message4
wxStaticText * m_TanD_label
UNIT_SELECTOR_RESISTOR * m_choiceUnit_ElecPrm1
wxStaticText * m_Message8
wxStaticText * m_left_message1
wxStaticText * m_Rho_label
wxStaticText * m_substrate_prm4_label
UNIT_SELECTOR_LEN * m_choiceUnit_Param1
wxTextCtrl * m_Phys_prm1_Value
wxStaticText * m_substrate_prm5_label
wxTextCtrl * m_Value_Frequency_Ctrl
wxTextCtrl * m_Value_TanD
wxTextCtrl * m_Phys_prm3_Value
TRANSLINE * m_currTransLine
void OnTranslineTanD_Button(wxCommandEvent &event) override
Show a list of current dielectric loss factor (tangent delta) and set the selected value in main dial...
void TranslineTypeSelection(enum TRANSLINE_TYPE_ID aType)
Must be called after selection of a new transline.
void OnTranslineEpsilonR_Button(wxCommandEvent &event) override
Shows a list of current relative dielectric constant(Er) and set the selected value in main dialog fr...
void TransfDlgDataToTranslineParams()
Read values entered in dialog frame, and transfer these values in current transline parameters,...
void OnTranslineSelection(wxCommandEvent &event) override
Called on new transmission line selection.
std::vector< TRANSLINE_IDENT * > m_transline_list
void OnTransLineResetButtonClick(wxCommandEvent &event) override
Called when the user clicks the reset button; sets the parameters to their default values.
void OnTranslineRho_Button(wxCommandEvent &event) override
Show a list of current Specific resistance list (rho) and set the selected value in main dialog frame...
enum TRANSLINE_TYPE_ID m_currTransLineType
A class to handle a list of parameters of a given transline.
unsigned GetPrmsCount() const
TRANSLINE_PRM * GetPrm(unsigned aIdx) const
A class to handle one parameter of transline.
virtual double GetUnitScale()=0
Function GetUnitScale.
wxArrayString StandardResistivityList()
wxArrayString StandardRelativeDielectricConstantList()
wxArrayString StandardLossTangentList()
double DoubleFromString(const wxString &TextValue)
bool findMatch(wxArrayString &aList, const wxString &aValue, int &aIdx)
void Refresh()
Update the board display after modifying it by a python script (note: it is automatically called by a...
#define substrateprms_cnt
double DoubleFromString(const wxString &TextValue)
#define frequencyprms_cnt