22#include <wx/choicdlg.h>
23#include <wx/filename.h>
24#include <wx/settings.h>
45 findMatch( list, prevChoiceStr, prevChoice );
47 int index = wxGetSingleChoiceIndex( wxEmptyString,
_(
"Relative Dielectric Constants" ),
50 if(
index >= 0 && !list.Item(
index ).IsEmpty() )
63 findMatch( list, prevChoiceStr, prevChoice );
65 int index = wxGetSingleChoiceIndex( wxEmptyString,
_(
"Dielectric Loss Factor" ), list,
66 prevChoice,
nullptr );
68 if(
index >= 0 && !list.Item(
index ).IsEmpty() )
81 findMatch( list, prevChoiceStr, prevChoice );
83 int index = wxGetSingleChoiceIndex( wxEmptyString,
_(
"Specific Resistance" ), list,
84 prevChoice,
nullptr );
86 if(
index >= 0 && !list.Item(
index ).IsEmpty() )
151 for( ; jj < tr_ident->
m_Messages.GetCount(); jj++ )
153 if( left_msg_list[jj] ==
nullptr )
156 left_msg_list[jj]->SetLabel( tr_ident->
m_Messages[jj] );
157 msg_list[jj]->SetLabel( wxEmptyString );
160 while( left_msg_list[jj] )
162 left_msg_list[jj]->SetLabel( wxEmptyString );
163 msg_list[jj]->SetLabel( wxEmptyString );
182#define substrateprms_cnt (sizeof(substrateprms)/sizeof(substrateprms[0]))
191#define physprms_cnt (sizeof(physprms)/sizeof(physprms[0]))
200#define elecprms_cnt (sizeof(elecprms)/sizeof(elecprms[0]))
207#define frequencyprms_cnt (sizeof(frequencyprms)/sizeof(frequencyprms[0]))
209 unsigned idxsubs = 0;
210 unsigned idxphys = 0;
211 unsigned idxelec = 0;
212 unsigned idxfreq = 0;
214 for(
unsigned ii = 0; ii < tr_ident->
GetPrmsCount(); ii++ )
223 data = &substrateprms[idxsubs];
229 data = &physprms[idxphys];
235 data = &elecprms[idxelec];
241 data = &frequencyprms[idxfreq];
253 data->
value->SetValue( wxString::Format( wxS(
"%g" ), prm->
m_Value ) );
254 data->
value->Enable(
true );
258 data->
value->SetValue( wxEmptyString );
259 data->
value->Enable(
false );
276 substrateprms[idxsubs].
name->SetLabel(wxEmptyString);
277 substrateprms[idxsubs].
name->SetToolTip(wxEmptyString);
278 substrateprms[idxsubs].
value->SetValue(wxEmptyString);
279 substrateprms[idxsubs].
value->Enable(
false );
281 if( substrateprms[idxsubs].unit)
283 substrateprms[idxsubs].
unit->Show(
false );
284 substrateprms[idxsubs].
unit->Enable(
false );
285 substrateprms[idxsubs].
unit->SetSelection( 0 );
291 physprms[idxphys].
name->SetLabel(wxEmptyString);
292 physprms[idxphys].
name->SetToolTip(wxEmptyString);
293 physprms[idxphys].
value->SetValue(wxEmptyString);
294 physprms[idxphys].
value->Enable(
false );
296 if( physprms[idxphys].unit)
298 physprms[idxphys].
unit->Show(
false );
299 physprms[idxphys].
unit->Enable(
false );
300 physprms[idxphys].
unit->SetSelection( 0 );
306 elecprms[idxelec].
name->SetLabel(wxEmptyString);
307 elecprms[idxelec].
name->SetToolTip(wxEmptyString);
308 elecprms[idxelec].
value->SetValue(wxEmptyString);
309 elecprms[idxelec].
value->Enable(
false );
311 if( elecprms[idxelec].unit)
313 elecprms[idxelec].
unit->Show(
false );
314 elecprms[idxelec].
unit->Enable(
false );
315 elecprms[idxelec].
unit->SetSelection( 0 );
321 frequencyprms[idxfreq].
name->SetLabel(wxEmptyString);
322 frequencyprms[idxfreq].
name->SetToolTip(wxEmptyString);
323 frequencyprms[idxfreq].
value->SetValue(wxEmptyString);
324 frequencyprms[idxfreq].
value->Enable(
false );
326 if( frequencyprms[idxfreq].unit )
328 frequencyprms[idxfreq].
unit->Show(
false );
329 frequencyprms[idxfreq].
unit->Enable(
false );
330 frequencyprms[idxfreq].
unit->SetSelection( 0 );
340 for(
unsigned ii = 0; ii < tr_ident->
GetPrmsCount(); ii++ )
343 wxTextCtrl * value_ctrl = (wxTextCtrl * ) prm->
m_ValueCtrl;
344 wxString value_txt = value_ctrl->GetValue();
370 if( std::isfinite( fSpec ) && fSpec > 0.0 )
412 GetSizer()->Layout();
422 for(
unsigned ii = 0; ii < tr_ident->
GetPrmsCount(); ii++ )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
wxTextCtrl * m_Substrate_prm5_Value
UNIT_SELECTOR_RESISTOR * m_choiceUnit_ElecPrm2
wxStaticText * m_left_message5
UNIT_SELECTOR_LEN * m_SubsPrm9_choiceUnit
wxStaticText * m_soldermaskTanDLabel
wxStaticText * m_substrate_prm9_label
wxStaticText * m_left_message3
wxTextCtrl * m_Substrate_prm9_Value
UNIT_SELECTOR_FREQUENCY * m_choiceUnit_SpecFrequency
wxStaticText * m_left_message8
wxStaticText * m_soldermaskEpsilonRLabel
wxStaticText * m_Message2
UNIT_SELECTOR_LEN * m_SubsPrm4_choiceUnit
wxStaticText * m_left_message9
wxStaticText * m_phys_prm2_label
wxStaticText * m_Message9
wxStaticText * m_Message3
wxStaticText * m_EpsilonR_label
wxTextCtrl * m_Elec_prm1_Value
wxChoice * m_dielectricModelChoice
wxStaticText * m_substrate_prm7_label
wxStaticText * m_left_message10
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_soldermaskThicknessValue
wxTextCtrl * m_Phys_prm2_Value
wxTextCtrl * m_Substrate_prm4_Value
wxCheckBox * m_soldermaskPresentCheck
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_soldermaskThicknessUnit
wxCheckBox * m_soldermaskFillsGapsCheck
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
wxTextCtrl * m_soldermaskTanDValue
UNIT_SELECTOR_LEN * m_SubsPrm8_choiceUnit
wxStaticText * m_Message1
wxTextCtrl * m_soldermaskEpsilonRValue
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_soldermaskThicknessLabel
wxStaticText * m_substrate_prm5_label
wxTextCtrl * m_Value_Frequency_Ctrl
wxStaticText * m_Message10
wxTextCtrl * m_Value_TanD
wxTextCtrl * m_Value_SpecFrequency_Ctrl
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 updateSoldermaskEnables()
Apply the enabled state for the soldermask row based on the present checkbox and the current calculat...
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)
@ SOLDERMASK_FILLS_GAPS_PRM
@ SOLDERMASK_EPSILONR_PRM
@ SOLDERMASK_THICKNESS_PRM
#define substrateprms_cnt
double DoubleFromString(const wxString &TextValue)
#define frequencyprms_cnt