From 6fc662c25490029bcf08c405335177609c2c01d1 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 29 Dec 2022 17:37:52 +0000 Subject: [PATCH] More class : filename consistency. --- pcb_calculator/CMakeLists.txt | 8 ++--- ...osion.cpp => panel_galvanic_corrosion.cpp} | 29 +++++++++-------- ...corrosion.h => panel_galvanic_corrosion.h} | 19 ++++++----- ....cpp => panel_galvanic_corrosion_base.cpp} | 10 +++--- ....fbp => panel_galvanic_corrosion_base.fbp} | 6 ++-- ...base.h => panel_galvanic_corrosion_base.h} | 8 ++--- ...tenuators.cpp => panel_rf_attenuators.cpp} | 32 +++++++++---------- ...l_attenuators.h => panel_rf_attenuators.h} | 13 ++++---- ...base.cpp => panel_rf_attenuators_base.cpp} | 18 +++++------ ...base.fbp => panel_rf_attenuators_base.fbp} | 6 ++-- ...ors_base.h => panel_rf_attenuators_base.h} | 8 ++--- pcb_calculator/pcb_calculator_frame.cpp | 10 +++--- 12 files changed, 84 insertions(+), 83 deletions(-) rename pcb_calculator/calculator_panels/{panel_corrosion.cpp => panel_galvanic_corrosion.cpp} (88%) rename pcb_calculator/calculator_panels/{panel_corrosion.h => panel_galvanic_corrosion.h} (76%) rename pcb_calculator/calculator_panels/{panel_corrosion_base.cpp => panel_galvanic_corrosion_base.cpp} (85%) rename pcb_calculator/calculator_panels/{panel_corrosion_base.fbp => panel_galvanic_corrosion_base.fbp} (99%) rename pcb_calculator/calculator_panels/{panel_corrosion_base.h => panel_galvanic_corrosion_base.h} (78%) rename pcb_calculator/calculator_panels/{panel_attenuators.cpp => panel_rf_attenuators.cpp} (87%) rename pcb_calculator/calculator_panels/{panel_attenuators.h => panel_rf_attenuators.h} (87%) rename pcb_calculator/calculator_panels/{panel_attenuators_base.cpp => panel_rf_attenuators_base.cpp} (92%) rename pcb_calculator/calculator_panels/{panel_attenuators_base.fbp => panel_rf_attenuators_base.fbp} (99%) rename pcb_calculator/calculator_panels/{panel_attenuators_base.h => panel_rf_attenuators_base.h} (86%) diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index 79b7be7c3a..159a70e0d9 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -13,16 +13,16 @@ set( PCB_CALCULATOR_SRCS pcb_calculator_frame.cpp pcb_calculator_settings.cpp datafile_read_write.cpp - calculator_panels/panel_attenuators.cpp - calculator_panels/panel_attenuators_base.cpp + calculator_panels/panel_rf_attenuators.cpp + calculator_panels/panel_rf_attenuators_base.cpp calculator_panels/panel_board_class.cpp calculator_panels/panel_board_class_base.cpp calculator_panels/panel_cable_size.cpp calculator_panels/panel_cable_size_base.cpp calculator_panels/panel_color_code.cpp calculator_panels/panel_color_code_base.cpp - calculator_panels/panel_corrosion.cpp - calculator_panels/panel_corrosion_base.cpp + calculator_panels/panel_galvanic_corrosion.cpp + calculator_panels/panel_galvanic_corrosion_base.cpp calculator_panels/panel_electrical_spacing.cpp calculator_panels/panel_electrical_spacing_base.cpp calculator_panels/panel_eseries.cpp diff --git a/pcb_calculator/calculator_panels/panel_corrosion.cpp b/pcb_calculator/calculator_panels/panel_galvanic_corrosion.cpp similarity index 88% rename from pcb_calculator/calculator_panels/panel_corrosion.cpp rename to pcb_calculator/calculator_panels/panel_galvanic_corrosion.cpp index 76d8af3f86..ed19f8d268 100644 --- a/pcb_calculator/calculator_panels/panel_corrosion.cpp +++ b/pcb_calculator/calculator_panels/panel_galvanic_corrosion.cpp @@ -17,7 +17,7 @@ * with this program. If not, see . */ -#include +#include #include #include #include // for KiROUND @@ -25,16 +25,17 @@ extern double DoubleFromString( const wxString& TextValue ); -CORROSION_TABLE_ENTRY::CORROSION_TABLE_ENTRY( const wxString& aName, const wxString& aSymbol, double aPot ) +CORROSION_TABLE_ENTRY::CORROSION_TABLE_ENTRY( const wxString& aName, const wxString& aSymbol, + double aPotential ) { - m_potential = aPot; + m_potential = aPotential; m_name = aName; m_symbol = aSymbol; } -PANEL_CORROSION::PANEL_CORROSION( wxWindow* parent, wxWindowID id, const wxPoint& pos, - const wxSize& size, long style, const wxString& name ) : - PANEL_CORROSION_BASE( parent, id, pos, size, style, name ) +PANEL_GALVANIC_CORROSION::PANEL_GALVANIC_CORROSION( wxWindow* parent, wxWindowID id, const wxPoint& pos, + const wxSize& size, long style, const wxString& name ) : + PANEL_GALVANIC_CORROSION_BASE( parent, id, pos, size, style, name ) { m_entries.clear(); m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Platinum" ), "Pt", -0.57 ) ); @@ -86,40 +87,40 @@ PANEL_CORROSION::PANEL_CORROSION( wxWindow* parent, wxWindowID id, const wxPoint m_helpText->SetPage( help ); m_corFilterValue = 0; - FillTable(); + fillTable(); } -PANEL_CORROSION::~PANEL_CORROSION() +PANEL_GALVANIC_CORROSION::~PANEL_GALVANIC_CORROSION() { } -void PANEL_CORROSION::ThemeChanged() +void PANEL_GALVANIC_CORROSION::ThemeChanged() { } -void PANEL_CORROSION::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) +void PANEL_GALVANIC_CORROSION::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) { m_corFilterCtrl->SetValue( aCfg->m_CorrosionTable.threshold_voltage ); m_corFilterValue = DoubleFromString( m_corFilterCtrl->GetValue() ); } -void PANEL_CORROSION::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) +void PANEL_GALVANIC_CORROSION::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) { aCfg->m_CorrosionTable.threshold_voltage = wxString( "" ) << m_corFilterValue; } -void PANEL_CORROSION::OnCorFilterChange( wxCommandEvent& aEvent ) +void PANEL_GALVANIC_CORROSION::OnCorFilterChange( wxCommandEvent& aEvent ) { m_corFilterValue = DoubleFromString( m_corFilterCtrl->GetValue() ); - FillTable(); + fillTable(); } -void PANEL_CORROSION::FillTable() +void PANEL_GALVANIC_CORROSION::fillTable() { // Fill the table with data int i = 0; diff --git a/pcb_calculator/calculator_panels/panel_corrosion.h b/pcb_calculator/calculator_panels/panel_galvanic_corrosion.h similarity index 76% rename from pcb_calculator/calculator_panels/panel_corrosion.h rename to pcb_calculator/calculator_panels/panel_galvanic_corrosion.h index 909c7d045b..b9d53c452c 100644 --- a/pcb_calculator/calculator_panels/panel_corrosion.h +++ b/pcb_calculator/calculator_panels/panel_galvanic_corrosion.h @@ -20,7 +20,7 @@ #ifndef PANEL_CORROSION_H #define PANEL_CORROSION_H -#include "panel_corrosion_base.h" +#include "panel_galvanic_corrosion_base.h" #include class PCB_CALCULATOR_SETTINGS; @@ -28,7 +28,7 @@ class PCB_CALCULATOR_SETTINGS; class CORROSION_TABLE_ENTRY { public: - CORROSION_TABLE_ENTRY( const wxString& aName, const wxString& aSymbol, double aPot ); + CORROSION_TABLE_ENTRY( const wxString& aName, const wxString& aSymbol, double aPotential ); /** @brief Translatable name ( Copper ) */ wxString m_name; /** @brief Chemical symbol (Cu), not translatable */ @@ -37,13 +37,14 @@ public: double m_potential; }; -class PANEL_CORROSION : public PANEL_CORROSION_BASE +class PANEL_GALVANIC_CORROSION : public PANEL_GALVANIC_CORROSION_BASE { public: - PANEL_CORROSION( wxWindow* parent, wxWindowID id = wxID_ANY, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); - ~PANEL_CORROSION(); + PANEL_GALVANIC_CORROSION( wxWindow* parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + ~PANEL_GALVANIC_CORROSION(); std::vector m_entries; // Methods from CALCULATOR_PANEL that must be overriden @@ -52,9 +53,11 @@ public: void ThemeChanged() override; void OnCorFilterChange( wxCommandEvent& aEvent ) override; +private: + void fillTable(); + private: double m_corFilterValue; - void FillTable(); }; #endif diff --git a/pcb_calculator/calculator_panels/panel_corrosion_base.cpp b/pcb_calculator/calculator_panels/panel_galvanic_corrosion_base.cpp similarity index 85% rename from pcb_calculator/calculator_panels/panel_corrosion_base.cpp rename to pcb_calculator/calculator_panels/panel_galvanic_corrosion_base.cpp index 2910d306a7..74f616730c 100644 --- a/pcb_calculator/calculator_panels/panel_corrosion_base.cpp +++ b/pcb_calculator/calculator_panels/panel_galvanic_corrosion_base.cpp @@ -5,11 +5,11 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "panel_corrosion_base.h" +#include "panel_galvanic_corrosion_base.h" /////////////////////////////////////////////////////////////////////////// -PANEL_CORROSION_BASE::PANEL_CORROSION_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name ) +PANEL_GALVANIC_CORROSION_BASE::PANEL_GALVANIC_CORROSION_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name ) { wxBoxSizer* bSizer6; bSizer6 = new wxBoxSizer( wxVERTICAL ); @@ -81,12 +81,12 @@ PANEL_CORROSION_BASE::PANEL_CORROSION_BASE( wxWindow* parent, wxWindowID id, con bSizer6->Fit( this ); // Connect Events - m_corFilterCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CORROSION_BASE::OnCorFilterChange ), NULL, this ); + m_corFilterCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_GALVANIC_CORROSION_BASE::OnCorFilterChange ), NULL, this ); } -PANEL_CORROSION_BASE::~PANEL_CORROSION_BASE() +PANEL_GALVANIC_CORROSION_BASE::~PANEL_GALVANIC_CORROSION_BASE() { // Disconnect Events - m_corFilterCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_CORROSION_BASE::OnCorFilterChange ), NULL, this ); + m_corFilterCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_GALVANIC_CORROSION_BASE::OnCorFilterChange ), NULL, this ); } diff --git a/pcb_calculator/calculator_panels/panel_corrosion_base.fbp b/pcb_calculator/calculator_panels/panel_galvanic_corrosion_base.fbp similarity index 99% rename from pcb_calculator/calculator_panels/panel_corrosion_base.fbp rename to pcb_calculator/calculator_panels/panel_galvanic_corrosion_base.fbp index bc8c51b6e7..9cea0e904d 100644 --- a/pcb_calculator/calculator_panels/panel_corrosion_base.fbp +++ b/pcb_calculator/calculator_panels/panel_galvanic_corrosion_base.fbp @@ -11,13 +11,13 @@ res UTF-8 connect - panel_corrosion_base + panel_galvanic_corrosion_base 1000 none 1 - panel_corrosion_base + panel_galvanic_corrosion_base . @@ -43,7 +43,7 @@ wxID_ANY - PANEL_CORROSION_BASE + PANEL_GALVANIC_CORROSION_BASE -1,-1 CALCULATOR_PANEL; calculator_panels/calculator_panel.h; diff --git a/pcb_calculator/calculator_panels/panel_corrosion_base.h b/pcb_calculator/calculator_panels/panel_galvanic_corrosion_base.h similarity index 78% rename from pcb_calculator/calculator_panels/panel_corrosion_base.h rename to pcb_calculator/calculator_panels/panel_galvanic_corrosion_base.h index f828cb9e6e..0a95fa46ac 100644 --- a/pcb_calculator/calculator_panels/panel_corrosion_base.h +++ b/pcb_calculator/calculator_panels/panel_galvanic_corrosion_base.h @@ -29,9 +29,9 @@ /////////////////////////////////////////////////////////////////////////////// -/// Class PANEL_CORROSION_BASE +/// Class PANEL_GALVANIC_CORROSION_BASE /////////////////////////////////////////////////////////////////////////////// -class PANEL_CORROSION_BASE : public CALCULATOR_PANEL +class PANEL_GALVANIC_CORROSION_BASE : public CALCULATOR_PANEL { private: @@ -49,9 +49,9 @@ class PANEL_CORROSION_BASE : public CALCULATOR_PANEL public: - PANEL_CORROSION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + PANEL_GALVANIC_CORROSION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); - ~PANEL_CORROSION_BASE(); + ~PANEL_GALVANIC_CORROSION_BASE(); }; diff --git a/pcb_calculator/calculator_panels/panel_attenuators.cpp b/pcb_calculator/calculator_panels/panel_rf_attenuators.cpp similarity index 87% rename from pcb_calculator/calculator_panels/panel_attenuators.cpp rename to pcb_calculator/calculator_panels/panel_rf_attenuators.cpp index d33872e607..498e573b06 100644 --- a/pcb_calculator/calculator_panels/panel_attenuators.cpp +++ b/pcb_calculator/calculator_panels/panel_rf_attenuators.cpp @@ -20,10 +20,9 @@ #include -#include #include -#include +#include #include #include @@ -34,10 +33,9 @@ extern double DoubleFromString( const wxString& TextValue ); -PANEL_ATTENUATORS::PANEL_ATTENUATORS( wxWindow* parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - long style, const wxString& name ) : - PANEL_ATTENUATORS_BASE( parent, id, pos, size, style, name ) +PANEL_RF_ATTENUATORS::PANEL_RF_ATTENUATORS( wxWindow* parent, wxWindowID id, const wxPoint& pos, + const wxSize& size, long style, const wxString& name ) : + PANEL_RF_ATTENUATORS_BASE( parent, id, pos, size, style, name ) { m_CurrAttenuator = nullptr; m_bpButtonCalcAtt->SetBitmap( KiBitmap( BITMAPS::small_down ) ); @@ -63,14 +61,14 @@ PANEL_ATTENUATORS::PANEL_ATTENUATORS( wxWindow* parent, wxWindowID id, } -PANEL_ATTENUATORS::~PANEL_ATTENUATORS() +PANEL_RF_ATTENUATORS::~PANEL_RF_ATTENUATORS() { for( ATTENUATOR* attenuator : m_AttenuatorList ) delete attenuator; } -void PANEL_ATTENUATORS::ThemeChanged() +void PANEL_RF_ATTENUATORS::ThemeChanged() { // Update the bitmaps m_bpButtonCalcAtt->SetBitmap( KiBitmap( BITMAPS::small_down ) ); @@ -88,7 +86,7 @@ void PANEL_ATTENUATORS::ThemeChanged() } -void PANEL_ATTENUATORS::UpdateUI() +void PANEL_RF_ATTENUATORS::UpdateUI() { m_attenuatorBitmap->SetBitmap( KiBitmap( m_CurrAttenuator->m_SchBitmapName ) ); @@ -97,7 +95,7 @@ void PANEL_ATTENUATORS::UpdateUI() } -void PANEL_ATTENUATORS::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) +void PANEL_RF_ATTENUATORS::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) { wxASSERT( aCfg ); @@ -109,7 +107,7 @@ void PANEL_ATTENUATORS::LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) } -void PANEL_ATTENUATORS::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) +void PANEL_RF_ATTENUATORS::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) { wxASSERT( aCfg ); @@ -121,14 +119,14 @@ void PANEL_ATTENUATORS::SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) // Called on a attenuator selection -void PANEL_ATTENUATORS::OnAttenuatorSelection( wxCommandEvent& event ) +void PANEL_RF_ATTENUATORS::OnAttenuatorSelection( wxCommandEvent& event ) { SetAttenuator( (unsigned) event.GetSelection() ); Refresh(); } -void PANEL_ATTENUATORS::SetAttenuator( unsigned aIdx ) +void PANEL_RF_ATTENUATORS::SetAttenuator( unsigned aIdx ) { if( aIdx >=m_AttenuatorList.size() ) aIdx = m_AttenuatorList.size() - 1; @@ -148,7 +146,7 @@ void PANEL_ATTENUATORS::SetAttenuator( unsigned aIdx ) } -void PANEL_ATTENUATORS::OnCalculateAttenuator( wxCommandEvent& event ) +void PANEL_RF_ATTENUATORS::OnCalculateAttenuator( wxCommandEvent& event ) { TransfPanelDataToAttenuator(); m_CurrAttenuator->Calculate(); @@ -156,7 +154,7 @@ void PANEL_ATTENUATORS::OnCalculateAttenuator( wxCommandEvent& event ) } -void PANEL_ATTENUATORS::TransfPanelDataToAttenuator() +void PANEL_RF_ATTENUATORS::TransfPanelDataToAttenuator() { wxString msg; @@ -169,7 +167,7 @@ void PANEL_ATTENUATORS::TransfPanelDataToAttenuator() } -void PANEL_ATTENUATORS::TransfAttenuatorDataToPanel() +void PANEL_RF_ATTENUATORS::TransfAttenuatorDataToPanel() { m_attenuatorBitmap->SetBitmap( KiBitmap( m_CurrAttenuator->m_SchBitmapName ) ); @@ -211,7 +209,7 @@ void PANEL_ATTENUATORS::TransfAttenuatorDataToPanel() } -void PANEL_ATTENUATORS::TransfAttenuatorResultsToPanel() +void PANEL_RF_ATTENUATORS::TransfAttenuatorResultsToPanel() { wxString msg; diff --git a/pcb_calculator/calculator_panels/panel_attenuators.h b/pcb_calculator/calculator_panels/panel_rf_attenuators.h similarity index 87% rename from pcb_calculator/calculator_panels/panel_attenuators.h rename to pcb_calculator/calculator_panels/panel_rf_attenuators.h index 4317d950d9..b6ee0d4496 100644 --- a/pcb_calculator/calculator_panels/panel_attenuators.h +++ b/pcb_calculator/calculator_panels/panel_rf_attenuators.h @@ -17,24 +17,24 @@ * with this program. If not, see . */ -#ifndef PANEL_ATTENUATORS_H -#define PANEL_ATTENUATORS_H +#ifndef PANEL_RF_ATTENUATORS_H +#define PANEL_RF_ATTENUATORS_H -#include "panel_attenuators_base.h" +#include "panel_rf_attenuators_base.h" #include class ATTENUATOR; class PCB_CALCULATOR_SETTINGS; -class PANEL_ATTENUATORS : public PANEL_ATTENUATORS_BASE +class PANEL_RF_ATTENUATORS : public PANEL_RF_ATTENUATORS_BASE { public: - PANEL_ATTENUATORS( wxWindow* parent, wxWindowID id = wxID_ANY, + PANEL_RF_ATTENUATORS( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); - ~PANEL_ATTENUATORS(); + ~PANEL_RF_ATTENUATORS(); wxRadioBox* GetAttenuatorsSelector() { return m_AttenuatorsSelection; } @@ -55,7 +55,6 @@ public: public: ATTENUATOR* m_CurrAttenuator; std::vector m_AttenuatorList; - }; #endif diff --git a/pcb_calculator/calculator_panels/panel_attenuators_base.cpp b/pcb_calculator/calculator_panels/panel_rf_attenuators_base.cpp similarity index 92% rename from pcb_calculator/calculator_panels/panel_attenuators_base.cpp rename to pcb_calculator/calculator_panels/panel_rf_attenuators_base.cpp index 99b86effc4..b2e4b666a2 100644 --- a/pcb_calculator/calculator_panels/panel_attenuators_base.cpp +++ b/pcb_calculator/calculator_panels/panel_rf_attenuators_base.cpp @@ -7,11 +7,11 @@ #include "widgets/std_bitmap_button.h" -#include "panel_attenuators_base.h" +#include "panel_rf_attenuators_base.h" /////////////////////////////////////////////////////////////////////////// -PANEL_ATTENUATORS_BASE::PANEL_ATTENUATORS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name ) +PANEL_RF_ATTENUATORS_BASE::PANEL_RF_ATTENUATORS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : CALCULATOR_PANEL( parent, id, pos, size, style, name ) { wxBoxSizer* bSizerAtt; bSizerAtt = new wxBoxSizer( wxHORIZONTAL ); @@ -199,16 +199,16 @@ PANEL_ATTENUATORS_BASE::PANEL_ATTENUATORS_BASE( wxWindow* parent, wxWindowID id, bSizerAtt->Fit( this ); // Connect Events - m_AttenuatorsSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PANEL_ATTENUATORS_BASE::OnAttenuatorSelection ), NULL, this ); - m_buttonAlcAtt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this ); - m_bpButtonCalcAtt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this ); + m_AttenuatorsSelection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnAttenuatorSelection ), NULL, this ); + m_buttonAlcAtt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this ); + m_bpButtonCalcAtt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this ); } -PANEL_ATTENUATORS_BASE::~PANEL_ATTENUATORS_BASE() +PANEL_RF_ATTENUATORS_BASE::~PANEL_RF_ATTENUATORS_BASE() { // Disconnect Events - m_AttenuatorsSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PANEL_ATTENUATORS_BASE::OnAttenuatorSelection ), NULL, this ); - m_buttonAlcAtt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this ); - m_bpButtonCalcAtt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this ); + m_AttenuatorsSelection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnAttenuatorSelection ), NULL, this ); + m_buttonAlcAtt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this ); + m_bpButtonCalcAtt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_RF_ATTENUATORS_BASE::OnCalculateAttenuator ), NULL, this ); } diff --git a/pcb_calculator/calculator_panels/panel_attenuators_base.fbp b/pcb_calculator/calculator_panels/panel_rf_attenuators_base.fbp similarity index 99% rename from pcb_calculator/calculator_panels/panel_attenuators_base.fbp rename to pcb_calculator/calculator_panels/panel_rf_attenuators_base.fbp index 6400b91618..5d0a0268f6 100644 --- a/pcb_calculator/calculator_panels/panel_attenuators_base.fbp +++ b/pcb_calculator/calculator_panels/panel_rf_attenuators_base.fbp @@ -11,13 +11,13 @@ res UTF-8 connect - panel_attenuators_base + panel_rf_attenuators_base 1000 none 1 - panel_attenuators_base + panel_rf_attenuators_base . @@ -43,7 +43,7 @@ wxID_ANY - PANEL_ATTENUATORS_BASE + PANEL_RF_ATTENUATORS_BASE -1,-1 CALCULATOR_PANEL; calculator_panel.h; forward_declare diff --git a/pcb_calculator/calculator_panels/panel_attenuators_base.h b/pcb_calculator/calculator_panels/panel_rf_attenuators_base.h similarity index 86% rename from pcb_calculator/calculator_panels/panel_attenuators_base.h rename to pcb_calculator/calculator_panels/panel_rf_attenuators_base.h index a533191696..8f6c9a3e2a 100644 --- a/pcb_calculator/calculator_panels/panel_attenuators_base.h +++ b/pcb_calculator/calculator_panels/panel_rf_attenuators_base.h @@ -37,9 +37,9 @@ class STD_BITMAP_BUTTON; /////////////////////////////////////////////////////////////////////////////// -/// Class PANEL_ATTENUATORS_BASE +/// Class PANEL_RF_ATTENUATORS_BASE /////////////////////////////////////////////////////////////////////////////// -class PANEL_ATTENUATORS_BASE : public CALCULATOR_PANEL +class PANEL_RF_ATTENUATORS_BASE : public CALCULATOR_PANEL { private: @@ -77,9 +77,9 @@ class PANEL_ATTENUATORS_BASE : public CALCULATOR_PANEL public: - PANEL_ATTENUATORS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + PANEL_RF_ATTENUATORS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); - ~PANEL_ATTENUATORS_BASE(); + ~PANEL_RF_ATTENUATORS_BASE(); }; diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp index 3eebbb267b..f6699c5f5b 100644 --- a/pcb_calculator/pcb_calculator_frame.cpp +++ b/pcb_calculator/pcb_calculator_frame.cpp @@ -33,10 +33,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -102,7 +102,7 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : AddCalculator( new PANEL_WAVELENGTH( m_treebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ), _( "Wavelength" ) ); - AddCalculator( new PANEL_ATTENUATORS( m_treebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ), + AddCalculator( new PANEL_RF_ATTENUATORS( m_treebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ), _( "RF Attenuators" ) ); AddCalculator( new PANEL_TRANSLINE( m_treebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ), _( "Transmission Lines") ); @@ -115,7 +115,7 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : _( "Color Code" ) ); AddCalculator( new PANEL_BOARD_CLASS( m_treebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ), _("Board Classes") ); - AddCalculator( new PANEL_CORROSION( m_treebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ), + AddCalculator( new PANEL_GALVANIC_CORROSION( m_treebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ), _( "Galvanic Corrosion" ) ); LoadSettings( config() ); @@ -212,7 +212,7 @@ void PCB_CALCULATOR_FRAME::OnUpdateUI( wxUpdateUIEvent& event ) // Kick all the things that wxWidgets can't seem to redraw on its own. // This is getting seriously ridiculous.... PANEL_TRANSLINE* translinePanel = GetCalculator(); - PANEL_ATTENUATORS* attenPanel = GetCalculator(); + PANEL_RF_ATTENUATORS* attenPanel = GetCalculator(); PANEL_VIA_SIZE* viaSizePanel = GetCalculator(); PANEL_REGULATOR* regulPanel = GetCalculator(); PANEL_ELECTRICAL_SPACING* elecSpacingPanel = GetCalculator();