More layout optimizations for PCB Calculator.

This commit is contained in:
Jeff Young 2022-12-29 18:05:20 +00:00
parent 6fc662c254
commit 5e0064c21e
6 changed files with 1871 additions and 1847 deletions

View File

@ -53,7 +53,7 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c
wxArrayString m_diameterUnitChoices;
m_diameterUnit = new UNIT_SELECTOR_LEN( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_diameterUnitChoices, 0 );
m_diameterUnit->SetSelection( 0 );
fgSizerLeft->Add( m_diameterUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
fgSizerLeft->Add( m_diameterUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 5 );
m_staticText161 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Area:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText161->Wrap( -1 );
@ -76,6 +76,8 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c
bSizerResistivity = new wxBoxSizer( wxHORIZONTAL );
m_textCtrlConductorResistivity = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textCtrlConductorResistivity->SetMinSize( wxSize( 100,-1 ) );
bSizerResistivity->Add( m_textCtrlConductorResistivity, 1, wxTOP|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_button_ResistivityConductor = new wxButton( sbSizer1->GetStaticBox(), wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
@ -119,7 +121,7 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c
wxArrayString m_linResistanceUnitChoices;
m_linResistanceUnit = new UNIT_SELECTOR_LINEAR_RESISTANCE( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_linResistanceUnitChoices, 0 );
m_linResistanceUnit->SetSelection( 0 );
fgSizerLeft->Add( m_linResistanceUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
fgSizerLeft->Add( m_linResistanceUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 5 );
m_staticText164 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Frequency for 100% skin depth:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText164->Wrap( -1 );
@ -131,7 +133,7 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c
wxArrayString m_frequencyUnitChoices;
m_frequencyUnit = new UNIT_SELECTOR_FREQUENCY( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_frequencyUnitChoices, 0 );
m_frequencyUnit->SetSelection( 0 );
fgSizerLeft->Add( m_frequencyUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
fgSizerLeft->Add( m_frequencyUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 5 );
m_staticText1642 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Ampacity:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1642->Wrap( -1 );
@ -197,7 +199,7 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c
wxArrayString m_lengthUnitChoices;
m_lengthUnit = new UNIT_SELECTOR_LEN_CABLE( sbSizer12->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_lengthUnitChoices, 0 );
m_lengthUnit->SetSelection( 0 );
fgSizerRight->Add( m_lengthUnit, 0, wxTOP, 5 );
fgSizerRight->Add( m_lengthUnit, 0, wxTOP|wxEXPAND, 5 );
m_staticText16121 = new wxStaticText( sbSizer12->GetStaticBox(), wxID_ANY, _("Resistance DC:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16121->Wrap( -1 );
@ -222,7 +224,7 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c
wxArrayString m_vDropUnitChoices;
m_vDropUnit = new UNIT_SELECTOR_VOLTAGE( sbSizer12->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_vDropUnitChoices, 0 );
m_vDropUnit->SetSelection( 0 );
fgSizerRight->Add( m_vDropUnit, 0, wxTOP|wxALIGN_CENTER_VERTICAL, 5 );
fgSizerRight->Add( m_vDropUnit, 0, wxTOP|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_staticText1612122 = new wxStaticText( sbSizer12->GetStaticBox(), wxID_ANY, _("Dissipated power:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1612122->Wrap( -1 );
@ -234,7 +236,7 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c
wxArrayString m_powerUnitChoices;
m_powerUnit = new UNIT_SELECTOR_POWER( sbSizer12->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_powerUnitChoices, 0 );
m_powerUnit->SetSelection( 0 );
fgSizerRight->Add( m_powerUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
fgSizerRight->Add( m_powerUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND, 5 );
sbSizer12->Add( fgSizerRight, 1, 0, 5 );
@ -243,7 +245,7 @@ PANEL_CABLE_SIZE_BASE::PANEL_CABLE_SIZE_BASE( wxWindow* parent, wxWindowID id, c
bSizer4->Add( sbSizer12, 1, wxALL|wxEXPAND, 5 );
bSizer9->Add( bSizer4, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
bSizer9->Add( bSizer4, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
bSizer6->Add( bSizer9, 0, wxEXPAND, 5 );

View File

@ -69,7 +69,7 @@
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT</property>
<property name="proportion">1</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer4</property>
@ -367,7 +367,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="0">
<property name="BottomDockable">1</property>
@ -725,7 +725,7 @@
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="minimum_size">100,-1</property>
<property name="moveable">1</property>
<property name="name">m_textCtrlConductorResistivity</property>
<property name="pane_border">1</property>
@ -1238,7 +1238,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="0">
<property name="BottomDockable">1</property>
@ -1429,7 +1429,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="0">
<property name="BottomDockable">1</property>
@ -2213,7 +2213,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP</property>
<property name="flag">wxTOP|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="1">
<property name="BottomDockable">1</property>
@ -2591,7 +2591,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxALIGN_CENTER_VERTICAL</property>
<property name="flag">wxTOP|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="1">
<property name="BottomDockable">1</property>
@ -2782,7 +2782,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="1">
<property name="BottomDockable">1</property>

View File

@ -40,6 +40,9 @@ PANEL_FUSING_CURRENT::PANEL_FUSING_CURRENT( wxWindow * parent, wxWindowID id,
long style, const wxString& name ) :
PANEL_FUSING_CURRENT_BASE( parent, id, pos, size, style, name )
{
m_ambientUnit->SetLabel( wxT( "°C" ) );
m_meltingUnit->SetLabel( wxT( "°C" ) );
// Set some defaults
m_ambientValue->SetValue( wxString::Format( wxT( "%i" ), 25 ) );
m_meltingValue->SetValue( wxString::Format( wxT( "%i" ), 1084 ) ); // Value for copper

View File

@ -34,7 +34,7 @@ PANEL_REGULATOR_BASE::PANEL_REGULATOR_BASE( wxWindow* parent, wxWindowID id, con
int m_choiceRegTypeNChoices = sizeof( m_choiceRegTypeChoices ) / sizeof( wxString );
m_choiceRegType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceRegTypeNChoices, m_choiceRegTypeChoices, 0 );
m_choiceRegType->SetSelection( 0 );
bSizerType->Add( m_choiceRegType, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
bSizerType->Add( m_choiceRegType, 1, wxLEFT|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
bSizeLeftpReg->Add( bSizerType, 0, wxEXPAND|wxALL, 5 );
@ -49,7 +49,7 @@ PANEL_REGULATOR_BASE::PANEL_REGULATOR_BASE( wxWindow* parent, wxWindowID id, con
bSizeLeftpReg->Add( m_bitmapRegul3pins, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 10 );
bSizeLeftpReg->Add( 0, 0, 1, wxEXPAND, 5 );
bSizeLeftpReg->Add( 0, 10, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerRegFormula;
sbSizerRegFormula = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Formula") ), wxVERTICAL );
@ -72,6 +72,62 @@ PANEL_REGULATOR_BASE::PANEL_REGULATOR_BASE( wxWindow* parent, wxWindowID id, con
wxBoxSizer* bSizerRegulRight;
bSizerRegulRight = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizer9;
bSizer9 = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizerRegulatorsChooser;
sbSizerRegulatorsChooser = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Regulator") ), wxVERTICAL );
wxArrayString m_choiceRegulatorSelectorChoices;
m_choiceRegulatorSelector = new wxChoice( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceRegulatorSelectorChoices, 0 );
m_choiceRegulatorSelector->SetSelection( 0 );
sbSizerRegulatorsChooser->Add( m_choiceRegulatorSelector, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextRegFile = new wxStaticText( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Regulators data file:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRegFile->Wrap( -1 );
m_staticTextRegFile->SetToolTip( _("The name of the data file which stores known regulators parameters.") );
sbSizerRegulatorsChooser->Add( m_staticTextRegFile, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerDataFile;
bSizerDataFile = new wxBoxSizer( wxHORIZONTAL );
m_regulators_fileNameCtrl = new wxTextCtrl( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDataFile->Add( m_regulators_fileNameCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_buttonDataFile = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerDataFile->Add( m_buttonDataFile, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
sbSizerRegulatorsChooser->Add( bSizerDataFile, 1, wxEXPAND, 5 );
wxBoxSizer* bSizerReulBtn;
bSizerReulBtn = new wxBoxSizer( wxHORIZONTAL );
m_buttonEditItem = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Edit Regulator"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonEditItem->SetToolTip( _("Edit the current selected regulator.") );
bSizerReulBtn->Add( m_buttonEditItem, 1, wxALL, 5 );
m_buttonAddItem = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Add Regulator"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonAddItem->SetToolTip( _("Enter a new item to the current list of available regulators") );
bSizerReulBtn->Add( m_buttonAddItem, 1, wxALL, 5 );
m_buttonRemoveItem = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Remove Regulator"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonRemoveItem->SetToolTip( _("Remove an item from the current list of available regulators") );
bSizerReulBtn->Add( m_buttonRemoveItem, 1, wxALL, 5 );
sbSizerRegulatorsChooser->Add( bSizerReulBtn, 1, wxEXPAND, 5 );
bSizer9->Add( sbSizerRegulatorsChooser, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
bSizer9->Add( 0, 10, 1, wxEXPAND, 5 );
wxFlexGridSizer* fgSizerRegParams;
fgSizerRegParams = new wxFlexGridSizer( 6, 4, 4, 0 );
fgSizerRegParams->AddGrowableCol( 2 );
@ -154,22 +210,18 @@ PANEL_REGULATOR_BASE::PANEL_REGULATOR_BASE( wxWindow* parent, wxWindowID id, con
fgSizerRegParams->Add( m_IadjUnitLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
bSizerRegulRight->Add( fgSizerRegParams, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 10 );
bSizer9->Add( fgSizerRegParams, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 );
bSizerRegulRight->Add( bSizer9, 0, 0, 5 );
wxBoxSizer* bSizerRegulButtonCalcReset;
bSizerRegulButtonCalcReset = new wxBoxSizer( wxHORIZONTAL );
m_buttonCalculate = new wxButton( this, wxID_ANY, _("Calculate"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerRegulButtonCalcReset->Add( m_buttonCalculate, 0, wxTOP, 10 );
m_buttonCalculate->SetMinSize( wxSize( 120,-1 ) );
bSizerRegulButtonCalcReset->Add( 10, 0, 0, 0, 5 );
m_buttonRegulReset = new wxButton( this, wxID_ANY, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerRegulButtonCalcReset->Add( m_buttonRegulReset, 0, wxTOP, 10 );
bSizerRegulButtonCalcReset->Add( 0, 0, 3, wxEXPAND, 5 );
bSizerRegulButtonCalcReset->Add( m_buttonCalculate, 0, wxTOP, 5 );
bSizerRegulRight->Add( bSizerRegulButtonCalcReset, 0, wxEXPAND|wxLEFT, 5 );
@ -178,61 +230,17 @@ PANEL_REGULATOR_BASE::PANEL_REGULATOR_BASE( wxWindow* parent, wxWindowID id, con
m_RegulMessage->Wrap( -1 );
bSizerRegulRight->Add( m_RegulMessage, 0, wxALL, 10 );
wxStaticBoxSizer* sbSizerRegulatorsChooser;
sbSizerRegulatorsChooser = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Regulator") ), wxVERTICAL );
wxArrayString m_choiceRegulatorSelectorChoices;
m_choiceRegulatorSelector = new wxChoice( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceRegulatorSelectorChoices, 0 );
m_choiceRegulatorSelector->SetSelection( 0 );
sbSizerRegulatorsChooser->Add( m_choiceRegulatorSelector, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerRegulRight->Add( 0, 0, 1, wxEXPAND, 5 );
m_staticTextRegFile = new wxStaticText( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Regulators data file:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRegFile->Wrap( -1 );
m_staticTextRegFile->SetToolTip( _("The name of the data file which stores known regulators parameters.") );
sbSizerRegulatorsChooser->Add( m_staticTextRegFile, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerDataFile;
bSizerDataFile = new wxBoxSizer( wxHORIZONTAL );
m_regulators_fileNameCtrl = new wxTextCtrl( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerDataFile->Add( m_regulators_fileNameCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_buttonDataFile = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerDataFile->Add( m_buttonDataFile, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_buttonRegulReset = new wxButton( this, wxID_ANY, _("Reset to Defaults"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerRegulRight->Add( m_buttonRegulReset, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxRIGHT, 10 );
sbSizerRegulatorsChooser->Add( bSizerDataFile, 1, wxEXPAND, 5 );
wxBoxSizer* bSizerReulBtn;
bSizerReulBtn = new wxBoxSizer( wxHORIZONTAL );
m_buttonEditItem = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Edit Regulator"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonEditItem->SetToolTip( _("Edit the current selected regulator.") );
bSizerReulBtn->Add( m_buttonEditItem, 1, wxALL, 5 );
m_buttonAddItem = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Add Regulator"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonAddItem->SetToolTip( _("Enter a new item to the current list of available regulators") );
bSizerReulBtn->Add( m_buttonAddItem, 1, wxALL, 5 );
m_buttonRemoveItem = new wxButton( sbSizerRegulatorsChooser->GetStaticBox(), wxID_ANY, _("Remove Regulator"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonRemoveItem->SetToolTip( _("Remove an item from the current list of available regulators") );
bSizerReulBtn->Add( m_buttonRemoveItem, 1, wxALL, 5 );
bSizerColBalancer->Add( bSizerRegulRight, 1, wxEXPAND|wxLEFT, 10 );
sbSizerRegulatorsChooser->Add( bSizerReulBtn, 1, wxEXPAND, 5 );
bSizerRegulRight->Add( sbSizerRegulatorsChooser, 0, wxEXPAND|wxRIGHT, 10 );
bSizerColBalancer->Add( bSizerRegulRight, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
bSizerMainReg->Add( bSizerColBalancer, 0, wxEXPAND, 5 );
bSizerMainReg->Add( bSizerColBalancer, 1, wxEXPAND, 5 );
this->SetSizer( bSizerMainReg );
@ -241,25 +249,25 @@ PANEL_REGULATOR_BASE::PANEL_REGULATOR_BASE( wxWindow* parent, wxWindowID id, con
// Connect Events
m_choiceRegType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulTypeSelection ), NULL, this );
m_buttonCalculate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorCalcButtonClick ), NULL, this );
m_buttonRegulReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorResetButtonClick ), NULL, this );
m_choiceRegulatorSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorSelection ), NULL, this );
m_buttonDataFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnDataFileSelection ), NULL, this );
m_buttonEditItem->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnEditRegulator ), NULL, this );
m_buttonAddItem->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnAddRegulator ), NULL, this );
m_buttonRemoveItem->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRemoveRegulator ), NULL, this );
m_buttonCalculate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorCalcButtonClick ), NULL, this );
m_buttonRegulReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorResetButtonClick ), NULL, this );
}
PANEL_REGULATOR_BASE::~PANEL_REGULATOR_BASE()
{
// Disconnect Events
m_choiceRegType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulTypeSelection ), NULL, this );
m_buttonCalculate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorCalcButtonClick ), NULL, this );
m_buttonRegulReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorResetButtonClick ), NULL, this );
m_choiceRegulatorSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorSelection ), NULL, this );
m_buttonDataFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnDataFileSelection ), NULL, this );
m_buttonEditItem->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnEditRegulator ), NULL, this );
m_buttonAddItem->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnAddRegulator ), NULL, this );
m_buttonRemoveItem->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRemoveRegulator ), NULL, this );
m_buttonCalculate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorCalcButtonClick ), NULL, this );
m_buttonRegulReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_REGULATOR_BASE::OnRegulatorResetButtonClick ), NULL, this );
}

File diff suppressed because it is too large Load Diff

View File

@ -24,9 +24,9 @@
#include <wx/icon.h>
#include <wx/statbmp.h>
#include <wx/statbox.h>
#include <wx/radiobut.h>
#include <wx/textctrl.h>
#include <wx/button.h>
#include <wx/radiobut.h>
#include <wx/panel.h>
///////////////////////////////////////////////////////////////////////////
@ -45,6 +45,13 @@ class PANEL_REGULATOR_BASE : public CALCULATOR_PANEL
wxStaticBitmap* m_bitmapRegul4pins;
wxStaticBitmap* m_bitmapRegul3pins;
wxStaticText* m_RegulFormula;
wxChoice* m_choiceRegulatorSelector;
wxStaticText* m_staticTextRegFile;
wxTextCtrl* m_regulators_fileNameCtrl;
wxButton* m_buttonDataFile;
wxButton* m_buttonEditItem;
wxButton* m_buttonAddItem;
wxButton* m_buttonRemoveItem;
wxRadioButton* m_rbRegulR1;
wxStaticText* m_labelRegultR1;
wxTextCtrl* m_RegulR1Value;
@ -64,25 +71,18 @@ class PANEL_REGULATOR_BASE : public CALCULATOR_PANEL
wxTextCtrl* m_RegulIadjValue;
wxStaticText* m_IadjUnitLabel;
wxButton* m_buttonCalculate;
wxButton* m_buttonRegulReset;
wxStaticText* m_RegulMessage;
wxChoice* m_choiceRegulatorSelector;
wxStaticText* m_staticTextRegFile;
wxTextCtrl* m_regulators_fileNameCtrl;
wxButton* m_buttonDataFile;
wxButton* m_buttonEditItem;
wxButton* m_buttonAddItem;
wxButton* m_buttonRemoveItem;
wxButton* m_buttonRegulReset;
// Virtual event handlers, override them in your derived class
virtual void OnRegulTypeSelection( 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 OnDataFileSelection( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEditRegulator( wxCommandEvent& event ) { event.Skip(); }
virtual void OnAddRegulator( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRemoveRegulator( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRegulatorCalcButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRegulatorResetButtonClick( wxCommandEvent& event ) { event.Skip(); }
public: