22#include <wx/choicdlg.h>
23#include <wx/filename.h>
24#include <wx/settings.h>
43 findMatch( list, prevChoiceStr, prevChoice );
45 int index = wxGetSingleChoiceIndex( wxEmptyString,
_(
"Relative Dielectric Constants" ),
48 if(
index >= 0 && !list.Item(
index ).IsEmpty() )
61 findMatch( list, prevChoiceStr, prevChoice );
63 int index = wxGetSingleChoiceIndex( wxEmptyString,
_(
"Dielectric Loss Factor" ), list,
64 prevChoice,
nullptr );
66 if(
index >= 0 && !list.Item(
index ).IsEmpty() )
79 findMatch( list, prevChoiceStr, prevChoice );
81 int index = wxGetSingleChoiceIndex( wxEmptyString,
_(
"Specific Resistance" ), list,
82 prevChoice,
nullptr );
84 if(
index >= 0 && !list.Item(
index ).IsEmpty() )
149 for( ; jj < tr_ident->
m_Messages.GetCount(); jj++ )
151 if( left_msg_list[jj] ==
nullptr )
154 left_msg_list[jj]->SetLabel( tr_ident->
m_Messages[jj] );
155 msg_list[jj]->SetLabel( wxEmptyString );
158 while( left_msg_list[jj] )
160 left_msg_list[jj]->SetLabel( wxEmptyString );
161 msg_list[jj]->SetLabel( wxEmptyString );
180#define substrateprms_cnt (sizeof(substrateprms)/sizeof(substrateprms[0]))
189#define physprms_cnt (sizeof(physprms)/sizeof(physprms[0]))
198#define elecprms_cnt (sizeof(elecprms)/sizeof(elecprms[0]))
205#define frequencyprms_cnt (sizeof(frequencyprms)/sizeof(frequencyprms[0]))
207 unsigned idxsubs = 0;
208 unsigned idxphys = 0;
209 unsigned idxelec = 0;
210 unsigned idxfreq = 0;
212 for(
unsigned ii = 0; ii < tr_ident->
GetPrmsCount(); ii++ )
221 data = &substrateprms[idxsubs];
227 data = &physprms[idxphys];
233 data = &elecprms[idxelec];
239 data = &frequencyprms[idxfreq];
251 data->
value->SetValue( wxString::Format( wxS(
"%g" ), prm->
m_Value ) );
252 data->
value->Enable(
true );
256 data->
value->SetValue( wxEmptyString );
257 data->
value->Enable(
false );
274 substrateprms[idxsubs].
name->SetLabel(wxEmptyString);
275 substrateprms[idxsubs].
name->SetToolTip(wxEmptyString);
276 substrateprms[idxsubs].
value->SetValue(wxEmptyString);
277 substrateprms[idxsubs].
value->Enable(
false );
279 if( substrateprms[idxsubs].unit)
281 substrateprms[idxsubs].
unit->Show(
false );
282 substrateprms[idxsubs].
unit->Enable(
false );
283 substrateprms[idxsubs].
unit->SetSelection( 0 );
289 physprms[idxphys].
name->SetLabel(wxEmptyString);
290 physprms[idxphys].
name->SetToolTip(wxEmptyString);
291 physprms[idxphys].
value->SetValue(wxEmptyString);
292 physprms[idxphys].
value->Enable(
false );
294 if( physprms[idxphys].unit)
296 physprms[idxphys].
unit->Show(
false );
297 physprms[idxphys].
unit->Enable(
false );
298 physprms[idxphys].
unit->SetSelection( 0 );
304 elecprms[idxelec].
name->SetLabel(wxEmptyString);
305 elecprms[idxelec].
name->SetToolTip(wxEmptyString);
306 elecprms[idxelec].
value->SetValue(wxEmptyString);
307 elecprms[idxelec].
value->Enable(
false );
309 if( elecprms[idxelec].unit)
311 elecprms[idxelec].
unit->Show(
false );
312 elecprms[idxelec].
unit->Enable(
false );
313 elecprms[idxelec].
unit->SetSelection( 0 );
319 frequencyprms[idxfreq].
name->SetLabel(wxEmptyString);
320 frequencyprms[idxfreq].
name->SetToolTip(wxEmptyString);
321 frequencyprms[idxfreq].
value->SetValue(wxEmptyString);
322 frequencyprms[idxfreq].
value->Enable(
false );
324 if( frequencyprms[idxfreq].unit )
326 frequencyprms[idxfreq].
unit->Show(
false );
327 frequencyprms[idxfreq].
unit->Enable(
false );
328 frequencyprms[idxfreq].
unit->SetSelection( 0 );
338 for(
unsigned ii = 0; ii < tr_ident->
GetPrmsCount(); ii++ )
341 wxTextCtrl * value_ctrl = (wxTextCtrl * ) prm->
m_ValueCtrl;
342 wxString value_txt = value_ctrl->GetValue();
368 if( std::isfinite( fSpec ) && fSpec > 0.0 )
410 GetSizer()->Layout();
420 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
#define frequencyprms_cnt