From 6dfcfb0177b308241363885451f7a9ddc11e7324 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 18 Oct 2020 00:25:39 +0100 Subject: [PATCH] Rename DIALOG_EDIT_COMPONENT_IN_SCHEMATIC -> DIALOG_SYMBOL_PROPERTIES --- eeschema/CMakeLists.txt | 4 +- ...matic.cpp => dialog_symbol_properties.cpp} | 62 ++++++++--------- ...schematic.h => dialog_symbol_properties.h} | 16 ++--- ....cpp => dialog_symbol_properties_base.cpp} | 66 +++++++++---------- ....fbp => dialog_symbol_properties_base.fbp} | 4 +- ...base.h => dialog_symbol_properties_base.h} | 8 +-- eeschema/tools/sch_edit_tool.cpp | 4 +- 7 files changed, 82 insertions(+), 82 deletions(-) rename eeschema/dialogs/{dialog_edit_component_in_schematic.cpp => dialog_symbol_properties.cpp} (92%) rename eeschema/dialogs/{dialog_edit_component_in_schematic.h => dialog_symbol_properties.h} (85%) rename eeschema/dialogs/{dialog_edit_component_in_schematic_base.cpp => dialog_symbol_properties_base.cpp} (84%) rename eeschema/dialogs/{dialog_edit_component_in_schematic_base.fbp => dialog_symbol_properties_base.fbp} (99%) rename eeschema/dialogs/{dialog_edit_component_in_schematic_base.h => dialog_symbol_properties_base.h} (86%) diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 02bbf285b6..5b4b0dc016 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -58,8 +58,6 @@ set( EESCHEMA_DLGS dialogs/dialog_choose_component.cpp dialogs/dialog_edit_component_in_lib.cpp dialogs/dialog_edit_component_in_lib_base.cpp - dialogs/dialog_edit_component_in_schematic.cpp - dialogs/dialog_edit_component_in_schematic_base.cpp dialogs/dialog_edit_components_libid.cpp dialogs/dialog_edit_components_libid_base.cpp dialogs/dialog_edit_label.cpp @@ -106,6 +104,8 @@ set( EESCHEMA_DLGS dialogs/dialog_schematic_find.cpp dialogs/dialog_schematic_find_base.cpp dialogs/dialog_schematic_setup.cpp + dialogs/dialog_symbol_properties.cpp + dialogs/dialog_symbol_properties_base.cpp dialogs/dialog_symbol_remap.cpp dialogs/dialog_symbol_remap_base.cpp dialogs/dialog_update_from_pcb.cpp diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_symbol_properties.cpp similarity index 92% rename from eeschema/dialogs/dialog_edit_component_in_schematic.cpp rename to eeschema/dialogs/dialog_symbol_properties.cpp index a1e3cae2aa..92b5c5cacb 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_symbol_properties.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dialog_edit_component_in_schematic.h" +#include "dialog_symbol_properties.h" #include #include @@ -269,9 +269,9 @@ public: }; -DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( SCH_EDIT_FRAME* aParent, - SCH_COMPONENT* aComponent ) : - DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE( aParent ) +DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES( SCH_EDIT_FRAME* aParent, + SCH_COMPONENT* aComponent ) : + DIALOG_SYMBOL_PROPERTIES_BASE( aParent ) { m_comp = aComponent; m_part = m_comp->GetPartRef().get(); @@ -346,18 +346,18 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( SCH_EDIT // wxFormBuilder doesn't include this event... m_fieldsGrid->Connect( wxEVT_GRID_CELL_CHANGING, - wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnGridCellChanging ), + wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES::OnGridCellChanging ), nullptr, this ); m_pinGrid->Connect( wxEVT_GRID_COL_SORT, - wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnPinTableColSort ), + wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES::OnPinTableColSort ), nullptr, this ); FinishDialogSettings(); } -DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC() +DIALOG_SYMBOL_PROPERTIES::~DIALOG_SYMBOL_PROPERTIES() { auto cfg = dynamic_cast( Kiface().KifaceSettings() ); @@ -369,10 +369,10 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC() m_pinGrid->DestroyTable( m_dataModel ); m_fieldsGrid->Disconnect( wxEVT_GRID_CELL_CHANGING, - wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnGridCellChanging ), + wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES::OnGridCellChanging ), nullptr, this ); m_pinGrid->Disconnect( wxEVT_GRID_COL_SORT, - wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnPinTableColSort ), + wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES::OnPinTableColSort ), nullptr, this ); // Delete the GRID_TRICKS. @@ -381,13 +381,13 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC() } -SCH_EDIT_FRAME* DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::GetParent() +SCH_EDIT_FRAME* DIALOG_SYMBOL_PROPERTIES::GetParent() { return dynamic_cast( wxDialog::GetParent() ); } -bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataToWindow() +bool DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow() { if( !wxDialog::TransferDataToWindow() ) return false; @@ -484,7 +484,7 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataToWindow() } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnEditSpiceModel( wxCommandEvent& event ) +void DIALOG_SYMBOL_PROPERTIES::OnEditSpiceModel( wxCommandEvent& event ) { #ifdef KICAD_SPICE int diff = m_fields->size(); @@ -512,7 +512,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnEditSpiceModel( wxCommandEvent& event } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick( wxCommandEvent& event ) +void DIALOG_SYMBOL_PROPERTIES::OnCancelButtonClick( wxCommandEvent& event ) { // Running the Footprint Browser gums up the works and causes the automatic cancel // stuff to no longer work. So we do it here ourselves. @@ -520,7 +520,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick( wxCommandEvent& ev } -bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::Validate() +bool DIALOG_SYMBOL_PROPERTIES::Validate() { wxString msg; LIB_ID id; @@ -561,7 +561,7 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::Validate() } -bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow() +bool DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow() { if( !wxDialog::TransferDataFromWindow() ) // Calls our Validate() method. return false; @@ -717,7 +717,7 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow() } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnGridCellChanging( wxGridEvent& event ) +void DIALOG_SYMBOL_PROPERTIES::OnGridCellChanging( wxGridEvent& event ) { wxGridCellEditor* editor = m_fieldsGrid->GetCellEditor( event.GetRow(), event.GetCol() ); wxControl* control = editor->GetControl(); @@ -754,14 +754,14 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnGridCellChanging( wxGridEvent& event } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnGridEditorShown( wxGridEvent& aEvent ) +void DIALOG_SYMBOL_PROPERTIES::OnGridEditorShown( wxGridEvent& aEvent ) { if( aEvent.GetRow() == REFERENCE && aEvent.GetCol() == FDC_VALUE ) m_delayedSelection= true; } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnAddField( wxCommandEvent& event ) +void DIALOG_SYMBOL_PROPERTIES::OnAddField( wxCommandEvent& event ) { if( !m_fieldsGrid->CommitPendingChanges() ) return; @@ -788,7 +788,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnAddField( wxCommandEvent& event ) } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnDeleteField( wxCommandEvent& event ) +void DIALOG_SYMBOL_PROPERTIES::OnDeleteField( wxCommandEvent& event ) { int curRow = m_fieldsGrid->GetGridCursorRow(); @@ -819,7 +819,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnDeleteField( wxCommandEvent& event ) } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnMoveUp( wxCommandEvent& event ) +void DIALOG_SYMBOL_PROPERTIES::OnMoveUp( wxCommandEvent& event ) { if( !m_fieldsGrid->CommitPendingChanges() ) return; @@ -843,7 +843,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnMoveUp( wxCommandEvent& event ) } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnMoveDown( wxCommandEvent& event ) +void DIALOG_SYMBOL_PROPERTIES::OnMoveDown( wxCommandEvent& event ) { if( !m_fieldsGrid->CommitPendingChanges() ) return; @@ -867,31 +867,31 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnMoveDown( wxCommandEvent& event ) } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnEditSymbol( wxCommandEvent& ) +void DIALOG_SYMBOL_PROPERTIES::OnEditSymbol( wxCommandEvent& ) { EndQuasiModal( SYMBOL_PROPS_EDIT_SCHEMATIC_SYMBOL ); } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnEditLibrarySymbol( wxCommandEvent& ) +void DIALOG_SYMBOL_PROPERTIES::OnEditLibrarySymbol( wxCommandEvent& ) { EndQuasiModal( SYMBOL_PROPS_EDIT_LIBRARY_SYMBOL ); } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnUpdateSymbol( wxCommandEvent& ) +void DIALOG_SYMBOL_PROPERTIES::OnUpdateSymbol( wxCommandEvent& ) { EndQuasiModal( SYMBOL_PROPS_WANT_UPDATE_SYMBOL ); } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnExchangeSymbol( wxCommandEvent& ) +void DIALOG_SYMBOL_PROPERTIES::OnExchangeSymbol( wxCommandEvent& ) { EndQuasiModal( SYMBOL_PROPS_WANT_EXCHANGE_SYMBOL ); } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnPinTableCellEdited( wxGridEvent& aEvent ) +void DIALOG_SYMBOL_PROPERTIES::OnPinTableCellEdited( wxGridEvent& aEvent ) { int row = aEvent.GetRow(); @@ -906,7 +906,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnPinTableCellEdited( wxGridEvent& aEve } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnPinTableColSort( wxGridEvent& aEvent ) +void DIALOG_SYMBOL_PROPERTIES::OnPinTableColSort( wxGridEvent& aEvent ) { int sortCol = aEvent.GetCol(); bool ascending; @@ -924,7 +924,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnPinTableColSort( wxGridEvent& aEvent } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::AdjustGridColumns( int aWidth ) +void DIALOG_SYMBOL_PROPERTIES::AdjustGridColumns( int aWidth ) { wxGridUpdateLocker deferRepaintsTillLeavingScope; @@ -958,7 +958,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::AdjustGridColumns( int aWidth ) } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnUpdateUI( wxUpdateUIEvent& event ) +void DIALOG_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event ) { wxString shownColumns = m_fieldsGrid->GetShownColumns(); @@ -999,7 +999,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnUpdateUI( wxUpdateUIEvent& event ) } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnSizeGrid( wxSizeEvent& event ) +void DIALOG_SYMBOL_PROPERTIES::OnSizeGrid( wxSizeEvent& event ) { auto new_size = event.GetSize().GetX(); @@ -1013,7 +1013,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnSizeGrid( wxSizeEvent& event ) } -void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnInitDlg( wxInitDialogEvent& event ) +void DIALOG_SYMBOL_PROPERTIES::OnInitDlg( wxInitDialogEvent& event ) { TransferDataToWindow(); diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.h b/eeschema/dialogs/dialog_symbol_properties.h similarity index 85% rename from eeschema/dialogs/dialog_edit_component_in_schematic.h rename to eeschema/dialogs/dialog_symbol_properties.h index f062611592..1dda2e3345 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.h +++ b/eeschema/dialogs/dialog_symbol_properties.h @@ -22,10 +22,10 @@ */ -#ifndef _DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_H_ -#define _DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_H_ +#ifndef DIALOG_SYMBOL_PROPERTIES_H +#define DIALOG_SYMBOL_PROPERTIES_H -#include +#include #include #include @@ -49,14 +49,14 @@ enum SYMBOL_PROPS_RETVALUE /** * Dialog used to edit #SCH_COMPONENT objects in a schematic. * - * This is derived from DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE which is maintained by + * This is derived from DIALOG_SYMBOL_PROPERTIES_BASE which is maintained by * wxFormBuilder. */ -class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC : public DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE +class DIALOG_SYMBOL_PROPERTIES : public DIALOG_SYMBOL_PROPERTIES_BASE { public: - DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( SCH_EDIT_FRAME* aParent, SCH_COMPONENT* aComponent ); - ~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC() override; + DIALOG_SYMBOL_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_COMPONENT* aComponent ); + ~DIALOG_SYMBOL_PROPERTIES() override; SCH_EDIT_FRAME* GetParent(); @@ -102,4 +102,4 @@ private: SCH_PIN_TABLE_DATA_MODEL* m_dataModel; }; -#endif // _DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_H_ +#endif // DIALOG_SYMBOL_PROPERTIES_H diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_base.cpp b/eeschema/dialogs/dialog_symbol_properties_base.cpp similarity index 84% rename from eeschema/dialogs/dialog_edit_component_in_schematic_base.cpp rename to eeschema/dialogs/dialog_symbol_properties_base.cpp index e24499a984..934fff0a4e 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_base.cpp +++ b/eeschema/dialogs/dialog_symbol_properties_base.cpp @@ -7,11 +7,11 @@ #include "widgets/wx_grid.h" -#include "dialog_edit_component_in_schematic_base.h" +#include "dialog_symbol_properties_base.h" /////////////////////////////////////////////////////////////////////////// -DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +DIALOG_SYMBOL_PROPERTIES_BASE::DIALOG_SYMBOL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); @@ -337,40 +337,40 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE mainSizer->Fit( this ); // Connect Events - this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnInitDlg ) ); - this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnUpdateUI ) ); - m_fieldsGrid->Connect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnGridEditorShown ), NULL, this ); - m_fieldsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnSizeGrid ), NULL, this ); - m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnAddField ), NULL, this ); - m_bpMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnMoveUp ), NULL, this ); - m_bpMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnMoveDown ), NULL, this ); - m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnDeleteField ), NULL, this ); - m_updateSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnUpdateSymbol ), NULL, this ); - m_changeSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnExchangeSymbol ), NULL, this ); - m_editSchematicSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditSymbol ), NULL, this ); - m_editLibrarySymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditLibrarySymbol ), NULL, this ); - m_pinGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnPinTableCellEdited ), NULL, this ); - m_spiceFieldsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditSpiceModel ), NULL, this ); - m_stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnCancelButtonClick ), NULL, this ); + this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnInitDlg ) ); + this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnUpdateUI ) ); + m_fieldsGrid->Connect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnGridEditorShown ), NULL, this ); + m_fieldsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnSizeGrid ), NULL, this ); + m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnAddField ), NULL, this ); + m_bpMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnMoveUp ), NULL, this ); + m_bpMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnMoveDown ), NULL, this ); + m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnDeleteField ), NULL, this ); + m_updateSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnUpdateSymbol ), NULL, this ); + m_changeSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnExchangeSymbol ), NULL, this ); + m_editSchematicSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditSymbol ), NULL, this ); + m_editLibrarySymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditLibrarySymbol ), NULL, this ); + m_pinGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnPinTableCellEdited ), NULL, this ); + m_spiceFieldsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditSpiceModel ), NULL, this ); + m_stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this ); } -DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE() +DIALOG_SYMBOL_PROPERTIES_BASE::~DIALOG_SYMBOL_PROPERTIES_BASE() { // Disconnect Events - this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnInitDlg ) ); - this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnUpdateUI ) ); - m_fieldsGrid->Disconnect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnGridEditorShown ), NULL, this ); - m_fieldsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnSizeGrid ), NULL, this ); - m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnAddField ), NULL, this ); - m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnMoveUp ), NULL, this ); - m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnMoveDown ), NULL, this ); - m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnDeleteField ), NULL, this ); - m_updateSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnUpdateSymbol ), NULL, this ); - m_changeSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnExchangeSymbol ), NULL, this ); - m_editSchematicSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditSymbol ), NULL, this ); - m_editLibrarySymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditLibrarySymbol ), NULL, this ); - m_pinGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnPinTableCellEdited ), NULL, this ); - m_spiceFieldsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditSpiceModel ), NULL, this ); - m_stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnCancelButtonClick ), NULL, this ); + this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnInitDlg ) ); + this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnUpdateUI ) ); + m_fieldsGrid->Disconnect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnGridEditorShown ), NULL, this ); + m_fieldsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnSizeGrid ), NULL, this ); + m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnAddField ), NULL, this ); + m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnMoveUp ), NULL, this ); + m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnMoveDown ), NULL, this ); + m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnDeleteField ), NULL, this ); + m_updateSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnUpdateSymbol ), NULL, this ); + m_changeSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnExchangeSymbol ), NULL, this ); + m_editSchematicSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditSymbol ), NULL, this ); + m_editLibrarySymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditLibrarySymbol ), NULL, this ); + m_pinGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnPinTableCellEdited ), NULL, this ); + m_spiceFieldsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnEditSpiceModel ), NULL, this ); + m_stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_PROPERTIES_BASE::OnCancelButtonClick ), NULL, this ); } diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_base.fbp b/eeschema/dialogs/dialog_symbol_properties_base.fbp similarity index 99% rename from eeschema/dialogs/dialog_edit_component_in_schematic_base.fbp rename to eeschema/dialogs/dialog_symbol_properties_base.fbp index 46bc251df5..8edca13ec4 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_base.fbp +++ b/eeschema/dialogs/dialog_symbol_properties_base.fbp @@ -11,7 +11,7 @@ res ANSI connect - dialog_edit_component_in_schematic_base + dialog_symbol_properties_base 1000 none @@ -43,7 +43,7 @@ wxID_ANY - DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE + DIALOG_SYMBOL_PROPERTIES_BASE -1,-1 wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_base.h b/eeschema/dialogs/dialog_symbol_properties_base.h similarity index 86% rename from eeschema/dialogs/dialog_edit_component_in_schematic_base.h rename to eeschema/dialogs/dialog_symbol_properties_base.h index 8746a9cdb6..3cfa2fd6cd 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_base.h +++ b/eeschema/dialogs/dialog_symbol_properties_base.h @@ -39,9 +39,9 @@ class WX_GRID; /////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE +/// Class DIALOG_SYMBOL_PROPERTIES_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE : public DIALOG_SHIM +class DIALOG_SYMBOL_PROPERTIES_BASE : public DIALOG_SHIM { private: @@ -97,8 +97,8 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE : public DIALOG_SHIM public: - DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Symbol Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); - ~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE(); + DIALOG_SYMBOL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Symbol Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); + ~DIALOG_SYMBOL_PROPERTIES_BASE(); }; diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index ee0a6a7b91..ac6f5a69d0 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include #include @@ -1375,7 +1375,7 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent ) case SCH_COMPONENT_T: { SCH_COMPONENT* component = (SCH_COMPONENT*) item; - DIALOG_EDIT_COMPONENT_IN_SCHEMATIC symbolPropsDialog( m_frame, component ); + DIALOG_SYMBOL_PROPERTIES symbolPropsDialog( m_frame, component ); // This dialog itself subsequently can invoke a KIWAY_PLAYER as a quasimodal // frame. Therefore this dialog as a modal frame parent, MUST be run under