PCB Calculator: Adding reset to defaults feature
NEW: Adds buttons to return default settings for regulators, track width, via size and transmission line. CHANGED: Fixes grammar mistake in file via.cpp, line 111. Fixes: lp:1778116 * https://bugs.launchpad.net/kicad/+bug/1778116
This commit is contained in:
parent
10abc6097f
commit
9c33620a0f
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Jul 10 2019)
|
// C++ code generated with wxFormBuilder (version Nov 10 2019)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
#include "../bitmaps/regul_3pins.xpm"
|
#include "../bitmaps/regul_3pins.xpm"
|
||||||
#include "../bitmaps/via.xpm"
|
#include "../bitmaps/via.xpm"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : KIWAY_PLAYER( parent, id, title, pos, size, style, name )
|
PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : KIWAY_PLAYER( parent, id, title, pos, size, style, name )
|
||||||
{
|
{
|
||||||
|
@ -179,8 +179,23 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
|
|
||||||
bSizerRegulRight->Add( fgSizerRegParams, 0, wxEXPAND, 5 );
|
bSizerRegulRight->Add( fgSizerRegParams, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerRegulButtonCalcReset;
|
||||||
|
bSizerRegulButtonCalcReset = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerRegulButtonCalcReset->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_buttonCalculate = new wxButton( m_panelRegulators, wxID_ANY, _("Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonCalculate = new wxButton( m_panelRegulators, wxID_ANY, _("Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerRegulRight->Add( m_buttonCalculate, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
bSizerRegulButtonCalcReset->Add( m_buttonCalculate, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_buttonRegulReset = new wxButton( m_panelRegulators, wxID_ANY, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bSizerRegulButtonCalcReset->Add( m_buttonRegulReset, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerRegulButtonCalcReset->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerRegulRight->Add( bSizerRegulButtonCalcReset, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxStaticBoxSizer* sbSizerRegulatorsChooser;
|
wxStaticBoxSizer* sbSizerRegulatorsChooser;
|
||||||
sbSizerRegulatorsChooser = new wxStaticBoxSizer( new wxStaticBox( m_panelRegulators, wxID_ANY, _("Regulator:") ), wxVERTICAL );
|
sbSizerRegulatorsChooser = new wxStaticBoxSizer( new wxStaticBox( m_panelRegulators, wxID_ANY, _("Regulator:") ), wxVERTICAL );
|
||||||
|
@ -509,6 +524,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
|
|
||||||
bSizeRight->Add( sbSizerTW_Result1, 1, wxEXPAND|wxALL, 5 );
|
bSizeRight->Add( sbSizerTW_Result1, 1, wxEXPAND|wxALL, 5 );
|
||||||
|
|
||||||
|
m_buttonTrackWidthReset = new wxButton( m_panelTrackWidth, wxID_ANY, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bSizeRight->Add( m_buttonTrackWidthReset, 0, wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerTrackWidth->Add( bSizeRight, 0, wxEXPAND, 5 );
|
bSizerTrackWidth->Add( bSizeRight, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
@ -689,6 +707,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
|
|
||||||
bSizerViaSize->Add( sbSizerVS_Inputs, 1, wxEXPAND|wxALL, 5 );
|
bSizerViaSize->Add( sbSizerVS_Inputs, 1, wxEXPAND|wxALL, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerRight;
|
||||||
|
bSizerRight = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxStaticBoxSizer* sbSizerVS_Result;
|
wxStaticBoxSizer* sbSizerVS_Result;
|
||||||
sbSizerVS_Result = new wxStaticBoxSizer( new wxStaticBox( m_panelViaSize, wxID_ANY, _("Results:") ), wxVERTICAL );
|
sbSizerVS_Result = new wxStaticBoxSizer( new wxStaticBox( m_panelViaSize, wxID_ANY, _("Results:") ), wxVERTICAL );
|
||||||
|
|
||||||
|
@ -833,7 +854,13 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
sbSizerVS_Result->Add( m_staticTextWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
sbSizerVS_Result->Add( m_staticTextWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerViaSize->Add( sbSizerVS_Result, 1, wxEXPAND|wxALL, 5 );
|
bSizerRight->Add( sbSizerVS_Result, 1, wxEXPAND|wxALL, 5 );
|
||||||
|
|
||||||
|
m_buttonViaReset = new wxButton( m_panelViaSize, wxID_ANY, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bSizerRight->Add( m_buttonViaReset, 0, wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerViaSize->Add( bSizerRight, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_panelViaSize->SetSizer( bSizerViaSize );
|
m_panelViaSize->SetSizer( bSizerViaSize );
|
||||||
|
@ -1356,6 +1383,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
|
|
||||||
bRightSizer->Add( sbMessagesSizer, 1, wxEXPAND|wxTOP, 5 );
|
bRightSizer->Add( sbMessagesSizer, 1, wxEXPAND|wxTOP, 5 );
|
||||||
|
|
||||||
|
m_buttonTransLineReset = new wxButton( m_panelTransline, wxID_ANY, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bRightSizer->Add( m_buttonTransLineReset, 0, wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizeTransline->Add( bRightSizer, 1, wxEXPAND, 5 );
|
bSizeTransline->Add( bRightSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
@ -1666,6 +1696,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PCB_CALCULATOR_FRAME_BASE::OnClosePcbCalc ) );
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PCB_CALCULATOR_FRAME_BASE::OnClosePcbCalc ) );
|
||||||
m_choiceRegType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulTypeSelection ), NULL, this );
|
m_choiceRegType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulTypeSelection ), NULL, this );
|
||||||
m_buttonCalculate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorCalcButtonClick ), NULL, this );
|
m_buttonCalculate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorCalcButtonClick ), NULL, this );
|
||||||
|
m_buttonRegulReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorResetButtonClick ), NULL, this );
|
||||||
m_choiceRegulatorSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorSelection ), NULL, this );
|
m_choiceRegulatorSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorSelection ), NULL, this );
|
||||||
m_buttonDataFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnDataFileSelection ), NULL, this );
|
m_buttonDataFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnDataFileSelection ), NULL, this );
|
||||||
m_buttonEditItem->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnEditRegulator ), NULL, this );
|
m_buttonEditItem->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnEditRegulator ), NULL, this );
|
||||||
|
@ -1684,6 +1715,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
m_TW_IntTrackWidth_choiceUnit->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_TW_IntTrackWidth_choiceUnit->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
m_IntTrackThicknessValue->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_IntTrackThicknessValue->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
m_IntTrackThicknessUnit->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_IntTrackThicknessUnit->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
|
m_buttonTrackWidthReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWResetButtonClick ), NULL, this );
|
||||||
m_textCtrlHoleDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
m_textCtrlHoleDia->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
m_choiceHoleDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
m_choiceHoleDia->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
m_textCtrlPlatingThickness->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
m_textCtrlPlatingThickness->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
@ -1704,6 +1736,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
m_textCtrlTemperatureDiff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
m_textCtrlTemperatureDiff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
m_textCtrlRiseTime->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
m_textCtrlRiseTime->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
m_staticTextWarning->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PCB_CALCULATOR_FRAME_BASE::onUpdateViaCalcErrorText ), NULL, this );
|
m_staticTextWarning->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PCB_CALCULATOR_FRAME_BASE::onUpdateViaCalcErrorText ), NULL, this );
|
||||||
|
m_buttonViaReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaResetButtonClick ), NULL, this );
|
||||||
m_ElectricalSpacingUnitsSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
m_ElectricalSpacingUnitsSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
||||||
m_buttonElectSpacingRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
m_buttonElectSpacingRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
||||||
m_TranslineSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
|
m_TranslineSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
|
||||||
|
@ -1715,6 +1748,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
|
||||||
m_AnalyseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineAnalyse ), NULL, this );
|
m_AnalyseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineAnalyse ), NULL, this );
|
||||||
m_SynthetizeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this );
|
m_SynthetizeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this );
|
||||||
m_bpButtonSynthetize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this );
|
m_bpButtonSynthetize->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this );
|
||||||
|
m_buttonTransLineReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTransLineResetButtonClick ), NULL, this );
|
||||||
m_AttenuatorsSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnAttenuatorSelection ), NULL, this );
|
m_AttenuatorsSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnAttenuatorSelection ), NULL, this );
|
||||||
m_panelDisplayAttenuator->Connect( wxEVT_PAINT, wxPaintEventHandler( PCB_CALCULATOR_FRAME_BASE::OnPaintAttenuatorPanel ), NULL, this );
|
m_panelDisplayAttenuator->Connect( wxEVT_PAINT, wxPaintEventHandler( PCB_CALCULATOR_FRAME_BASE::OnPaintAttenuatorPanel ), NULL, this );
|
||||||
m_buttonAlcAtt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnCalculateAttenuator ), NULL, this );
|
m_buttonAlcAtt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnCalculateAttenuator ), NULL, this );
|
||||||
|
@ -1729,6 +1763,7 @@ PCB_CALCULATOR_FRAME_BASE::~PCB_CALCULATOR_FRAME_BASE()
|
||||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PCB_CALCULATOR_FRAME_BASE::OnClosePcbCalc ) );
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PCB_CALCULATOR_FRAME_BASE::OnClosePcbCalc ) );
|
||||||
m_choiceRegType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulTypeSelection ), NULL, this );
|
m_choiceRegType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulTypeSelection ), NULL, this );
|
||||||
m_buttonCalculate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorCalcButtonClick ), NULL, this );
|
m_buttonCalculate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorCalcButtonClick ), NULL, this );
|
||||||
|
m_buttonRegulReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorResetButtonClick ), NULL, this );
|
||||||
m_choiceRegulatorSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorSelection ), NULL, this );
|
m_choiceRegulatorSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnRegulatorSelection ), NULL, this );
|
||||||
m_buttonDataFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnDataFileSelection ), NULL, this );
|
m_buttonDataFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnDataFileSelection ), NULL, this );
|
||||||
m_buttonEditItem->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnEditRegulator ), NULL, this );
|
m_buttonEditItem->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnEditRegulator ), NULL, this );
|
||||||
|
@ -1747,6 +1782,7 @@ PCB_CALCULATOR_FRAME_BASE::~PCB_CALCULATOR_FRAME_BASE()
|
||||||
m_TW_IntTrackWidth_choiceUnit->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_TW_IntTrackWidth_choiceUnit->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
m_IntTrackThicknessValue->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_IntTrackThicknessValue->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
m_IntTrackThicknessUnit->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
m_IntTrackThicknessUnit->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWParametersChanged ), NULL, this );
|
||||||
|
m_buttonTrackWidthReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTWResetButtonClick ), NULL, this );
|
||||||
m_textCtrlHoleDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
m_textCtrlHoleDia->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
m_choiceHoleDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
m_choiceHoleDia->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
m_textCtrlPlatingThickness->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
m_textCtrlPlatingThickness->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
|
@ -1767,6 +1803,7 @@ PCB_CALCULATOR_FRAME_BASE::~PCB_CALCULATOR_FRAME_BASE()
|
||||||
m_textCtrlTemperatureDiff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
m_textCtrlTemperatureDiff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
m_textCtrlRiseTime->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
m_textCtrlRiseTime->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaCalculate ), NULL, this );
|
||||||
m_staticTextWarning->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PCB_CALCULATOR_FRAME_BASE::onUpdateViaCalcErrorText ), NULL, this );
|
m_staticTextWarning->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PCB_CALCULATOR_FRAME_BASE::onUpdateViaCalcErrorText ), NULL, this );
|
||||||
|
m_buttonViaReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnViaResetButtonClick ), NULL, this );
|
||||||
m_ElectricalSpacingUnitsSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
m_ElectricalSpacingUnitsSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingUnitsSelection ), NULL, this );
|
||||||
m_buttonElectSpacingRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
m_buttonElectSpacingRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnElectricalSpacingRefresh ), NULL, this );
|
||||||
m_TranslineSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
|
m_TranslineSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSelection ), NULL, this );
|
||||||
|
@ -1778,6 +1815,7 @@ PCB_CALCULATOR_FRAME_BASE::~PCB_CALCULATOR_FRAME_BASE()
|
||||||
m_AnalyseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineAnalyse ), NULL, this );
|
m_AnalyseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineAnalyse ), NULL, this );
|
||||||
m_SynthetizeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this );
|
m_SynthetizeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this );
|
||||||
m_bpButtonSynthetize->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this );
|
m_bpButtonSynthetize->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTranslineSynthetize ), NULL, this );
|
||||||
|
m_buttonTransLineReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnTransLineResetButtonClick ), NULL, this );
|
||||||
m_AttenuatorsSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnAttenuatorSelection ), NULL, this );
|
m_AttenuatorsSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnAttenuatorSelection ), NULL, this );
|
||||||
m_panelDisplayAttenuator->Disconnect( wxEVT_PAINT, wxPaintEventHandler( PCB_CALCULATOR_FRAME_BASE::OnPaintAttenuatorPanel ), NULL, this );
|
m_panelDisplayAttenuator->Disconnect( wxEVT_PAINT, wxPaintEventHandler( PCB_CALCULATOR_FRAME_BASE::OnPaintAttenuatorPanel ), NULL, this );
|
||||||
m_buttonAlcAtt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnCalculateAttenuator ), NULL, this );
|
m_buttonAlcAtt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PCB_CALCULATOR_FRAME_BASE::OnCalculateAttenuator ), NULL, this );
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Jul 10 2019)
|
// C++ code generated with wxFormBuilder (version Nov 10 2019)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -84,6 +84,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
|
||||||
wxStaticText* m_staticTextRegType;
|
wxStaticText* m_staticTextRegType;
|
||||||
wxChoice* m_choiceRegType;
|
wxChoice* m_choiceRegType;
|
||||||
wxButton* m_buttonCalculate;
|
wxButton* m_buttonCalculate;
|
||||||
|
wxButton* m_buttonRegulReset;
|
||||||
wxChoice* m_choiceRegulatorSelector;
|
wxChoice* m_choiceRegulatorSelector;
|
||||||
wxStaticText* m_staticTextRegFile;
|
wxStaticText* m_staticTextRegFile;
|
||||||
wxTextCtrl* m_regulators_fileNameCtrl;
|
wxTextCtrl* m_regulators_fileNameCtrl;
|
||||||
|
@ -145,6 +146,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
|
||||||
wxStaticText* m_staticText792;
|
wxStaticText* m_staticText792;
|
||||||
wxStaticText* m_IntTrackLossValue;
|
wxStaticText* m_IntTrackLossValue;
|
||||||
wxStaticText* m_staticText7911;
|
wxStaticText* m_staticText7911;
|
||||||
|
wxButton* m_buttonTrackWidthReset;
|
||||||
wxPanel* m_panelViaSize;
|
wxPanel* m_panelViaSize;
|
||||||
wxStaticText* m_staticTextHoleDia;
|
wxStaticText* m_staticTextHoleDia;
|
||||||
wxTextCtrl* m_textCtrlHoleDia;
|
wxTextCtrl* m_textCtrlHoleDia;
|
||||||
|
@ -209,6 +211,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
|
||||||
wxStaticText* m_Reactance;
|
wxStaticText* m_Reactance;
|
||||||
wxStaticText* m_staticTextReactanceUnits;
|
wxStaticText* m_staticTextReactanceUnits;
|
||||||
wxStaticText* m_staticTextWarning;
|
wxStaticText* m_staticTextWarning;
|
||||||
|
wxButton* m_buttonViaReset;
|
||||||
wxPanel* m_panelElectricalSpacing;
|
wxPanel* m_panelElectricalSpacing;
|
||||||
UNIT_SELECTOR_LEN* m_ElectricalSpacingUnitsSelector;
|
UNIT_SELECTOR_LEN* m_ElectricalSpacingUnitsSelector;
|
||||||
wxStaticLine* m_staticline2;
|
wxStaticLine* m_staticline2;
|
||||||
|
@ -294,6 +297,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
|
||||||
wxStaticText* m_Message6;
|
wxStaticText* m_Message6;
|
||||||
wxStaticText* m_left_message7;
|
wxStaticText* m_left_message7;
|
||||||
wxStaticText* m_Message7;
|
wxStaticText* m_Message7;
|
||||||
|
wxButton* m_buttonTransLineReset;
|
||||||
wxPanel* m_panelAttenuators;
|
wxPanel* m_panelAttenuators;
|
||||||
wxRadioBox* m_AttenuatorsSelection;
|
wxRadioBox* m_AttenuatorsSelection;
|
||||||
wxPanel* m_panelDisplayAttenuator;
|
wxPanel* m_panelDisplayAttenuator;
|
||||||
|
@ -344,6 +348,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
|
||||||
virtual void OnClosePcbCalc( wxCloseEvent& event ) { event.Skip(); }
|
virtual void OnClosePcbCalc( wxCloseEvent& event ) { event.Skip(); }
|
||||||
virtual void OnRegulTypeSelection( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnRegulTypeSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnRegulatorCalcButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnRegulatorCalcButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnRegulatorResetButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnRegulatorSelection( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnRegulatorSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnDataFileSelection( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnDataFileSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnEditRegulator( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnEditRegulator( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
@ -353,10 +358,12 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
|
||||||
virtual void OnTWParametersChanged( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnTWParametersChanged( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnTWCalculateFromExtWidth( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnTWCalculateFromExtWidth( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnTWCalculateFromIntWidth( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnTWCalculateFromIntWidth( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnTWResetButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnViaCalculate( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnViaCalculate( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnViaRho_Button( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnViaRho_Button( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnViaEpsilonR_Button( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnViaEpsilonR_Button( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) { event.Skip(); }
|
virtual void onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnViaResetButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnElectricalSpacingUnitsSelection( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnElectricalSpacingUnitsSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnElectricalSpacingRefresh( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnElectricalSpacingRefresh( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnTranslineSelection( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnTranslineSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
@ -366,6 +373,7 @@ class PCB_CALCULATOR_FRAME_BASE : public KIWAY_PLAYER
|
||||||
virtual void OnTranslineRho_Button( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnTranslineRho_Button( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnTranslineAnalyse( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnTranslineAnalyse( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnTranslineSynthetize( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnTranslineSynthetize( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnTransLineResetButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnAttenuatorSelection( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnAttenuatorSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnPaintAttenuatorPanel( wxPaintEvent& event ) { event.Skip(); }
|
virtual void OnPaintAttenuatorPanel( wxPaintEvent& event ) { event.Skip(); }
|
||||||
virtual void OnCalculateAttenuator( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnCalculateAttenuator( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
|
@ -143,6 +143,13 @@ private:
|
||||||
*/
|
*/
|
||||||
void OnTWCalculateFromIntWidth( wxCommandEvent& event ) override;
|
void OnTWCalculateFromIntWidth( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function OnTWResetButtonClick
|
||||||
|
* Called when the user clicks the reset button. This sets
|
||||||
|
* the parameters to their default values.
|
||||||
|
*/
|
||||||
|
void OnTWResetButtonClick( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function TWCalculateWidth
|
* Function TWCalculateWidth
|
||||||
* Calculate track width required based on given current and temperature rise.
|
* Calculate track width required based on given current and temperature rise.
|
||||||
|
@ -205,7 +212,14 @@ private:
|
||||||
/**
|
/**
|
||||||
* Update the Error message in Via calculation panel
|
* Update the Error message in Via calculation panel
|
||||||
*/
|
*/
|
||||||
void onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) override;
|
void onUpdateViaCalcErrorText( wxUpdateUIEvent& event ) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function OnViaResetButtonClick
|
||||||
|
* Called when the user clicks the reset button. This sets
|
||||||
|
* the parameters to their default values.
|
||||||
|
*/
|
||||||
|
void OnViaResetButtonClick( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function VSDisplayValues
|
* Function VSDisplayValues
|
||||||
|
@ -227,6 +241,13 @@ private:
|
||||||
*/
|
*/
|
||||||
void OnTranslineSelection( wxCommandEvent& event ) override;
|
void OnTranslineSelection( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function OnTransLineResetButtonClick
|
||||||
|
* Called when the user clicks the reset button. This sets
|
||||||
|
* the parameters to their default values.
|
||||||
|
*/
|
||||||
|
void OnTransLineResetButtonClick( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function OnTranslineAnalyse
|
* Function OnTranslineAnalyse
|
||||||
* Run a new analyse for the current transline with current parameters
|
* Run a new analyse for the current transline with current parameters
|
||||||
|
@ -293,6 +314,7 @@ private:
|
||||||
|
|
||||||
// Regulators Panel
|
// Regulators Panel
|
||||||
void OnRegulatorCalcButtonClick( wxCommandEvent& event ) override;
|
void OnRegulatorCalcButtonClick( wxCommandEvent& event ) override;
|
||||||
|
void OnRegulatorResetButtonClick( wxCommandEvent& event ) override;
|
||||||
void OnRegulTypeSelection( wxCommandEvent& event ) override;
|
void OnRegulTypeSelection( wxCommandEvent& event ) override;
|
||||||
void OnRegulatorSelection( wxCommandEvent& event ) override;
|
void OnRegulatorSelection( wxCommandEvent& event ) override;
|
||||||
void OnDataFileSelection( wxCommandEvent& event ) override;
|
void OnDataFileSelection( wxCommandEvent& event ) override;
|
||||||
|
|
|
@ -157,6 +157,19 @@ void PCB_CALCULATOR_FRAME::OnRegulatorCalcButtonClick( wxCommandEvent& event )
|
||||||
RegulatorsSolve();
|
RegulatorsSolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PCB_CALCULATOR_FRAME::OnRegulatorResetButtonClick( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
m_RegulR1Value->SetValue( wxT( "10" ) );
|
||||||
|
m_RegulR2Value->SetValue( wxT( "10" ) );
|
||||||
|
m_RegulVrefValue->SetValue( wxT( "3" ) );
|
||||||
|
m_RegulVoutValue->SetValue( wxT( "12" ) );
|
||||||
|
m_choiceRegType->SetSelection( 0 );
|
||||||
|
m_rbRegulR1->SetValue(1);
|
||||||
|
m_rbRegulR2->SetValue(0);
|
||||||
|
m_rbRegulVout->SetValue(0);
|
||||||
|
RegulatorPageUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
void PCB_CALCULATOR_FRAME::RegulatorPageUpdate()
|
void PCB_CALCULATOR_FRAME::RegulatorPageUpdate()
|
||||||
{
|
{
|
||||||
switch( m_choiceRegType->GetSelection() )
|
switch( m_choiceRegType->GetSelection() )
|
||||||
|
|
|
@ -221,6 +221,24 @@ void PCB_CALCULATOR_FRAME::OnTWCalculateFromIntWidth( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PCB_CALCULATOR_FRAME::OnTWResetButtonClick( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
m_TrackCurrentValue->SetValue( wxT( "1.0" ) );
|
||||||
|
m_TrackDeltaTValue->SetValue( wxT( "10.0" ) );
|
||||||
|
m_TrackLengthValue->SetValue( wxT( "20" ) );
|
||||||
|
m_TW_CuLength_choiceUnit->SetSelection( 0 );
|
||||||
|
m_TWResistivity->SetValue( wxT( "1.72e-8" ) );
|
||||||
|
m_ExtTrackWidthValue->SetValue( wxT( "0.2" ) );
|
||||||
|
m_TW_ExtTrackWidth_choiceUnit->SetSelection( 0 );
|
||||||
|
m_ExtTrackThicknessValue->SetValue( wxT( "0.035" ) );
|
||||||
|
m_ExtTrackThicknessUnit->SetSelection( 0 );
|
||||||
|
m_IntTrackWidthValue->SetValue( wxT( "0.2" ) );
|
||||||
|
m_TW_IntTrackWidth_choiceUnit->SetSelection( 0 );
|
||||||
|
m_IntTrackThicknessValue->SetValue( wxT( "0.035" ) );
|
||||||
|
m_IntTrackThicknessUnit->SetSelection( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCB_CALCULATOR_FRAME::TWDisplayValues( double aCurrent, double aExtWidth,
|
void PCB_CALCULATOR_FRAME::TWDisplayValues( double aCurrent, double aExtWidth,
|
||||||
double aIntWidth, double aExtThickness, double aIntThickness )
|
double aIntWidth, double aExtThickness, double aIntThickness )
|
||||||
{
|
{
|
||||||
|
|
|
@ -440,3 +440,16 @@ void PCB_CALCULATOR_FRAME::OnTranslineSelection( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function OnTransLineResetButtonClick
|
||||||
|
* Called when the user clicks the reset button. This sets
|
||||||
|
* the parameters to their default values.
|
||||||
|
*/
|
||||||
|
void PCB_CALCULATOR_FRAME::OnTransLineResetButtonClick( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
TranslineTypeSelection( DEFAULT_TYPE );
|
||||||
|
m_TranslineSelection->SetSelection( DEFAULT_TYPE );
|
||||||
|
|
||||||
|
m_panelTransline->GetSizer()->Layout();
|
||||||
|
m_panelTransline->Refresh();
|
||||||
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ void PCB_CALCULATOR_FRAME::onUpdateViaCalcErrorText( wxUpdateUIEvent& event )
|
||||||
{
|
{
|
||||||
// Update the Error message if a via has a external diameter
|
// Update the Error message if a via has a external diameter
|
||||||
// bigger than the clearance area diameter
|
// bigger than the clearance area diameter
|
||||||
// (therefore the via is inside a copper zone and some parameters connot be calculated)
|
// (therefore the via is inside a copper zone and some parameters cannot be calculated)
|
||||||
double clearanceDia = std::abs( DoubleFromString( m_textCtrlClearanceDia->GetValue() ) );
|
double clearanceDia = std::abs( DoubleFromString( m_textCtrlClearanceDia->GetValue() ) );
|
||||||
clearanceDia *= m_choiceClearanceDia->GetUnitScale();
|
clearanceDia *= m_choiceClearanceDia->GetUnitScale();
|
||||||
double padDia = std::abs( DoubleFromString( m_textCtrlViaPadDia->GetValue() ) );
|
double padDia = std::abs( DoubleFromString( m_textCtrlViaPadDia->GetValue() ) );
|
||||||
|
@ -118,6 +118,30 @@ void PCB_CALCULATOR_FRAME::onUpdateViaCalcErrorText( wxUpdateUIEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PCB_CALCULATOR_FRAME::OnViaResetButtonClick( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
#define DEFAULT_UNIT_SEL_MM 0
|
||||||
|
|
||||||
|
m_textCtrlHoleDia->SetValue( wxT( "0.4" ) );
|
||||||
|
m_choiceHoleDia->SetSelection( DEFAULT_UNIT_SEL_MM );
|
||||||
|
m_textCtrlPlatingThickness->SetValue( wxT( "0.035" ) );
|
||||||
|
m_choicePlatingThickness->SetSelection( DEFAULT_UNIT_SEL_MM );
|
||||||
|
m_textCtrlViaLength->SetValue( wxT( "1.6" ) );
|
||||||
|
m_choiceViaLength->SetSelection( DEFAULT_UNIT_SEL_MM );
|
||||||
|
m_textCtrlViaPadDia->SetValue( wxT( "0.6" ) );
|
||||||
|
m_choiceViaPadDia->SetSelection( DEFAULT_UNIT_SEL_MM );
|
||||||
|
m_textCtrlClearanceDia->SetValue( wxT( "1.0" ) );
|
||||||
|
m_choiceClearanceDia->SetSelection( DEFAULT_UNIT_SEL_MM );
|
||||||
|
m_textCtrlImpedance->SetValue( wxT( "50" ) );
|
||||||
|
m_choiceImpedance->SetSelection( DEFAULT_UNIT_SEL_MM );
|
||||||
|
m_textCtrlAppliedCurrent->SetValue( wxT( "1" ) );
|
||||||
|
m_textCtrlPlatingResistivity->SetValue( wxT( "1.72e-8" ) );
|
||||||
|
m_textCtrlPlatingPermittivity->SetValue( wxT( "4.5" ) );
|
||||||
|
m_textCtrlTemperatureDiff->SetValue( wxT( "10" ) );
|
||||||
|
m_textCtrlRiseTime->SetValue( wxT( "1" ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCB_CALCULATOR_FRAME::VS_Init( wxConfigBase* aCfg )
|
void PCB_CALCULATOR_FRAME::VS_Init( wxConfigBase* aCfg )
|
||||||
{
|
{
|
||||||
int tmp;
|
int tmp;
|
||||||
|
|
Loading…
Reference in New Issue