diff --git a/common/wildcards_and_files_ext.cpp b/common/wildcards_and_files_ext.cpp index 677d94a3f6..09f75ed2c0 100644 --- a/common/wildcards_and_files_ext.cpp +++ b/common/wildcards_and_files_ext.cpp @@ -133,7 +133,7 @@ const std::string ProjectLocalSettingsFileExtension( "kicad_prl" ); const std::string LegacySchematicFileExtension( "sch" ); const std::string KiCadSchematicFileExtension( "kicad_sch" ); const std::string NetlistFileExtension( "net" ); -const std::string ComponentFileExtension( "cmp" ); +const std::string FootprintAssignmentFileExtension( "cmp" ); const std::string GerberFileExtension( "gbr" ); const std::string GerberJobFileExtension( "gbrjob" ); const std::string HtmlFileExtension( "html" ); @@ -360,7 +360,7 @@ wxString DrawingSheetFileWildcard() // Wildcard for cvpcb symbol to footprint link file -wxString ComponentFileWildcard() +wxString FootprintAssignmentFileWildcard() { return _( "KiCad symbol footprint link files" ) + AddFileExtListToFilter( { "cmp" } ); } diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 4783acd81a..6cbf52a980 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -58,8 +58,8 @@ set( EESCHEMA_DLGS dialogs/dialog_choose_symbol.cpp dialogs/dialog_lib_symbol_properties.cpp dialogs/dialog_lib_symbol_properties_base.cpp - dialogs/dialog_edit_components_libid.cpp - dialogs/dialog_edit_components_libid_base.cpp + dialogs/dialog_edit_symbols_libid.cpp + dialogs/dialog_edit_symbols_libid_base.cpp dialogs/dialog_edit_label.cpp dialogs/dialog_edit_label_base.cpp dialogs/dialog_edit_line_style.cpp @@ -79,8 +79,8 @@ set( EESCHEMA_DLGS dialogs/dialog_lib_edit_pin_table_base.cpp dialogs/dialog_lib_edit_text.cpp dialogs/dialog_lib_edit_text_base.cpp - dialogs/dialog_lib_new_component.cpp - dialogs/dialog_lib_new_component_base.cpp + dialogs/dialog_lib_new_symbol.cpp + dialogs/dialog_lib_new_symbol_base.cpp dialogs/dialog_migrate_buses.cpp dialogs/dialog_migrate_buses_base.cpp dialogs/dialog_netlist.cpp diff --git a/eeschema/class_library.cpp b/eeschema/class_library.cpp index dbecba8a30..b94992af79 100644 --- a/eeschema/class_library.cpp +++ b/eeschema/class_library.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2004-2016 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2008 Wayne Stambaugh - * Copyright (C) 2004-2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2004-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -51,10 +51,11 @@ #define DUPLICATE_NAME_MSG \ _( "Library \"%s\" has duplicate entry name \"%s\".\n" \ - "This may cause some unexpected behavior when loading components into a schematic." ) + "This may cause some unexpected behavior when loading symbols into a schematic." ) -PART_LIB::PART_LIB( SCH_LIB_TYPE aType, const wxString& aFileName, SCH_IO_MGR::SCH_FILE_T aPluginType ) : +PART_LIB::PART_LIB( SCH_LIB_TYPE aType, const wxString& aFileName, + SCH_IO_MGR::SCH_FILE_T aPluginType ) : // start @ != 0 so each additional library added // is immediately detectable, zero would not be. m_mod_hash( PART_LIBS::GetModifyGeneration() ), diff --git a/eeschema/class_library.h b/eeschema/class_library.h index cfee27e11f..9b5a0275a8 100644 --- a/eeschema/class_library.h +++ b/eeschema/class_library.h @@ -300,9 +300,9 @@ public: * * Helper function used in dialog to find all candidates. * During a long time, eeschema was using a case insensitive search. - * Therefore, for old schematics (<= 2013), or libs, for some components, + * Therefore, for old schematics (<= 2013), or libs, for some symbols, * the chip name (name of alias in lib) can be broken. - * This function can be used to display a list of candidates, in component properties dialog. + * This function can be used to display a list of candidates, in symbol properties dialog. * * @param aEntryName - Name of entries to search for (case insensitive). * @param aLibraryName - Name of the library to search. diff --git a/eeschema/cmp_library_lexer.cpp b/eeschema/cmp_library_lexer.cpp index 750bbaf64f..dc03808c85 100644 --- a/eeschema/cmp_library_lexer.cpp +++ b/eeschema/cmp_library_lexer.cpp @@ -1,5 +1,5 @@ /* - * Do not delete this file. It will eventually become the new component + * Do not delete this file. It will eventually become the new symbol * library file DSN lexer which will replace the current library and library * document file formats. */ diff --git a/eeschema/component_references_lister.cpp b/eeschema/component_references_lister.cpp index a3c42b26ad..2961ced5f9 100644 --- a/eeschema/component_references_lister.cpp +++ b/eeschema/component_references_lister.cpp @@ -198,7 +198,8 @@ int SCH_REFERENCE_LIST::FindRef( const wxString& aRef ) const } -void SCH_REFERENCE_LIST::GetRefsInUse( int aIndex, std::vector< int >& aIdList, int aMinRefId ) const +void SCH_REFERENCE_LIST::GetRefsInUse( int aIndex, std::vector< int >& aIdList, + int aMinRefId ) const { aIdList.clear(); @@ -333,6 +334,7 @@ void SCH_REFERENCE_LIST::ReannotateDuplicates( const SCH_REFERENCE_LIST& aAdditi Annotate( false, 0, 0, lockedSymbols, aAdditionalReferences, true ); } + void SCH_REFERENCE_LIST::Annotate( bool aUseSheetNum, int aSheetIntervalId, int aStartNumber, SCH_MULTI_UNIT_REFERENCE_MAP aLockedUnitMap, const SCH_REFERENCE_LIST& aAdditionalRefs, bool aStartAtCurrent ) @@ -572,6 +574,7 @@ void SCH_REFERENCE_LIST::Annotate( bool aUseSheetNum, int aSheetIntervalId, int wxASSERT( originalSize == GetCount() ); // Make sure we didn't make a mistake } + int SCH_REFERENCE_LIST::CheckAnnotation( ANNOTATION_ERROR_HANDLER aHandler ) { int error = 0; @@ -596,7 +599,6 @@ int SCH_REFERENCE_LIST::CheckAnnotation( ANNOTATION_ERROR_HANDLER aHandler ) else tmp = wxT( "?" ); - if( ( flatList[ii].m_unit > 0 ) && ( flatList[ii].m_unit < 0x7FFFFFFF ) ) { msg.Printf( _( "Item not annotated: %s%s (unit %d)\n" ), diff --git a/eeschema/connection_graph.h b/eeschema/connection_graph.h index a7debd9de9..f8ac81e5eb 100644 --- a/eeschema/connection_graph.h +++ b/eeschema/connection_graph.h @@ -126,10 +126,10 @@ public: void UpdateItemConnections(); /** - * Returns the priority (higher is more important) of a candidate driver + * Return the priority (higher is more important) of a candidate driver * * 0: Invalid driver - * 1: Component pin + * 1: Symbol pin * 2: Hierarchical sheet pin * 3: Hierarchical label * 4: Local label diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 590216d106..1b4604f43a 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -45,7 +45,7 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindSymbolAndItem( const wxString& aReference, SCH_SEARCH_T aSearchType, const wxString& aSearchText ) { - SCH_SHEET_PATH* sheetWithComponentFound = nullptr; + SCH_SHEET_PATH* sheetWithSymbolFound = nullptr; SCH_SYMBOL* symbol = nullptr; wxPoint pos; SCH_PIN* pin = nullptr; @@ -68,7 +68,7 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindSymbolAndItem( const wxString& aReference, if( aReference.CmpNoCase( candidate->GetRef( &sheet ) ) == 0 ) { symbol = candidate; - sheetWithComponentFound = &sheet; + sheetWithSymbolFound = &sheet; if( aSearchType == HIGHLIGHT_PIN ) { @@ -111,9 +111,9 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindSymbolAndItem( const wxString& aReference, if( symbol ) { - if( *sheetWithComponentFound != m_frame->GetCurrentSheet() ) + if( *sheetWithSymbolFound != m_frame->GetCurrentSheet() ) { - m_frame->Schematic().SetCurrentSheet( *sheetWithComponentFound ); + m_frame->Schematic().SetCurrentSheet( *sheetWithSymbolFound ); m_frame->DisplayCurrentSheet(); } @@ -126,7 +126,7 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindSymbolAndItem( const wxString& aReference, { //#define COMP_1_TO_1_RATIO // Un-comment for normal KiCad full screen zoom cross-probe #ifdef COMP_1_TO_1_RATIO - // Pass "false" to only include visible fields of component in bbox calculations + // Pass "false" to only include visible fields of symbol in bbox calculations EDA_RECT bbox = symbol->GetBoundingBox( false ); wxSize bbSize = bbox.Inflate( bbox.GetWidth() * 0.2f ).GetSize(); VECTOR2D screenSize = getView()->GetViewport().GetSize(); @@ -144,13 +144,13 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindSymbolAndItem( const wxString& aReference, #endif // COMP_1_TO_1_RATIO #ifndef COMP_1_TO_1_RATIO // Do the scaled zoom - // Pass "false" to only include visible fields of component in bbox calculations + // Pass "false" to only include visible fields of symbol in bbox calculations. EDA_RECT bbox = symbol->GetBoundingBox( false ); wxSize bbSize = bbox.Inflate( bbox.GetWidth() * 0.2f ).GetSize(); VECTOR2D screenSize = getView()->GetViewport().GetSize(); // This code tries to come up with a zoom factor that doesn't simply zoom in - // to the cross probed component, but instead shows a reasonable amount of the + // to the cross probed symbol, but instead shows a reasonable amount of the // circuit around it to provide context. This reduces or eliminates the need // to manually change the zoom because it's too close. @@ -158,11 +158,11 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindSymbolAndItem( const wxString& aReference, // height of the bounding box of visible items for a footprint to figure out // if this is a big symbol (like a processor) or a small symbol (like a resistor). // This ratio is not useful by itself as a scaling factor. It must be "bent" to - // provide good scaling at varying component sizes. Bigger components need less + // provide good scaling at varying symbol sizes. Bigger symbols need less // scaling than small ones. double currTextHeight = Mils2iu( DEFAULT_TEXT_SIZE ); - double compRatio = bbSize.y / currTextHeight; // Ratio of component to text height + double compRatio = bbSize.y / currTextHeight; // Ratio of symbol to text height double compRatioBent = 1.0; // LUT to scale zoom ratio to provide reasonable schematic context. Must work @@ -185,8 +185,8 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindSymbolAndItem( const wxString& aReference, std::vector>::iterator it; - compRatioBent = - lut.back().second; // Large component default is last LUT entry (1:1) + // Large symbol default is last LUT entry (1:1). + compRatioBent = lut.back().second; // Use LUT to do linear interpolation of "compRatio" within "first", then // use that result to linearly interpolate "second" which gives the scaling @@ -209,15 +209,15 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindSymbolAndItem( const wxString& aReference, } else { - compRatioBent = lut.front().second; // Small component default is first entry + compRatioBent = lut.front().second; // Small symbol default is first entry } // This is similar to the original KiCad code that scaled the zoom to make sure - // components were visible on screen. It's simply a ratio of screen size to - // component size, and its job is to zoom in to make the component fullscreen. - // Earlier in the code the component BBox is given a 20% margin to add some - // breathing room. We compare the height of this enlarged component bbox to the - // default text height. If a component will end up with the sides clipped, we + // symbols were visible on screen. It's simply a ratio of screen size to + // symbol size, and its job is to zoom in to make the component fullscreen. + // Earlier in the code the symbol BBox is given a 20% margin to add some + // breathing room. We compare the height of this enlarged symbol bbox to the + // default text height. If a symbol will end up with the sides clipped, we // adjust later to make sure it fits on screen. screenSize.x = std::max( 10.0, screenSize.x ); screenSize.y = std::max( 10.0, screenSize.y ); @@ -347,9 +347,9 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline ) /* look for a complement */ idcmd = strtok( nullptr, " \n\r" ); - if( idcmd == nullptr ) // Highlight component only (from CvPcb or Pcbnew) + if( idcmd == nullptr ) // Highlight symbol only (from CvPcb or Pcbnew) { - // Highlight component part_ref, or clear Highlight, if part_ref is not existing + // Highlight symbol part_ref, or clear Highlight, if part_ref is not existing editor->FindSymbolAndItem( part_ref, true, HIGHLIGHT_SYMBOL, wxEmptyString ); return; } @@ -388,7 +388,7 @@ std::string FormatProbeItem( EDA_ITEM* aItem, SCH_SYMBOL* aSymbol ) { // This is a keyword followed by a quoted string. - // Cross probing to Pcbnew if a pin or a component is found + // Cross probing to Pcbnew if a pin or a symbol is found. switch( aItem->Type() ) { case SCH_FIELD_T: diff --git a/eeschema/dialogs/dialog_annotate_base.cpp b/eeschema/dialogs/dialog_annotate_base.cpp index 166cd6a3bc..c04744b293 100644 --- a/eeschema/dialogs/dialog_annotate_base.cpp +++ b/eeschema/dialogs/dialog_annotate_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -48,7 +48,7 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con wxBoxSizer* bSizerXpos; bSizerXpos = new wxBoxSizer( wxHORIZONTAL ); - m_rbSortBy_X_Position = new wxRadioButton( sbSizer1->GetStaticBox(), ID_SORT_BY_X_POSITION, _("Sort components by &X position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_rbSortBy_X_Position = new wxRadioButton( sbSizer1->GetStaticBox(), ID_SORT_BY_X_POSITION, _("Sort symbols by &X position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxALIGN_CENTER_VERTICAL, 3 ); @@ -66,7 +66,7 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con wxBoxSizer* bSizerYpos; bSizerYpos = new wxBoxSizer( wxHORIZONTAL ); - m_rbSortBy_Y_Position = new wxRadioButton( sbSizer1->GetStaticBox(), ID_SORT_BY_Y_POSITION, _("Sort components by &Y position"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rbSortBy_Y_Position = new wxRadioButton( sbSizer1->GetStaticBox(), ID_SORT_BY_Y_POSITION, _("Sort symbols by &Y position"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxALIGN_CENTER_VERTICAL, 3 ); diff --git a/eeschema/dialogs/dialog_annotate_base.fbp b/eeschema/dialogs/dialog_annotate_base.fbp index c75c2b6bd7..1a8a1f67aa 100644 --- a/eeschema/dialogs/dialog_annotate_base.fbp +++ b/eeschema/dialogs/dialog_annotate_base.fbp @@ -14,6 +14,7 @@ dialog_annotate_base 1000 none + 1 dialog_annotate_base @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -264,7 +266,7 @@ 0 0 ID_SORT_BY_X_POSITION - Sort components by &X position + Sort symbols by &X position 0 @@ -418,7 +420,7 @@ 0 0 ID_SORT_BY_Y_POSITION - Sort components by &Y position + Sort symbols by &Y position 0 @@ -976,6 +978,7 @@ + 0 diff --git a/eeschema/dialogs/dialog_annotate_base.h b/eeschema/dialogs/dialog_annotate_base.h index 4802f1bbfa..4827f3d143 100644 --- a/eeschema/dialogs/dialog_annotate_base.h +++ b/eeschema/dialogs/dialog_annotate_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! diff --git a/eeschema/dialogs/dialog_choose_symbol.h b/eeschema/dialogs/dialog_choose_symbol.h index 8c97d3792f..3b200e7b0c 100644 --- a/eeschema/dialogs/dialog_choose_symbol.h +++ b/eeschema/dialogs/dialog_choose_symbol.h @@ -113,7 +113,7 @@ public: /** * To be called after this dialog returns from ShowModal(). * - * For multi-unit symbols, if the user selects the component itself rather than picking + * For multi-unit symbols, if the user selects the symbol itself rather than picking * an individual unit, 0 will be returned in aUnit. * Beware that this is an invalid unit number - this should be replaced with whatever * default is desired (usually 1). diff --git a/eeschema/dialogs/dialog_edit_one_field.cpp b/eeschema/dialogs/dialog_edit_one_field.cpp index dd152ee194..eb46055457 100644 --- a/eeschema/dialogs/dialog_edit_one_field.cpp +++ b/eeschema/dialogs/dialog_edit_one_field.cpp @@ -114,7 +114,7 @@ void DIALOG_EDIT_ONE_FIELD::init() m_TextValueSelectButton->SetBitmap( KiBitmap( BITMAPS::small_library ) ); m_TextValueSelectButton->Show( m_fieldId == FOOTPRINT_FIELD ); - // Value fields of power components cannot be modified. This will grey out + // Value fields of power symbols cannot be modified. This will grey out // the text box and display an explanation. if( m_fieldId == VALUE_FIELD && m_isPower ) { @@ -278,7 +278,7 @@ DIALOG_LIB_EDIT_ONE_FIELD::DIALOG_LIB_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent, { m_fieldId = aField->GetId(); - // When in the library editor, power components can be renamed. + // When in the library editor, power symbols can be renamed. m_isPower = false; init(); } @@ -460,7 +460,7 @@ void DIALOG_SCH_EDIT_ONE_FIELD::UpdateField( SCH_FIELD* aField, SCH_SHEET_PATH* updateText( aField ); // The value, footprint and datasheet fields should be kept in sync in multi-unit parts. - // Of course the component must be annotated to collect other units. + // Of course the symbol must be annotated to collect other units. if( editFrame && parent && parent->Type() == SCH_SYMBOL_T ) { SCH_SYMBOL* symbol = static_cast( parent ); diff --git a/eeschema/dialogs/dialog_edit_components_libid.cpp b/eeschema/dialogs/dialog_edit_symbols_libid.cpp similarity index 84% rename from eeschema/dialogs/dialog_edit_components_libid.cpp rename to eeschema/dialogs/dialog_edit_symbols_libid.cpp index 5f9eca9afb..1a874dd46b 100644 --- a/eeschema/dialogs/dialog_edit_components_libid.cpp +++ b/eeschema/dialogs/dialog_edit_symbols_libid.cpp @@ -23,8 +23,8 @@ */ /** - * @file eeschema/dialogs/dialog_edit_components_libid.cpp - * @brief Dialog to remap library id of components to another library id + * @file eeschema/dialogs/dialog_edit_symbols_libid.cpp + * @brief Dialog to remap library id of symbols to another library id */ @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include @@ -270,24 +270,24 @@ public: int m_Row; // the row index in m_grid SCH_SCREEN* m_Screen; // the screen where m_Symbol lives wxString m_Reference; // the schematic reference, only to display it in list - wxString m_InitialLibId; // the Lib Id of the component before any change - bool m_IsOrphan; // true if a component has no corresponding symbol found in libs + wxString m_InitialLibId; // the Lib Id of the symbol before any change. + bool m_IsOrphan; // true if a symbol has no corresponding symbol found in libs. }; /** - * Dialog to globally edit the #LIB_ID of groups if components having the same initial LIB_ID. + * Dialog to globally edit the #LIB_ID of groups if symbols having the same initial LIB_ID. * * This is useful when you want to: * * move a symbol from a symbol library to another symbol library. * * change the nickname of a library. - * * globally replace the symbol used by a group of components by another symbol. + * * globally replace the symbol used by a group of symbols by another symbol. */ -class DIALOG_EDIT_COMPONENTS_LIBID : public DIALOG_EDIT_COMPONENTS_LIBID_BASE +class DIALOG_EDIT_SYMBOLS_LIBID : public DIALOG_EDIT_SYMBOLS_LIBID_BASE { public: - DIALOG_EDIT_COMPONENTS_LIBID( SCH_EDIT_FRAME* aParent ); - ~DIALOG_EDIT_COMPONENTS_LIBID() override; + DIALOG_EDIT_SYMBOLS_LIBID( SCH_EDIT_FRAME* aParent ); + ~DIALOG_EDIT_SYMBOLS_LIBID() override; SCH_EDIT_FRAME* GetParent(); @@ -350,8 +350,8 @@ private: }; -DIALOG_EDIT_COMPONENTS_LIBID::DIALOG_EDIT_COMPONENTS_LIBID( SCH_EDIT_FRAME* aParent ) - :DIALOG_EDIT_COMPONENTS_LIBID_BASE( aParent ) +DIALOG_EDIT_SYMBOLS_LIBID::DIALOG_EDIT_SYMBOLS_LIBID( SCH_EDIT_FRAME* aParent ) + :DIALOG_EDIT_SYMBOLS_LIBID_BASE( aParent ) { m_autoWrapRenderer = new GRIDCELL_AUTOWRAP_STRINGRENDERER; @@ -363,7 +363,7 @@ DIALOG_EDIT_COMPONENTS_LIBID::DIALOG_EDIT_COMPONENTS_LIBID( SCH_EDIT_FRAME* aPar } -DIALOG_EDIT_COMPONENTS_LIBID::~DIALOG_EDIT_COMPONENTS_LIBID() +DIALOG_EDIT_SYMBOLS_LIBID::~DIALOG_EDIT_SYMBOLS_LIBID() { // Delete the GRID_TRICKS. m_grid->PopEventHandler( true ); @@ -372,34 +372,34 @@ DIALOG_EDIT_COMPONENTS_LIBID::~DIALOG_EDIT_COMPONENTS_LIBID() } -// A sort compare function to sort components list by LIB_ID and then reference -static bool sort_by_libid( const SYM_CANDIDATE& cmp1, const SYM_CANDIDATE& cmp2 ) +// A sort compare function to sort symbols list by LIB_ID and then reference. +static bool sort_by_libid( const SYM_CANDIDATE& candidate1, const SYM_CANDIDATE& candidate2 ) { - if( cmp1.m_Symbol->GetLibId() == cmp2.m_Symbol->GetLibId() ) - return cmp1.m_Reference.Cmp( cmp2.m_Reference ) < 0; + if( candidate1.m_Symbol->GetLibId() == candidate2.m_Symbol->GetLibId() ) + return candidate1.m_Reference.Cmp( candidate2.m_Reference ) < 0; - return cmp1.m_Symbol->GetLibId() < cmp2.m_Symbol->GetLibId(); + return candidate1.m_Symbol->GetLibId() < candidate2.m_Symbol->GetLibId(); } -void DIALOG_EDIT_COMPONENTS_LIBID::initDlg() +void DIALOG_EDIT_SYMBOLS_LIBID::initDlg() { // Clear the FormBuilder rows m_grid->DeleteRows( 0, m_grid->GetNumberRows() ); m_isModified = false; - // This option build the full component list - // In complex hierarchies, the same component is in fact duplicated, but + // This option build the full symbol list. + // In complex hierarchies, the same symbol is in fact duplicated, but // it is listed with different references (one by sheet instance) - // the list is larger and looks like it contains all components + // the list is larger and looks like it contains all symbols. const SCH_SHEET_LIST& sheets = GetParent()->Schematic().GetSheets(); SCH_REFERENCE_LIST references; - // build the full list of components including component having no symbol in loaded libs - // (orphan components) + // build the full list of symbols including symbol having no symbol in loaded libs + // (orphan symbols) sheets.GetSymbols( references, /* include power symbols */ true, - /* include orphan components */ true ); + /* include orphan symbols */ true ); for( unsigned ii = 0; ii < references.GetCount(); ii++ ) { @@ -426,9 +426,9 @@ void DIALOG_EDIT_COMPONENTS_LIBID::initDlg() wxString last_ref; bool mark_cell = m_symbols.front().m_IsOrphan; - for( auto& cmp : m_symbols ) + for( auto& symbol : m_symbols ) { - wxString str_libid = cmp.GetStringLibId(); + wxString str_libid = symbol.GetStringLibId(); if( last_str_libid != str_libid ) { @@ -436,27 +436,27 @@ void DIALOG_EDIT_COMPONENTS_LIBID::initDlg() AddRowToGrid( mark_cell, refs, last_str_libid ); // prepare next entry - mark_cell = cmp.m_IsOrphan; + mark_cell = symbol.m_IsOrphan; last_str_libid = str_libid; refs.Empty(); row++; } - else if( cmp.GetSchematicReference() == last_ref ) + else if( symbol.GetSchematicReference() == last_ref ) { - cmp.m_Row = row; + symbol.m_Row = row; continue; } - last_ref = cmp.GetSchematicReference(); + last_ref = symbol.GetSchematicReference(); if( !refs.IsEmpty() ) refs += wxT( ", " ); - refs += cmp.GetSchematicReference(); - cmp.m_Row = row; + refs += symbol.GetSchematicReference(); + symbol.m_Row = row; } - // Add last component group: + // Add last symbol group: AddRowToGrid( mark_cell, refs, last_str_libid ); // Allows only the selection by row @@ -467,18 +467,18 @@ void DIALOG_EDIT_COMPONENTS_LIBID::initDlg() } -SCH_EDIT_FRAME* DIALOG_EDIT_COMPONENTS_LIBID::GetParent() +SCH_EDIT_FRAME* DIALOG_EDIT_SYMBOLS_LIBID::GetParent() { return dynamic_cast( wxDialog::GetParent() ); } -void DIALOG_EDIT_COMPONENTS_LIBID::AddRowToGrid( bool aMarkRow, const wxString& aReferences, +void DIALOG_EDIT_SYMBOLS_LIBID::AddRowToGrid( bool aMarkRow, const wxString& aReferences, const wxString& aStrLibId ) { int row = m_grid->GetNumberRows(); - if( aMarkRow ) // a orphan component exists, set m_AsOrphanCmp as true + if( aMarkRow ) // An orphaned symbol exists, set m_AsOrphanCmp as true. m_OrphansRowIndexes.push_back( row ); m_grid->AppendRows( 1 ); @@ -511,7 +511,7 @@ void DIALOG_EDIT_COMPONENTS_LIBID::AddRowToGrid( bool aMarkRow, const wxString& } -bool DIALOG_EDIT_COMPONENTS_LIBID::validateLibIds() +bool DIALOG_EDIT_SYMBOLS_LIBID::validateLibIds() { if( !m_grid->CommitPendingChanges() ) return false; @@ -550,7 +550,7 @@ bool DIALOG_EDIT_COMPONENTS_LIBID::validateLibIds() } -void DIALOG_EDIT_COMPONENTS_LIBID::onCellBrowseLib( wxGridEvent& event ) +void DIALOG_EDIT_SYMBOLS_LIBID::onCellBrowseLib( wxGridEvent& event ) { int row = event.GetRow(); m_grid->SelectRow( row ); // only for user, to show the selected line @@ -560,7 +560,7 @@ void DIALOG_EDIT_COMPONENTS_LIBID::onCellBrowseLib( wxGridEvent& event ) } -void DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton( wxCommandEvent& event ) +void DIALOG_EDIT_SYMBOLS_LIBID::onClickOrphansButton( wxCommandEvent& event ) { std::vector< wxString > libs = Prj().SchSymbolLibTable()->GetLogicalLibs(); wxArrayString aliasNames; @@ -641,7 +641,7 @@ void DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton( wxCommandEvent& event ) } } - if( fixesCount < m_OrphansRowIndexes.size() ) // Not all orphan components are fixed + if( fixesCount < m_OrphansRowIndexes.size() ) // Not all orphan symbols are fixed. { wxMessageBox( wxString::Format( _( "%u link(s) mapped, %u not found" ), fixesCount, @@ -652,7 +652,7 @@ void DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton( wxCommandEvent& event ) } -bool DIALOG_EDIT_COMPONENTS_LIBID::setLibIdByBrowser( int aRow ) +bool DIALOG_EDIT_SYMBOLS_LIBID::setLibIdByBrowser( int aRow ) { #if 0 // Use dialog symbol selector to choose a symbol @@ -691,7 +691,7 @@ bool DIALOG_EDIT_COMPONENTS_LIBID::setLibIdByBrowser( int aRow ) } -bool DIALOG_EDIT_COMPONENTS_LIBID::TransferDataFromWindow() +bool DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow() { if( !validateLibIds() ) return false; @@ -709,9 +709,9 @@ bool DIALOG_EDIT_COMPONENTS_LIBID::TransferDataFromWindow() LIB_ID id; id.Parse( new_libid, true ); - for( SYM_CANDIDATE& cmp : m_symbols ) + for( SYM_CANDIDATE& candidate : m_symbols ) { - if( cmp.m_Row != row ) + if( candidate.m_Row != row ) continue; LIB_SYMBOL* symbol = nullptr; @@ -735,30 +735,30 @@ bool DIALOG_EDIT_COMPONENTS_LIBID::TransferDataFromWindow() if( symbol == nullptr ) continue; - GetParent()->SaveCopyInUndoList( cmp.m_Screen, cmp.m_Symbol, UNDO_REDO::CHANGED, - m_isModified ); + GetParent()->SaveCopyInUndoList( candidate.m_Screen, candidate.m_Symbol, + UNDO_REDO::CHANGED, m_isModified ); m_isModified = true; - cmp.m_Screen->Remove( cmp.m_Symbol ); - SCH_FIELD* value = cmp.m_Symbol->GetField( VALUE_FIELD ); + candidate.m_Screen->Remove( candidate.m_Symbol ); + SCH_FIELD* value = candidate.m_Symbol->GetField( VALUE_FIELD ); // If value is a proxy for the itemName then make sure it gets updated - if( cmp.m_Symbol->GetLibId().GetLibItemName().wx_str() == value->GetText() ) - cmp.m_Symbol->SetValue( id.GetLibItemName().wx_str() ); + if( candidate.m_Symbol->GetLibId().GetLibItemName().wx_str() == value->GetText() ) + candidate.m_Symbol->SetValue( id.GetLibItemName().wx_str() ); - cmp.m_Symbol->SetLibId( id ); - cmp.m_Symbol->SetLibSymbol( symbol->Flatten().release() ); - cmp.m_Screen->Append( cmp.m_Symbol ); - cmp.m_Screen->SetContentModified(); + candidate.m_Symbol->SetLibId( id ); + candidate.m_Symbol->SetLibSymbol( symbol->Flatten().release() ); + candidate.m_Screen->Append( candidate.m_Symbol ); + candidate.m_Screen->SetContentModified(); if ( m_checkBoxUpdateFields->IsChecked() ) { - cmp.m_Symbol->UpdateFields( nullptr, - false, /* update style */ - false, /* update ref */ - false, /* update other fields */ - false, /* reset ref */ - true /* reset other fields */ ); + candidate.m_Symbol->UpdateFields( nullptr, + false, /* update style */ + false, /* update ref */ + false, /* update other fields */ + false, /* reset ref */ + true /* reset other fields */ ); } } } @@ -767,7 +767,7 @@ bool DIALOG_EDIT_COMPONENTS_LIBID::TransferDataFromWindow() } -void DIALOG_EDIT_COMPONENTS_LIBID::AdjustGridColumns( int aWidth ) +void DIALOG_EDIT_SYMBOLS_LIBID::AdjustGridColumns( int aWidth ) { // Account for scroll bars aWidth -= ( m_grid->GetSize().x - m_grid->GetClientSize().x ); @@ -802,7 +802,7 @@ void DIALOG_EDIT_COMPONENTS_LIBID::AdjustGridColumns( int aWidth ) } -void DIALOG_EDIT_COMPONENTS_LIBID::OnSizeGrid( wxSizeEvent& event ) +void DIALOG_EDIT_SYMBOLS_LIBID::OnSizeGrid( wxSizeEvent& event ) { AdjustGridColumns( event.GetSize().GetX() ); @@ -816,13 +816,13 @@ void DIALOG_EDIT_COMPONENTS_LIBID::OnSizeGrid( wxSizeEvent& event ) } -bool InvokeDialogEditComponentsLibId( SCH_EDIT_FRAME* aCaller ) +bool InvokeDialogEditSymbolsLibId( SCH_EDIT_FRAME* aCaller ) { // 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 // quasimodal mode for the quasimodal frame support to work. So don't use // the QUASIMODAL macros here. - DIALOG_EDIT_COMPONENTS_LIBID dlg( aCaller ); + DIALOG_EDIT_SYMBOLS_LIBID dlg( aCaller ); // DO NOT use ShowModal() here, otherwise the library browser will not work // properly. dlg.ShowQuasiModal(); diff --git a/eeschema/dialogs/dialog_edit_components_libid_base.cpp b/eeschema/dialogs/dialog_edit_symbols_libid_base.cpp similarity index 72% rename from eeschema/dialogs/dialog_edit_components_libid_base.cpp rename to eeschema/dialogs/dialog_edit_symbols_libid_base.cpp index ae8c101ca5..1cb1ad5d9b 100644 --- a/eeschema/dialogs/dialog_edit_components_libid_base.cpp +++ b/eeschema/dialogs/dialog_edit_symbols_libid_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -7,11 +7,11 @@ #include "widgets/wx_grid.h" -#include "dialog_edit_components_libid_base.h" +#include "dialog_edit_symbols_libid_base.h" /////////////////////////////////////////////////////////////////////////// -DIALOG_EDIT_COMPONENTS_LIBID_BASE::DIALOG_EDIT_COMPONENTS_LIBID_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_EDIT_SYMBOLS_LIBID_BASE::DIALOG_EDIT_SYMBOLS_LIBID_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 ); @@ -56,7 +56,7 @@ DIALOG_EDIT_COMPONENTS_LIBID_BASE::DIALOG_EDIT_COMPONENTS_LIBID_BASE( wxWindow* bSizerButtons = new wxBoxSizer( wxHORIZONTAL ); m_buttonOrphanItems = new wxButton( this, wxID_ANY, _("Map Orphans"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonOrphanItems->SetToolTip( _("If some components are orphan (the linked symbol is found nowhere),\ntry to find a candidate having the same name in one of loaded symbol libraries.") ); + m_buttonOrphanItems->SetToolTip( _("If some symbols are orphaned (the linked symbol is not found anywhere),\ntry to find a candidate having the same name in one of loaded symbol libraries.") ); bSizerButtons->Add( m_buttonOrphanItems, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -88,18 +88,18 @@ DIALOG_EDIT_COMPONENTS_LIBID_BASE::DIALOG_EDIT_COMPONENTS_LIBID_BASE( wxWindow* this->Centre( wxBOTH ); // Connect Events - m_grid->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( DIALOG_EDIT_COMPONENTS_LIBID_BASE::onCellBrowseLib ), NULL, this ); - m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENTS_LIBID_BASE::OnSizeGrid ), NULL, this ); - m_buttonOrphanItems->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENTS_LIBID_BASE::onClickOrphansButton ), NULL, this ); - m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENTS_LIBID_BASE::onCancel ), NULL, this ); + m_grid->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( DIALOG_EDIT_SYMBOLS_LIBID_BASE::onCellBrowseLib ), NULL, this ); + m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_SYMBOLS_LIBID_BASE::OnSizeGrid ), NULL, this ); + m_buttonOrphanItems->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_SYMBOLS_LIBID_BASE::onClickOrphansButton ), NULL, this ); + m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_SYMBOLS_LIBID_BASE::onCancel ), NULL, this ); } -DIALOG_EDIT_COMPONENTS_LIBID_BASE::~DIALOG_EDIT_COMPONENTS_LIBID_BASE() +DIALOG_EDIT_SYMBOLS_LIBID_BASE::~DIALOG_EDIT_SYMBOLS_LIBID_BASE() { // Disconnect Events - m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( DIALOG_EDIT_COMPONENTS_LIBID_BASE::onCellBrowseLib ), NULL, this ); - m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_COMPONENTS_LIBID_BASE::OnSizeGrid ), NULL, this ); - m_buttonOrphanItems->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENTS_LIBID_BASE::onClickOrphansButton ), NULL, this ); - m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENTS_LIBID_BASE::onCancel ), NULL, this ); + m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( DIALOG_EDIT_SYMBOLS_LIBID_BASE::onCellBrowseLib ), NULL, this ); + m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_EDIT_SYMBOLS_LIBID_BASE::OnSizeGrid ), NULL, this ); + m_buttonOrphanItems->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_SYMBOLS_LIBID_BASE::onClickOrphansButton ), NULL, this ); + m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_SYMBOLS_LIBID_BASE::onCancel ), NULL, this ); } diff --git a/eeschema/dialogs/dialog_edit_components_libid_base.fbp b/eeschema/dialogs/dialog_edit_symbols_libid_base.fbp similarity index 97% rename from eeschema/dialogs/dialog_edit_components_libid_base.fbp rename to eeschema/dialogs/dialog_edit_symbols_libid_base.fbp index ef5db984a7..6e922dd494 100644 --- a/eeschema/dialogs/dialog_edit_components_libid_base.fbp +++ b/eeschema/dialogs/dialog_edit_symbols_libid_base.fbp @@ -11,12 +11,13 @@ res UTF-8 connect - dialog_edit_components_libid_base + dialog_edit_symbols_libid_base 1000 none + 1 - dialog_edit_components_libid_base + dialog_edit_symbols_libid_base . @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -43,7 +45,7 @@ wxID_ANY - DIALOG_EDIT_COMPONENTS_LIBID_BASE + DIALOG_EDIT_SYMBOLS_LIBID_BASE -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER @@ -170,6 +172,7 @@ + 0 @@ -219,7 +222,7 @@ 0 - If some components are orphan (the linked symbol is found nowhere), try to find a candidate having the same name in one of loaded symbol libraries. + If some symbols are orphaned (the linked symbol is not found anywhere), try to find a candidate having the same name in one of loaded symbol libraries. wxFILTER_NONE wxDefaultValidator diff --git a/eeschema/dialogs/dialog_edit_components_libid_base.h b/eeschema/dialogs/dialog_edit_symbols_libid_base.h similarity index 75% rename from eeschema/dialogs/dialog_edit_components_libid_base.h rename to eeschema/dialogs/dialog_edit_symbols_libid_base.h index e592a240ea..c1823b25a3 100644 --- a/eeschema/dialogs/dialog_edit_components_libid_base.h +++ b/eeschema/dialogs/dialog_edit_symbols_libid_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -19,10 +19,10 @@ class WX_GRID; #include #include #include +#include #include #include #include -#include #include #include #include @@ -31,9 +31,9 @@ class WX_GRID; /////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_EDIT_COMPONENTS_LIBID_BASE +/// Class DIALOG_EDIT_SYMBOLS_LIBID_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_EDIT_COMPONENTS_LIBID_BASE : public DIALOG_SHIM +class DIALOG_EDIT_SYMBOLS_LIBID_BASE : public DIALOG_SHIM { private: @@ -54,8 +54,8 @@ class DIALOG_EDIT_COMPONENTS_LIBID_BASE : public DIALOG_SHIM public: - DIALOG_EDIT_COMPONENTS_LIBID_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Symbol Library References"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_EDIT_COMPONENTS_LIBID_BASE(); + DIALOG_EDIT_SYMBOLS_LIBID_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Symbol Library References"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_EDIT_SYMBOLS_LIBID_BASE(); }; diff --git a/eeschema/dialogs/dialog_lib_edit_draw_item_base.cpp b/eeschema/dialogs/dialog_lib_edit_draw_item_base.cpp index dcc7d6299e..c882960f4f 100644 --- a/eeschema/dialogs/dialog_lib_edit_draw_item_base.cpp +++ b/eeschema/dialogs/dialog_lib_edit_draw_item_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jul 11 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -12,61 +12,62 @@ DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_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 ); - + wxBoxSizer* mainSizer; mainSizer = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* dlgBorderSizer; dlgBorderSizer = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* bSizerLineWidth; bSizerLineWidth = new wxBoxSizer( wxHORIZONTAL ); - + m_widthLabel = new wxStaticText( this, wxID_ANY, _("Line width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_widthLabel->Wrap( -1 ); bSizerLineWidth->Add( m_widthLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - + m_widthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); bSizerLineWidth->Add( m_widthCtrl, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - + m_widthUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_widthUnits->Wrap( -1 ); bSizerLineWidth->Add( m_widthUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 ); - - + + dlgBorderSizer->Add( bSizerLineWidth, 0, wxEXPAND, 5 ); - + wxString m_fillCtrlChoices[] = { _("Do not fill"), _("Fill with body outline color"), _("Fill with body background color") }; int m_fillCtrlNChoices = sizeof( m_fillCtrlChoices ) / sizeof( wxString ); m_fillCtrl = new wxRadioBox( this, wxID_ANY, _("Fill Style"), wxDefaultPosition, wxDefaultSize, m_fillCtrlNChoices, m_fillCtrlChoices, 1, wxRA_SPECIFY_COLS ); m_fillCtrl->SetSelection( 0 ); dlgBorderSizer->Add( m_fillCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 ); - - m_checkApplyToAllUnits = new wxCheckBox( this, wxID_ANY, _("Common to all &units in component"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkApplyToAllUnits = new wxCheckBox( this, wxID_ANY, _("Common to all &units in symbol"), wxDefaultPosition, wxDefaultSize, 0 ); dlgBorderSizer->Add( m_checkApplyToAllUnits, 0, wxALL, 3 ); - + m_checkApplyToAllConversions = new wxCheckBox( this, wxID_ANY, _("Common to all body &styles (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 ); dlgBorderSizer->Add( m_checkApplyToAllConversions, 0, wxALL, 3 ); - - + + mainSizer->Add( dlgBorderSizer, 1, wxALL|wxEXPAND, 10 ); - + m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); mainSizer->Add( m_staticline, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - + m_sdbSizer = new wxStdDialogButtonSizer(); m_sdbSizerOK = new wxButton( this, wxID_OK ); m_sdbSizer->AddButton( m_sdbSizerOK ); m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); m_sdbSizer->AddButton( m_sdbSizerCancel ); m_sdbSizer->Realize(); - + mainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 ); - - + + this->SetSizer( mainSizer ); this->Layout(); - + mainSizer->Fit( this ); + this->Centre( wxBOTH ); } diff --git a/eeschema/dialogs/dialog_lib_edit_draw_item_base.fbp b/eeschema/dialogs/dialog_lib_edit_draw_item_base.fbp index b49c1c50da..3acb203af7 100644 --- a/eeschema/dialogs/dialog_lib_edit_draw_item_base.fbp +++ b/eeschema/dialogs/dialog_lib_edit_draw_item_base.fbp @@ -2,7 +2,7 @@ - + C++ 1 source_name @@ -14,96 +14,49 @@ dialog_lib_edit_draw_item_base 1000 none - + + 1 dialog_lib_edit_draw_item - + . - + 1 1 1 1 UI + 0 1 0 0 wxAUI_MGR_DEFAULT - + wxBOTH - + 1 1 impl_virtual - - - + + + 0 wxID_ANY - - + + DIALOG_LIB_EDIT_DRAW_ITEM_BASE - - 295,256 + + -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Drawing Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + mainSizer wxVERTICAL none @@ -112,7 +65,7 @@ wxALL|wxEXPAND 1 - + dlgBorderSizer wxVERTICAL none @@ -121,7 +74,7 @@ wxEXPAND 0 - + bSizerLineWidth wxHORIZONTAL none @@ -134,86 +87,56 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Line width: 0 - + 0 - - + + 0 - + 1 m_widthLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -225,93 +148,59 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_widthCtrl 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + @@ -323,86 +212,56 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY mm 0 - + 0 - - + + 0 - + 1 m_widthUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -416,92 +275,61 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "Do not fill" "Fill with body outline color" "Fill with body background color" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Fill Style 1 - + 0 - - + + 0 - + 1 m_fillCtrl 1 - - + + protected 1 - + Resizable 0 1 - + wxRA_SPECIFY_COLS ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -513,90 +341,59 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - Common to all &units in component - + Common to all &units in symbol + 0 - - + + 0 - + 1 m_checkApplyToAllUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -608,90 +405,59 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Common to all body &styles (DeMorgan) - + 0 - - + + 0 - + 1 m_checkApplyToAllConversions 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -705,83 +471,53 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_staticline 1 - - + + protected 1 - + Resizable 1 - + wxLI_HORIZONTAL ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -797,17 +533,9 @@ 1 0 0 - + m_sdbSizer protected - - - - - - - - diff --git a/eeschema/dialogs/dialog_lib_edit_draw_item_base.h b/eeschema/dialogs/dialog_lib_edit_draw_item_base.h index f6fdf42671..79952c5168 100644 --- a/eeschema/dialogs/dialog_lib_edit_draw_item_base.h +++ b/eeschema/dialogs/dialog_lib_edit_draw_item_base.h @@ -1,12 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jul 11 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __DIALOG_LIB_EDIT_DRAW_ITEM_BASE_H__ -#define __DIALOG_LIB_EDIT_DRAW_ITEM_BASE_H__ +#pragma once #include #include @@ -34,7 +33,7 @@ class DIALOG_LIB_EDIT_DRAW_ITEM_BASE : public DIALOG_SHIM { private: - + protected: wxStaticText* m_widthLabel; wxTextCtrl* m_widthCtrl; @@ -46,12 +45,11 @@ class DIALOG_LIB_EDIT_DRAW_ITEM_BASE : public DIALOG_SHIM wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; - + public: - - DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Drawing Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 295,256 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Drawing Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_LIB_EDIT_DRAW_ITEM_BASE(); - + }; -#endif //__DIALOG_LIB_EDIT_DRAW_ITEM_BASE_H__ diff --git a/eeschema/dialogs/dialog_lib_new_component.cpp b/eeschema/dialogs/dialog_lib_new_symbol.cpp similarity index 85% rename from eeschema/dialogs/dialog_lib_new_component.cpp rename to eeschema/dialogs/dialog_lib_new_symbol.cpp index b682361cae..d56ab30c94 100644 --- a/eeschema/dialogs/dialog_lib_new_component.cpp +++ b/eeschema/dialogs/dialog_lib_new_symbol.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2009 Wayne Stambaugh - * Copyright (C) 2016-2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2016-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,14 +23,14 @@ */ #include -#include +#include #include #include #include -DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT( EDA_DRAW_FRAME* aParent, - const wxArrayString* aRootSymbolNames ) : - DIALOG_LIB_NEW_COMPONENT_BASE( dynamic_cast( aParent ) ), +DIALOG_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL( EDA_DRAW_FRAME* aParent, + const wxArrayString* aRootSymbolNames ) : + DIALOG_LIB_NEW_SYMBOL_BASE( dynamic_cast( aParent ) ), m_pinTextPosition( aParent, m_staticPinTextPositionLabel, m_textPinTextPosition, m_staticPinTextPositionUnits, true ) { @@ -53,13 +53,13 @@ DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT( EDA_DRAW_FRAME* aParent, } -void DIALOG_LIB_NEW_COMPONENT::OnParentSymbolSelect( wxCommandEvent& aEvent ) +void DIALOG_LIB_NEW_SYMBOL::OnParentSymbolSelect( wxCommandEvent& aEvent ) { syncControls( !m_comboInheritanceSelect->GetValue().IsEmpty() ); } -void DIALOG_LIB_NEW_COMPONENT::syncControls( bool aIsDerivedPart ) +void DIALOG_LIB_NEW_SYMBOL::syncControls( bool aIsDerivedPart ) { m_staticTextDes->Enable( !aIsDerivedPart ); m_textReference->Enable( !aIsDerivedPart ); @@ -79,7 +79,7 @@ void DIALOG_LIB_NEW_COMPONENT::syncControls( bool aIsDerivedPart ) } -void DIALOG_LIB_NEW_COMPONENT::onPowerCheckBox( wxCommandEvent& aEvent ) +void DIALOG_LIB_NEW_SYMBOL::onPowerCheckBox( wxCommandEvent& aEvent ) { if( m_checkIsPowerSymbol->IsChecked() ) { diff --git a/eeschema/dialogs/dialog_lib_new_component.h b/eeschema/dialogs/dialog_lib_new_symbol.h similarity index 91% rename from eeschema/dialogs/dialog_lib_new_component.h rename to eeschema/dialogs/dialog_lib_new_symbol.h index 00005cc70e..c4cbe11828 100644 --- a/eeschema/dialogs/dialog_lib_new_component.h +++ b/eeschema/dialogs/dialog_lib_new_symbol.h @@ -22,21 +22,21 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __dialog_lib_new_component__ -#define __dialog_lib_new_component__ +#ifndef __dialog_lib_new_symbol__ +#define __dialog_lib_new_symbol__ #include -#include +#include class EDA_DRAW_FRAME; class wxArrayString; -class DIALOG_LIB_NEW_COMPONENT : public DIALOG_LIB_NEW_COMPONENT_BASE +class DIALOG_LIB_NEW_SYMBOL : public DIALOG_LIB_NEW_SYMBOL_BASE { public: - DIALOG_LIB_NEW_COMPONENT( EDA_DRAW_FRAME* parent, - const wxArrayString* aRootSymbolNames = nullptr ); + DIALOG_LIB_NEW_SYMBOL( EDA_DRAW_FRAME* parent, + const wxArrayString* aRootSymbolNames = nullptr ); void SetName( const wxString& name ) override { m_textName->SetValue( name ); } wxString GetName( void ) const override { return m_textName->GetValue(); } @@ -110,4 +110,4 @@ private: UNIT_BINDER m_pinTextPosition; }; -#endif // __dialog_lib_new_component__ +#endif // __dialog_lib_new_symbol__ diff --git a/eeschema/dialogs/dialog_lib_new_component_base.cpp b/eeschema/dialogs/dialog_lib_new_symbol_base.cpp similarity index 89% rename from eeschema/dialogs/dialog_lib_new_component_base.cpp rename to eeschema/dialogs/dialog_lib_new_symbol_base.cpp index 9f524df3c0..d25cfef4d8 100644 --- a/eeschema/dialogs/dialog_lib_new_component_base.cpp +++ b/eeschema/dialogs/dialog_lib_new_symbol_base.cpp @@ -1,20 +1,20 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "dialog_lib_new_component_base.h" +#include "dialog_lib_new_symbol_base.h" /////////////////////////////////////////////////////////////////////////// -BEGIN_EVENT_TABLE( DIALOG_LIB_NEW_COMPONENT_BASE, DIALOG_SHIM ) - EVT_COMBOBOX( wxID_ANY, DIALOG_LIB_NEW_COMPONENT_BASE::_wxFB_OnParentSymbolSelect ) - EVT_CHECKBOX( wxID_ANY, DIALOG_LIB_NEW_COMPONENT_BASE::_wxFB_onPowerCheckBox ) +BEGIN_EVENT_TABLE( DIALOG_LIB_NEW_SYMBOL_BASE, DIALOG_SHIM ) + EVT_COMBOBOX( wxID_ANY, DIALOG_LIB_NEW_SYMBOL_BASE::_wxFB_OnParentSymbolSelect ) + EVT_CHECKBOX( wxID_ANY, DIALOG_LIB_NEW_SYMBOL_BASE::_wxFB_onPowerCheckBox ) END_EVENT_TABLE() -DIALOG_LIB_NEW_COMPONENT_BASE::DIALOG_LIB_NEW_COMPONENT_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_LIB_NEW_SYMBOL_BASE::DIALOG_LIB_NEW_SYMBOL_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 ); @@ -32,7 +32,7 @@ DIALOG_LIB_NEW_COMPONENT_BASE::DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent, m_staticTextName = new wxStaticText( this, wxID_ANY, _("Symbol name:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextName->Wrap( -1 ); - m_staticTextName->SetToolTip( _("This is the symbol name in library,\nand also the default component value when loaded in the schematic.") ); + m_staticTextName->SetToolTip( _("The symbol name in library and also the default\nsymbol value when loaded in the schematic.") ); fgSizer31->Add( m_staticTextName, 0, wxALIGN_CENTER_VERTICAL, 5 ); @@ -152,6 +152,6 @@ DIALOG_LIB_NEW_COMPONENT_BASE::DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent, this->Centre( wxBOTH ); } -DIALOG_LIB_NEW_COMPONENT_BASE::~DIALOG_LIB_NEW_COMPONENT_BASE() +DIALOG_LIB_NEW_SYMBOL_BASE::~DIALOG_LIB_NEW_SYMBOL_BASE() { } diff --git a/eeschema/dialogs/dialog_lib_new_component_base.fbp b/eeschema/dialogs/dialog_lib_new_symbol_base.fbp similarity index 99% rename from eeschema/dialogs/dialog_lib_new_component_base.fbp rename to eeschema/dialogs/dialog_lib_new_symbol_base.fbp index 67daffe5b6..0ec3ee077b 100644 --- a/eeschema/dialogs/dialog_lib_new_component_base.fbp +++ b/eeschema/dialogs/dialog_lib_new_symbol_base.fbp @@ -11,13 +11,13 @@ res UTF-8 table - dialog_lib_new_component_base + dialog_lib_new_symbol_base 1000 none 1 - dialog_lib_new_component + dialog_lib_new_symbol_base . @@ -45,7 +45,7 @@ wxID_ANY - DIALOG_LIB_NEW_COMPONENT_BASE + DIALOG_LIB_NEW_SYMBOL_BASE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER @@ -139,7 +139,7 @@ 0 - This is the symbol name in library, and also the default component value when loaded in the schematic. + The symbol name in library and also the default symbol value when loaded in the schematic. diff --git a/eeschema/dialogs/dialog_lib_new_component_base.h b/eeschema/dialogs/dialog_lib_new_symbol_base.h similarity index 82% rename from eeschema/dialogs/dialog_lib_new_component_base.h rename to eeschema/dialogs/dialog_lib_new_symbol_base.h index 2f93512510..3bff5b974f 100644 --- a/eeschema/dialogs/dialog_lib_new_component_base.h +++ b/eeschema/dialogs/dialog_lib_new_symbol_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -28,9 +28,9 @@ /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_LIB_NEW_COMPONENT_BASE +/// Class DIALOG_LIB_NEW_SYMBOL_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_LIB_NEW_COMPONENT_BASE : public DIALOG_SHIM +class DIALOG_LIB_NEW_SYMBOL_BASE : public DIALOG_SHIM { DECLARE_EVENT_TABLE() private: @@ -71,8 +71,8 @@ class DIALOG_LIB_NEW_COMPONENT_BASE : public DIALOG_SHIM public: - DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("New Symbol"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_LIB_NEW_COMPONENT_BASE(); + DIALOG_LIB_NEW_SYMBOL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("New Symbol"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_LIB_NEW_SYMBOL_BASE(); }; diff --git a/eeschema/dialogs/dialog_lib_symbol_properties.cpp b/eeschema/dialogs/dialog_lib_symbol_properties.cpp index 23bc7227bb..57bd528a14 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties.cpp +++ b/eeschema/dialogs/dialog_lib_symbol_properties.cpp @@ -67,7 +67,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES( SYMBOL_EDIT_FRAME* a // Show/hide columns according to the user's preference SYMBOL_EDITOR_SETTINGS* cfg = m_Parent->GetSettings(); - m_grid->ShowHideColumns( cfg->m_EditComponentVisibleColumns ); + m_grid->ShowHideColumns( cfg->m_EditSymbolVisibleColumns ); wxGridCellAttr* attr = new wxGridCellAttr; attr->SetEditor( new GRID_CELL_URL_EDITOR( this ) ); @@ -129,7 +129,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES::~DIALOG_LIB_SYMBOL_PROPERTIES() m_lastOpenedPage = m_NoteBook->GetSelection( ); SYMBOL_EDITOR_SETTINGS* cfg = m_Parent->GetSettings(); - cfg->m_EditComponentVisibleColumns = m_grid->GetShownColumns(); + cfg->m_EditSymbolVisibleColumns = m_grid->GetShownColumns(); // Prevents crash bug in wxGrid's d'tor m_grid->DestroyTable( m_fields ); diff --git a/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp b/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp index 762cad72fe..54a81cc35b 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp +++ b/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -52,6 +52,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* m_grid->SetColSize( 10, 84 ); m_grid->EnableDragColMove( false ); m_grid->EnableDragColSize( true ); + m_grid->SetColLabelSize( 22 ); m_grid->SetColLabelValue( 0, _("Name") ); m_grid->SetColLabelValue( 1, _("Value") ); m_grid->SetColLabelValue( 2, _("Show") ); @@ -63,7 +64,6 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* m_grid->SetColLabelValue( 8, _("Orientation") ); m_grid->SetColLabelValue( 9, _("X Position") ); m_grid->SetColLabelValue( 10, _("Y Position") ); - m_grid->SetColLabelSize( 22 ); m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows @@ -239,7 +239,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* m_nameOffsetLabel = new wxStaticText( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Position offset:"), wxDefaultPosition, wxDefaultSize, 0 ); m_nameOffsetLabel->Wrap( -1 ); - m_nameOffsetLabel->SetToolTip( _("Margin (in 0.001 inches) between a pin name position and the component body.\nA value from 10 to 40 is usually good.") ); + m_nameOffsetLabel->SetToolTip( _("Margin between the pin name position and the symbol body.") ); bSizerNameOffset->Add( m_nameOffsetLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 24 ); @@ -251,13 +251,13 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* bSizerNameOffset->Add( m_nameOffsetUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - sbSizerPinTextOpts->Add( bSizerNameOffset, 0, wxEXPAND|wxTOP, 3 ); + sbSizerPinTextOpts->Add( bSizerNameOffset, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 ); sbSizerPinTextOpts->Add( 0, 0, 0, wxEXPAND, 5 ); - bSizerRightCol->Add( sbSizerPinTextOpts, 1, wxEXPAND|wxALL, 5 ); + bSizerRightCol->Add( sbSizerPinTextOpts, 1, wxALL|wxEXPAND, 5 ); bSizerLowerBasicPanel->Add( bSizerRightCol, 1, wxEXPAND, 5 ); diff --git a/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp b/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp index 2daa54d939..06d90dfc17 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp +++ b/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp @@ -1639,7 +1639,7 @@ none 5 - wxEXPAND|wxALL + wxALL|wxEXPAND 1 wxID_ANY @@ -1852,8 +1852,8 @@ - 3 - wxEXPAND|wxTOP + 5 + wxBOTTOM|wxEXPAND|wxTOP 0 @@ -1914,7 +1914,7 @@ 0 - Margin (in 0.001 inches) between a pin name position and the component body. A value from 10 to 40 is usually good. + Margin between the pin name position and the symbol body. diff --git a/eeschema/dialogs/dialog_lib_symbol_properties_base.h b/eeschema/dialogs/dialog_lib_symbol_properties_base.h index 4d1d5f7c8a..1bffae3e07 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties_base.h +++ b/eeschema/dialogs/dialog_lib_symbol_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -87,7 +87,7 @@ class DIALOG_LIB_SYMBOL_PROPERTIES_BASE : public DIALOG_SHIM wxButton* m_stdSizerButtonOK; wxButton* m_stdSizerButtonCancel; - // Virtual event handlers, override them in your derived class + // Virtual event handlers, overide them in your derived class virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnSizeGrid( wxSizeEvent& event ) { event.Skip(); } virtual void OnAddField( wxCommandEvent& event ) { event.Skip(); } diff --git a/eeschema/dialogs/dialog_pin_properties.cpp b/eeschema/dialogs/dialog_pin_properties.cpp index 4765b1a8a6..ae56a9b1f5 100644 --- a/eeschema/dialogs/dialog_pin_properties.cpp +++ b/eeschema/dialogs/dialog_pin_properties.cpp @@ -185,7 +185,7 @@ DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, LIB_PIN m_alternatesTurndown->Collapse(); m_alternatesTurndown->Disable(); m_alternatesTurndown->SetToolTip( - _( "Alternate pin assignments are not available for DeMorgan components." ) ); + _( "Alternate pin assignments are not available for DeMorgan symbols." ) ); } // Set special attributes diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp index 18ba7e29e9..5c55fd6ab6 100644 --- a/eeschema/dialogs/dialog_plot_schematic.cpp +++ b/eeschema/dialogs/dialog_plot_schematic.cpp @@ -785,10 +785,10 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotDrawingSheet SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet(); // sheetpath is saved here /* When printing all pages, the printed page is not the current page. In - * complex hierarchies, we must update component references and others + * complex hierarchies, we must update symbol references and other * parameters in the given printed SCH_SCREEN, accordant to the sheet path * because in complex hierarchies a SCH_SCREEN (a drawing ) is shared - * between many sheets and component references depend on the actual sheet + * between many sheets and symbol references depend on the actual sheet * path used */ SCH_SHEET_LIST sheetList; @@ -967,10 +967,10 @@ void DIALOG_PLOT_SCHEMATIC::createPSFile( bool aPlotAll, bool aPlotFrameRef, PAGE_INFO plotPage; // page size selected to plot /* When printing all pages, the printed page is not the current page. - * In complex hierarchies, we must update component references - * and others parameters in the given printed SCH_SCREEN, accordant to the sheet path - * because in complex hierarchies a SCH_SCREEN (a drawing ) - * is shared between many sheets and component references depend on the actual sheet path used + * In complex hierarchies, we must update symbol references and other parameters in the + * given printed SCH_SCREEN, accordant to the sheet path because in complex hierarchies + * a SCH_SCREEN (a drawing ) is shared between many sheets and symbol references + * depend on the actual sheet path used. */ SCH_SHEET_LIST sheetList; diff --git a/eeschema/dialogs/dialog_sim_settings.h b/eeschema/dialogs/dialog_sim_settings.h index c78ee41600..1054a22574 100644 --- a/eeschema/dialogs/dialog_sim_settings.h +++ b/eeschema/dialogs/dialog_sim_settings.h @@ -105,7 +105,7 @@ private: wxTextCtrl* aDcIncr ); /** - * Update DC sweep source with components from schematic. + * Update DC sweep source with symbols from schematic. */ void updateDCSources( wxChar aType, wxChoice* aSource ); diff --git a/eeschema/dialogs/dialog_spice_model.cpp b/eeschema/dialogs/dialog_spice_model.cpp index c10771b5ec..c7cf512541 100644 --- a/eeschema/dialogs/dialog_spice_model.cpp +++ b/eeschema/dialogs/dialog_spice_model.cpp @@ -374,7 +374,7 @@ bool DIALOG_SPICE_MODEL::TransferDataToWindow() } } - // Analyze the component fields to fill out the dialog + // Analyze the symbol fields to fill out the dialog. unsigned int primitive = toupper( m_fieldsTmp[SF_PRIMITIVE][0] ); switch( primitive ) @@ -862,7 +862,7 @@ void DIALOG_SPICE_MODEL::loadLibrary( const wxString& aFilePath ) // Stores the library content. It will be displayed after reading the full library wxString fullText; - // Process the file, looking for components + // Process the file, looking for symbols. while( !file.Eof() ) { const wxString& line = line_nr == 0 ? file.GetFirstLine() : file.GetNextLine(); diff --git a/eeschema/dialogs/dialog_spice_model.h b/eeschema/dialogs/dialog_spice_model.h index 4906ee3485..298a576974 100644 --- a/eeschema/dialogs/dialog_spice_model.h +++ b/eeschema/dialogs/dialog_spice_model.h @@ -130,10 +130,10 @@ private: void onRandomSourceType( wxCommandEvent& event ) override; void onTypeSelected( wxCommandEvent& event ) override; - ///< Edited component + ///< Edited symbol SCH_SYMBOL& m_symbol; - ///< Fields from the component properties dialog + ///< Fields from the symbol properties dialog. std::vector* m_schfields; std::vector* m_libfields; bool m_useSchFields; diff --git a/eeschema/ee_collectors.cpp b/eeschema/ee_collectors.cpp index 3a5650b997..5508351172 100644 --- a/eeschema/ee_collectors.cpp +++ b/eeschema/ee_collectors.cpp @@ -59,7 +59,7 @@ const KICAD_T EE_COLLECTOR::EditableItems[] = { }; -const KICAD_T EE_COLLECTOR::ComponentsOnly[] = { +const KICAD_T EE_COLLECTOR::SymbolsOnly[] = { SCH_SYMBOL_T, EOT }; diff --git a/eeschema/ee_collectors.h b/eeschema/ee_collectors.h index 292e38634d..4abe334303 100644 --- a/eeschema/ee_collectors.h +++ b/eeschema/ee_collectors.h @@ -45,7 +45,7 @@ public: static const KICAD_T AllItems[]; static const KICAD_T EditableItems[]; static const KICAD_T MovableItems[]; - static const KICAD_T ComponentsOnly[]; + static const KICAD_T SymbolsOnly[]; static const KICAD_T SheetsOnly[]; static const KICAD_T WiresOnly[]; static const KICAD_T FieldOwners[]; diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index f4e3066b08..71835d1826 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -52,7 +52,7 @@ // The main sheet of the project SCH_SHEET* g_RootSheet = NULL; -// a transform matrix, to display components in lib editor +// a transform matrix, to display symbols in lib editor TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 ); diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 91fecebc13..beacda1050 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -185,7 +185,7 @@ void SCH_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg ) * schematic: Because wires and pins are considered as connected when the are to the * same coordinate we cannot mix coordinates in mils (internal units) and mm (that * cannot exactly converted in mils in many cases). In fact schematic must only use - * 50 and 25 mils to place labels, wires and components others values are useful only + * 50 and 25 mils to place labels, wires and symbols others values are useful only * for graphic items (mainly in library editor) so use integer values in mils only. * The 100 mil grid is added to help conform to the KiCad Library Convention which * states: "Using a 100mil grid, pin ends and origin must lie on grid nodes IEC-60617" diff --git a/eeschema/erc.cpp b/eeschema/erc.cpp index cbcdc518fb..ac8f2fca37 100644 --- a/eeschema/erc.cpp +++ b/eeschema/erc.cpp @@ -329,9 +329,9 @@ int ERC_TESTER::TestMultiunitFootprints() SCH_MULTI_UNIT_REFERENCE_MAP refMap; sheets.GetMultiUnitSymbols( refMap, true ); - for( std::pair& component : refMap ) + for( std::pair& symbol : refMap ) { - SCH_REFERENCE_LIST& refList = component.second; + SCH_REFERENCE_LIST& refList = symbol.second; if( refList.GetCount() == 0 ) { diff --git a/eeschema/erc_settings.h b/eeschema/erc_settings.h index 988aaa3054..6cbc15758e 100644 --- a/eeschema/erc_settings.h +++ b/eeschema/erc_settings.h @@ -48,9 +48,9 @@ enum ERCE_T ERCE_NOCONNECT_NOT_CONNECTED, ///< A no connect symbol is not connected to anything. ERCE_LABEL_NOT_CONNECTED, ///< Label not connected to anything. ERCE_SIMILAR_LABELS, ///< 2 labels are equal for case insensitive comparisons. - ERCE_DIFFERENT_UNIT_FP, ///< Different units of the same component have different + ERCE_DIFFERENT_UNIT_FP, ///< Different units of the same symbol have different ///< footprints assigned. - ERCE_DIFFERENT_UNIT_NET, ///< Shared pin in a multi-unit component is connected to + ERCE_DIFFERENT_UNIT_NET, ///< Shared pin in a multi-unit symbol is connected to ///< more than one net. ERCE_BUS_ALIAS_CONFLICT, ///< Conflicting bus alias definitions across sheets. ERCE_DRIVER_CONFLICT, ///< Conflicting drivers (labels, etc) on a subgraph. diff --git a/eeschema/general.h b/eeschema/general.h index c0e1abd879..06e412ab77 100644 --- a/eeschema/general.h +++ b/eeschema/general.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2016-2020 KiCad Developers, see CHANGELOG.TXT for contributors. + * Copyright (C) 2016-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -35,7 +35,7 @@ class TRANSFORM; #define EESCHEMA_VERSION 5 #define SCHEMATIC_HEAD_STRING "Schematic File Version" -/* Rotation, mirror of graphic items in components bodies are handled by a +/* Rotation, mirror of graphic items in symbol bodies are handled by a * transform matrix. The default matrix is useful to draw lib entries with * using this default matrix ( no rotation, no mirror but Y axis is bottom to top, and * Y draw axis is to to bottom so we must have a default matrix that reverses diff --git a/eeschema/invoke_sch_dialog.h b/eeschema/invoke_sch_dialog.h index 625efe4873..67c985802c 100644 --- a/eeschema/invoke_sch_dialog.h +++ b/eeschema/invoke_sch_dialog.h @@ -91,11 +91,11 @@ void InvokeDialogBusManager( SCH_EDIT_FRAME* aCaller ); int InvokeDialogNetList( SCH_EDIT_FRAME* aCaller ); /** - * Run a dialog to modify the LIB_ID of components for instance when a symbol has + * Run a dialog to modify the LIB_ID of symbols for instance when a symbol has * moved from a symbol library to another symbol library * @return true if changes are made, false if no change */ -bool InvokeDialogEditComponentsLibId( SCH_EDIT_FRAME* aCaller ); +bool InvokeDialogEditSymbolsLibId( SCH_EDIT_FRAME* aCaller ); diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index da62355e69..3017bd9cfb 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -260,10 +260,10 @@ void LIB_FIELD::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill, if( GetText().IsEmpty() ) return; - // Calculate the text orientation, according to the component orientation/mirror + // Calculate the text orientation, according to the symbol orientation/mirror. int orient = (int) GetTextAngle(); - if( aTransform.y1 ) // Rotate component 90 deg. + if( aTransform.y1 ) // Rotate symbol 90 deg. { if( orient == TEXT_ANGLE_HORIZ ) orient = TEXT_ANGLE_VERT; diff --git a/eeschema/lib_item.h b/eeschema/lib_item.h index c466697a1e..2791faba1f 100644 --- a/eeschema/lib_item.h +++ b/eeschema/lib_item.h @@ -56,7 +56,7 @@ typedef std::vector< LIB_PIN* > LIB_PINS; /** - * The base class for drawable items used by schematic library components. + * The base class for drawable items used by schematic library symbols. */ class LIB_ITEM : public EDA_ITEM { @@ -87,10 +87,10 @@ public: virtual wxString GetTypeName() const = 0; /** - * Begin drawing a component library draw item at \a aPosition. + * Begin drawing a symbol library draw item at \a aPosition. * * It typically would be called on a left click when a draw tool is selected in - * the component library editor and one of the graphics tools is selected. + * the symbol library editor and one of the graphics tools is selected. * * @param aPosition The position in drawing coordinates where the drawing was started. * May or may not be required depending on the item being drawn. @@ -121,7 +121,7 @@ public: * * This method gets called by the Draw() method when the item is being edited. This * probably should be a pure virtual method but bezier curves are not yet editable in - * the component library editor. Therefore, the default method does nothing. + * the symbol library editor. Therefore, the default method does nothing. * * @param aPosition The current mouse position in drawing coordinates. */ @@ -135,7 +135,7 @@ public: * @param aData Value or pointer used to pass others parameters, depending on body items. * Used for some items to force to force no fill mode ( has meaning only for * items what can be filled ). used in printing or moving objects mode or to - * pass reference to the lib component for pins. + * pass reference to the lib symbol for pins. * @param aTransform Transform Matrix (rotation, mirror ..) */ virtual void Print( const RENDER_SETTINGS* aSettings, const wxPoint &aOffset, @@ -274,8 +274,8 @@ protected: * * The base object sort order which always proceeds the derived object sort order * is as follows: - * - Component alternate part (DeMorgan) number. - * - Component part number. + * - Symbol alternate part (DeMorgan) number. + * - Symbol part number. * - KICAD_T enum value. * - Result of derived classes comparison. * diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index 2830acf4ce..c1e46926e1 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -187,7 +187,7 @@ void LIB_PIN::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, v LIB_SYMBOL* part = GetParent(); - /* Calculate pin orient taking in account the component orientation. */ + /* Calculate pin orient taking in account the symbol orientation. */ int orient = PinDrawOrient( aTransform ); /* Calculate the pin position */ @@ -827,7 +827,7 @@ int LIB_PIN::PinDrawOrient( const TRANSFORM& aTransform ) const case PIN_RIGHT: end.x = 1; break; } - // = pos of end point, according to the component orientation + // = pos of end point, according to the symbol orientation. end = aTransform.TransformCoordinate( end ); orient = PIN_UP; diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h index 40670cf3b6..d191041d4d 100644 --- a/eeschema/lib_pin.h +++ b/eeschema/lib_pin.h @@ -40,7 +40,7 @@ /** - * The component library pin object orientations. + * The symbol library pin object orientations. */ enum DrawPinOrient { PIN_RIGHT = 'R', diff --git a/eeschema/lib_symbol.cpp b/eeschema/lib_symbol.cpp index 1306c4e05f..aa2cbcc7aa 100644 --- a/eeschema/lib_symbol.cpp +++ b/eeschema/lib_symbol.cpp @@ -794,7 +794,7 @@ bool LIB_SYMBOL::PinsConflictWith( const LIB_SYMBOL& aOtherPart, bool aTestNums, if( !foundMatch ) { // This means there was not an identical (according to the arguments) - // pin at the same position in the other component. + // pin at the same position in the other symbol. return true; } } diff --git a/eeschema/lib_symbol.h b/eeschema/lib_symbol.h index 871006c972..f8aef6b856 100644 --- a/eeschema/lib_symbol.h +++ b/eeschema/lib_symbol.h @@ -297,7 +297,7 @@ public: * * @param aOffset - Position of symbol. * @param aMulti - unit if multiple units per symbol. - * @param aConvert - Component conversion (DeMorgan) if available. + * @param aConvert - Symbol conversion (DeMorgan) if available. * @param aOpts - Drawing options */ void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, @@ -309,10 +309,10 @@ public: * is used to plot schematic items, which have they own fields * * @param aPlotter - Plotter object to plot to. - * @param aUnit - Component symbol to plot. - * @param aConvert - Component alternate body style to plot. + * @param aUnit - Symbol symbol to plot. + * @param aConvert - Symbol alternate body style to plot. * @param aOffset - Distance to shift the plot coordinates. - * @param aTransform - Component plot transform matrix. + * @param aTransform - Symbol plot transform matrix. */ void Plot( PLOTTER* aPlotter, int aUnit, int aConvert, const wxPoint& aOffset, const TRANSFORM& aTransform ) const; @@ -322,10 +322,10 @@ public: * is used to plot the full lib symbol, outside the schematic * * @param aPlotter - Plotter object to plot to. - * @param aUnit - Component symbol to plot. - * @param aConvert - Component alternate body style to plot. + * @param aUnit - Symbol to plot. + * @param aConvert - Symbol alternate body style to plot. * @param aOffset - Distance to shift the plot coordinates. - * @param aTransform - Component plot transform matrix. + * @param aTransform - Symbol plot transform matrix. */ void PlotLibFields( PLOTTER* aPlotter, int aUnit, int aConvert, const wxPoint& aOffset, const TRANSFORM& aTransform ); diff --git a/eeschema/libarch.cpp b/eeschema/libarch.cpp index bdc612cc04..04562f37da 100644 --- a/eeschema/libarch.cpp +++ b/eeschema/libarch.cpp @@ -25,7 +25,7 @@ /** * @file libarch.cpp - * @brief Module for generation of component archive files. + * @brief Module for generation of symbol archive files. */ #include diff --git a/eeschema/netlist_exporters/netlist.h b/eeschema/netlist_exporters/netlist.h index 847abfeabd..9043bb8bb3 100644 --- a/eeschema/netlist_exporters/netlist.h +++ b/eeschema/netlist_exporters/netlist.h @@ -3,7 +3,7 @@ * * Copyright (C) 1992-2011 jean-pierre Charras * Copyright (C) 1992-2011 Wayne Stambaugh - * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -49,7 +49,7 @@ enum NETLIST_TYPE_ID { #define NETLIST_HEAD_STRING "EESchema Netlist Version 1.1" -// Max pin number per component and footprint +// Max pin number per symbol and footprint. #define MAXPIN 5000 #endif diff --git a/eeschema/netlist_exporters/netlist_exporter_base.cpp b/eeschema/netlist_exporters/netlist_exporter_base.cpp index 89592ed632..d05ed30cfd 100644 --- a/eeschema/netlist_exporters/netlist_exporter_base.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_base.cpp @@ -77,7 +77,7 @@ SCH_SYMBOL* NETLIST_EXPORTER_BASE::findNextSymbol( EDA_ITEM* aItem, SCH_SHEET_PA if( aItem->Type() != SCH_SYMBOL_T ) return nullptr; - // found next component + // found next symbol SCH_SYMBOL* symbol = (SCH_SYMBOL*) aItem; // Power symbols and other symbols which have the reference starting with "#" are not @@ -95,7 +95,7 @@ SCH_SYMBOL* NETLIST_EXPORTER_BASE::findNextSymbol( EDA_ITEM* aItem, SCH_SHEET_PA if( !symbol->GetPartRef() ) return nullptr; - // If component is a "multi parts per package" type + // If symbol is a "multi parts per package" type if( symbol->GetPartRef()->GetUnitCount() > 1 ) { // test if this reference has already been processed, and if so skip @@ -103,7 +103,7 @@ SCH_SYMBOL* NETLIST_EXPORTER_BASE::findNextSymbol( EDA_ITEM* aItem, SCH_SHEET_PA return nullptr; } - // record the usage of this library component entry. + // record the usage of this library symbol entry. m_libParts.insert( symbol->GetPartRef().get() ); // rejects non-unique pointers return symbol; @@ -173,13 +173,13 @@ void NETLIST_EXPORTER_BASE::CreatePinList( SCH_SYMBOL* aSymbol, } } - // Sort pins in m_SortedComponentPinList by pin number + // Sort pins in m_SortedSymbolPinList by pin number sort( m_sortedSymbolPinList.begin(), m_sortedSymbolPinList.end(), sortPinsByNum ); - // Remove duplicate Pins in m_SortedComponentPinList + // Remove duplicate Pins in m_SortedSymbolPinList eraseDuplicatePins(); - // record the usage of this library component entry. + // record the usage of this library symbol m_libParts.insert( aSymbol->GetPartRef().get() ); // rejects non-unique pointers } diff --git a/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp b/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp index c50cc68531..445e3f89a9 100644 --- a/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp @@ -69,7 +69,7 @@ bool NETLIST_EXPORTER_ORCADPCB2::WriteNetlist( const wxString& aOutFileName, { SCH_SHEET_PATH sheet = sheetList[i]; - // Process component attributes + // Process symbol attributes for( auto item : sheet.LastScreen()->Items().OfType( SCH_SYMBOL_T ) ) { SCH_SYMBOL* symbol = findNextSymbol( item, &sheet ); diff --git a/eeschema/netlist_exporters/netlist_exporter_pspice.cpp b/eeschema/netlist_exporters/netlist_exporter_pspice.cpp index a09d0bd4e4..9b4c726320 100644 --- a/eeschema/netlist_exporters/netlist_exporter_pspice.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_pspice.cpp @@ -41,14 +41,14 @@ #include -wxString NETLIST_EXPORTER_PSPICE::GetSpiceDevice( const wxString& aComponent ) const +wxString NETLIST_EXPORTER_PSPICE::GetSpiceDevice( const wxString& aSymbol ) const { const std::list& spiceItems = GetSpiceItems(); auto it = std::find_if( spiceItems.begin(), spiceItems.end(), [&]( const SPICE_ITEM& item ) { - return item.m_refName == aComponent; + return item.m_refName == aSymbol; } ); if( it == spiceItems.end() ) @@ -286,7 +286,7 @@ bool NETLIST_EXPORTER_PSPICE::ProcessNetlist( unsigned aCtl ) { SCH_SHEET_PATH sheet = sheetList[sheet_idx]; - // Process component attributes to find Spice directives + // Process symbol attributes to find Spice directives for( SCH_ITEM* item : sheet.LastScreen()->Items().OfType( SCH_SYMBOL_T ) ) { SCH_SYMBOL* symbol = findNextSymbol( item, &sheet ); @@ -316,7 +316,7 @@ bool NETLIST_EXPORTER_PSPICE::ProcessNetlist( unsigned aCtl ) refNames.insert( spiceItem.m_refName ); - // Check to see if component should be removed from Spice netlist + // Check to see if symbol should be removed from Spice netlist spiceItem.m_enabled = StringToBool( GetSpiceField( SF_ENABLED, symbol, aCtl ) ); if( fieldLibFile && !fieldLibFile->GetShownText().IsEmpty() ) diff --git a/eeschema/netlist_exporters/netlist_exporter_pspice.h b/eeschema/netlist_exporters/netlist_exporter_pspice.h index a12b9c4680..80d81042ff 100644 --- a/eeschema/netlist_exporters/netlist_exporter_pspice.h +++ b/eeschema/netlist_exporters/netlist_exporter_pspice.h @@ -35,7 +35,7 @@ class PROJECT; /// Flags for Spice netlist generation (can be combined) enum SPICE_NETLIST_OPTIONS { NET_ADJUST_INCLUDE_PATHS = 8, // use full paths for included files (if they are in search path) - NET_ADJUST_PASSIVE_VALS = 16, // reformat passive component values (e.g. 1M -> 1Meg) + NET_ADJUST_PASSIVE_VALS = 16, // reformat passive symbol values (e.g. 1M -> 1Meg) NET_ALL_FLAGS = 0xffff }; @@ -67,11 +67,11 @@ enum SPICE_PRIMITIVE { /// export dialog. /** - * Structure to represent a schematic component in the Spice simulation. + * Structure to represent a schematic symbol in the Spice simulation. */ struct SPICE_ITEM { - ///< Schematic component represented by this SPICE_ITEM. + ///< Schematic symbol represented by this SPICE_ITEM. SCH_SYMBOL* m_parent; ///< Spice primitive type (@see SPICE_PRIMITIVE). @@ -84,13 +84,13 @@ struct SPICE_ITEM ///< wxString m_refName; - ///< Flag to indicate whether the component should be used in simulation. + ///< Flag to indicate whether the symbol should be used in simulation. bool m_enabled; ///< Array containing Standard Pin Name std::vector m_pins; - ///< Numeric indices into m_SortedComponentPinList + ///< Numeric indices into m_SortedSymbolPinList std::vector m_pinSequence; }; @@ -124,15 +124,15 @@ public: } /** - * Return name of Spice device corresponding to a schematic component. + * Return name of Spice device corresponding to a schematic symbol. * - * @param aComponent is the component reference. - * @return Spice device name or empty string if there is no such component in the netlist. The + * @param aSymbol is the component reference. + * @return Spice device name or empty string if there is no such symbol in the netlist. The * name is either plain reference if the first character of reference corresponds to the * assigned device model type or it is the reference prefixed with a character defining * the device model type. */ - wxString GetSpiceDevice( const wxString& aComponent ) const; + wxString GetSpiceDevice( const wxString& aSymbol ) const; /** * Write to specified output file diff --git a/eeschema/netlist_exporters/netlist_generator.cpp b/eeschema/netlist_exporters/netlist_generator.cpp index c9fb34da11..66533331bb 100644 --- a/eeschema/netlist_exporters/netlist_generator.cpp +++ b/eeschema/netlist_exporters/netlist_generator.cpp @@ -169,7 +169,7 @@ bool SCH_EDIT_FRAME::ReadyToNetlist( const wxString& aAnnotateMessage ) // Ensure all power symbols have a valid reference Schematic().GetSheets().AnnotatePowerSymbols(); - // Components must be annotated + // Symbols must be annotated if( CheckAnnotate( []( ERCE_T, const wxString&, SCH_REFERENCE*, SCH_REFERENCE* ) {} ) ) { // Schematic must be annotated: call Annotate dialog and tell the user why. diff --git a/eeschema/pin_type.h b/eeschema/pin_type.h index 45f96154a2..0c1810790b 100644 --- a/eeschema/pin_type.h +++ b/eeschema/pin_type.h @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2004-2021 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -30,7 +30,7 @@ enum class BITMAPS : unsigned int; /** - * The component library pin object electrical types used in ERC tests. + * The symbol library pin object electrical types used in ERC tests. */ enum class ELECTRICAL_PINTYPE { @@ -38,7 +38,7 @@ enum class ELECTRICAL_PINTYPE PT_OUTPUT, ///< usual output PT_BIDI, ///< input or output (like port for a microprocessor) PT_TRISTATE, ///< tris state bus pin - PT_PASSIVE, ///< pin for passive components: must be connected, and can be connected to any pin + PT_PASSIVE, ///< pin for passive symbols: must be connected, and can be connected to any pin PT_NIC, ///< not internally connected (may be connected to anything) PT_UNSPECIFIED, ///< unknown electrical properties: creates always a warning when connected PT_POWER_IN, ///< power input (GND, VCC for ICs). Must be connected to a power output. diff --git a/eeschema/sch_bus_entry.cpp b/eeschema/sch_bus_entry.cpp index a94a9a8bfa..08446b2d03 100644 --- a/eeschema/sch_bus_entry.cpp +++ b/eeschema/sch_bus_entry.cpp @@ -487,21 +487,21 @@ bool SCH_BUS_ENTRY_BASE::operator <( const SCH_ITEM& aItem ) const if( Type() != aItem.Type() ) return Type() < aItem.Type(); - auto component = static_cast( &aItem ); + auto symbol = static_cast( &aItem ); - if( GetLayer() != component->GetLayer() ) - return GetLayer() < component->GetLayer(); + if( GetLayer() != symbol->GetLayer() ) + return GetLayer() < symbol->GetLayer(); - if( GetPosition().x != component->GetPosition().x ) - return GetPosition().x < component->GetPosition().x; + if( GetPosition().x != symbol->GetPosition().x ) + return GetPosition().x < symbol->GetPosition().x; - if( GetPosition().y != component->GetPosition().y ) - return GetPosition().y < component->GetPosition().y; + if( GetPosition().y != symbol->GetPosition().y ) + return GetPosition().y < symbol->GetPosition().y; - if( GetEnd().x != component->GetEnd().x ) - return GetEnd().x < component->GetEnd().x; + if( GetEnd().x != symbol->GetEnd().x ) + return GetEnd().x < symbol->GetEnd().x; - return GetEnd().y < component->GetEnd().y; + return GetEnd().y < symbol->GetEnd().y; } diff --git a/eeschema/sch_connection.cpp b/eeschema/sch_connection.cpp index 889b3f31f3..2c412458e6 100644 --- a/eeschema/sch_connection.cpp +++ b/eeschema/sch_connection.cpp @@ -314,7 +314,7 @@ bool SCH_CONNECTION::IsDriver() const { auto pin = static_cast( Parent() ); - // Only annotated components should drive nets + // Only annotated symbols should drive nets. return pin->IsPowerConnection() || pin->GetParentSymbol()->IsAnnotated( &m_sheet ); } @@ -360,7 +360,7 @@ void SCH_CONNECTION::recacheName() case SCH_GLOBAL_LABEL_T: case SCH_PIN_T: // Pins are either power connections or belong to a uniquely-annotated - // component, so they don't need a path if they are driving the subgraph + // symbol, so they don't need a path if they are driving the subgraph. prepend_path = false; break; diff --git a/eeschema/sch_connection.h b/eeschema/sch_connection.h index 22761a1368..a94c433eaa 100644 --- a/eeschema/sch_connection.h +++ b/eeschema/sch_connection.h @@ -2,6 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2018 CERN + * Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors. * @author Jon Evans * * This program is free software; you can redistribute it and/or @@ -111,7 +112,7 @@ public: /** * Checks if the SCH_ITEM this connection is attached to can drive connections - * Drivers can be labels, sheet pins, or component pins. + * Drivers can be labels, sheet pins, or symbol pins. * * @return true if the attached items is a driver */ diff --git a/eeschema/sch_draw_panel.cpp b/eeschema/sch_draw_panel.cpp index d6cc0b300b..07f73c224e 100644 --- a/eeschema/sch_draw_panel.cpp +++ b/eeschema/sch_draw_panel.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2014-2019 CERN * @author Maciej Suminski - * Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -105,10 +105,10 @@ SCH_DRAW_PANEL::~SCH_DRAW_PANEL() } -void SCH_DRAW_PANEL::DisplayComponent( LIB_SYMBOL* aSymbol ) +void SCH_DRAW_PANEL::DisplaySymbol( LIB_SYMBOL* aSymbol ) { GetView()->Clear(); - GetView()->DisplayComponent( aSymbol ); + GetView()->DisplaySymbol( aSymbol ); } diff --git a/eeschema/sch_draw_panel.h b/eeschema/sch_draw_panel.h index 516906e0f2..70c76ca8f5 100644 --- a/eeschema/sch_draw_panel.h +++ b/eeschema/sch_draw_panel.h @@ -44,7 +44,7 @@ public: ~SCH_DRAW_PANEL(); - void DisplayComponent( LIB_SYMBOL *aSymbol ); + void DisplaySymbol( LIB_SYMBOL *aSymbol ); void DisplaySheet( SCH_SCREEN *aScreen ); bool SwitchBackend( GAL_TYPE aGalType ) override; diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index fead0d2135..7d30c17183 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1617,7 +1617,7 @@ void SCH_EDIT_FRAME::SaveSymbolToSchematic( const LIB_SYMBOL& aSymbol ) wxCHECK( selectionTool, /* void */ ); - EE_SELECTION& selection = selectionTool->RequestSelection( EE_COLLECTOR::ComponentsOnly ); + EE_SELECTION& selection = selectionTool->RequestSelection( EE_COLLECTOR::SymbolsOnly ); if( selection.Empty() ) return; diff --git a/eeschema/sch_io_mgr.h b/eeschema/sch_io_mgr.h index bcca0332d6..614384e1ff 100644 --- a/eeschema/sch_io_mgr.h +++ b/eeschema/sch_io_mgr.h @@ -195,7 +195,7 @@ public: * @param aFileName is the name of the file to use as input and may be foreign in * nature or native in nature. * - * @param aKiway is the #KIWAY object used to access the component libraries loaded + * @param aKiway is the #KIWAY object used to access the symbol libraries loaded * by the project. * * @param aAppendToMe is an existing #SCH_SHEET to append to, but if NULL then this means diff --git a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.h b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.h index cc1d54062e..72f8c964d7 100644 --- a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.h +++ b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.h @@ -135,7 +135,7 @@ private: void loadHierarchy( SCH_SHEET* aSheet ); void loadFile( const wxString& aFileName, SCH_SHEET* aSheet ); - void saveSymbol( SCH_SYMBOL* aComponent, SCH_SHEET_PATH* aSheetPath, int aNestLevel ); + void saveSymbol( SCH_SYMBOL* aSymbol, SCH_SHEET_PATH* aSheetPath, int aNestLevel ); void saveField( SCH_FIELD* aField, int aNestLevel ); void saveBitmap( SCH_BITMAP* aBitmap, int aNestLevel ); void saveSheet( SCH_SHEET* aSheet, int aNestLevel ); diff --git a/eeschema/sch_view.cpp b/eeschema/sch_view.cpp index edda307924..589aca9608 100644 --- a/eeschema/sch_view.cpp +++ b/eeschema/sch_view.cpp @@ -118,7 +118,7 @@ void SCH_VIEW::DisplaySheet( const SCH_SCREEN *aScreen ) } -void SCH_VIEW::DisplayComponent( LIB_SYMBOL* aSymbol ) +void SCH_VIEW::DisplaySymbol( LIB_SYMBOL* aSymbol ) { Clear(); diff --git a/eeschema/sch_view.h b/eeschema/sch_view.h index 8ad41b6fdf..0fcb7612b5 100644 --- a/eeschema/sch_view.h +++ b/eeschema/sch_view.h @@ -80,7 +80,7 @@ public: void Cleanup(); void DisplaySheet( const SCH_SCREEN* aScreen ); - void DisplayComponent( LIB_SYMBOL* aSymbol ); + void DisplaySymbol( LIB_SYMBOL* aSymbol ); // Call it to set new draw area limits (max working and draw area size) void ResizeSheetWorkingArea( const SCH_SCREEN *aScreen ); diff --git a/eeschema/sim/netlist_exporter_pspice_sim.h b/eeschema/sim/netlist_exporter_pspice_sim.h index e0854162f1..a083cb96ec 100644 --- a/eeschema/sim/netlist_exporter_pspice_sim.h +++ b/eeschema/sim/netlist_exporter_pspice_sim.h @@ -123,7 +123,7 @@ public: wxString GetSheetSimCommand(); /** - * Parse a two-source .dc command directive into its components + * Parse a two-source .dc command directive into its symbols. * * @param aCmd is the input command string * @return true if the command was parsed successfully diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index 693d472542..a794071a11 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -170,7 +170,7 @@ SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" ) .Left().Layer( 3 ) ); - m_auimgr.AddPane( m_treePane, EDA_PANE().Palette().Name( "ComponentTree" ) + m_auimgr.AddPane( m_treePane, EDA_PANE().Palette().Name( "SymbolTree" ) .Left().Layer( 2 ) .Caption( _( "Libraries" ) ) .MinSize( 250, -1 ).BestSize( 250, -1 ) ); @@ -184,7 +184,7 @@ SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : if( m_settings->m_LibWidth > 0 ) { - wxAuiPaneInfo& treePane = m_auimgr.GetPane( "ComponentTree" ); + wxAuiPaneInfo& treePane = m_auimgr.GetPane( "SymbolTree" ); // wxAUI hack: force width by setting MinSize() and then Fixed() // thanks to ZenJu http://trac.wxwidgets.org/ticket/13180 @@ -703,7 +703,7 @@ void SYMBOL_EDIT_FRAME::SetCurPart( LIB_SYMBOL* aSymbol, bool aUpdateZoom ) GetRenderSettings()->m_ShowConvert = m_convert; GetRenderSettings()->m_ShowDisabled = IsSymbolFromLegacyLibrary() && !IsSymbolFromSchematic(); GetRenderSettings()->m_ShowGraphicsDisabled = IsSymbolAlias() && !IsSymbolFromSchematic(); - GetCanvas()->DisplayComponent( m_my_part ); + GetCanvas()->DisplaySymbol( m_my_part ); GetCanvas()->GetView()->HideDrawingSheet(); GetCanvas()->GetView()->ClearHiddenFlags(); @@ -1113,7 +1113,7 @@ void SYMBOL_EDIT_FRAME::RebuildView() GetRenderSettings()->m_ShowConvert = m_convert; GetRenderSettings()->m_ShowDisabled = IsSymbolFromLegacyLibrary() && !IsSymbolFromSchematic(); GetRenderSettings()->m_ShowGraphicsDisabled = IsSymbolAlias() && !IsSymbolFromSchematic(); - GetCanvas()->DisplayComponent( m_my_part ); + GetCanvas()->DisplaySymbol( m_my_part ); GetCanvas()->GetView()->HideDrawingSheet(); GetCanvas()->GetView()->ClearHiddenFlags(); diff --git a/eeschema/symbol_editor/symbol_editor.cpp b/eeschema/symbol_editor/symbol_editor.cpp index 23c6acf2cb..a992d50883 100644 --- a/eeschema/symbol_editor/symbol_editor.cpp +++ b/eeschema/symbol_editor/symbol_editor.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include @@ -393,7 +393,7 @@ void SYMBOL_EDIT_FRAME::CreateNewPart() rootSymbols.Sort(); - DIALOG_LIB_NEW_COMPONENT dlg( this, &rootSymbols ); + DIALOG_LIB_NEW_SYMBOL dlg( this, &rootSymbols ); dlg.SetMinSize( dlg.GetSize() ); if( dlg.ShowModal() == wxID_CANCEL ) diff --git a/eeschema/symbol_editor/symbol_editor_plotter.cpp b/eeschema/symbol_editor/symbol_editor_plotter.cpp index 24114f9f86..d0cbe22e19 100644 --- a/eeschema/symbol_editor/symbol_editor_plotter.cpp +++ b/eeschema/symbol_editor/symbol_editor_plotter.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -64,8 +64,8 @@ void SYMBOL_EDIT_FRAME::SVGPlotSymbol( const wxString& aFullFileName ) TRANSFORM temp; // Uses default transform wxPoint plotPos; - plotPos.x = pageInfo.GetWidthIU() /2; - plotPos.y = pageInfo.GetHeightIU()/2; + plotPos.x = pageInfo.GetWidthIU() / 2; + plotPos.y = pageInfo.GetHeightIU() / 2; m_my_part->Plot( plotter, GetUnit(), GetConvert(), plotPos, temp ); @@ -86,7 +86,7 @@ void SYMBOL_EDIT_FRAME::PrintPage( const RENDER_SETTINGS* aSettings ) wxSize pagesize = GetScreen()->GetPageSettings().GetSizeIU(); /* Plot item centered to the page - * In symbol_editor, the component is centered at 0,0 coordinates. + * In symbol_editor, the symbol is centered at 0,0 coordinates. * So we must plot it with an offset = pagesize/2. */ wxPoint plot_offset; diff --git a/eeschema/symbol_editor/symbol_editor_settings.cpp b/eeschema/symbol_editor/symbol_editor_settings.cpp index 008ad61481..1019b0112b 100644 --- a/eeschema/symbol_editor/symbol_editor_settings.cpp +++ b/eeschema/symbol_editor/symbol_editor_settings.cpp @@ -38,7 +38,7 @@ SYMBOL_EDITOR_SETTINGS::SYMBOL_EDITOR_SETTINGS() : m_Repeat(), m_ShowPinElectricalType( true ), m_LibWidth(), - m_EditComponentVisibleColumns() + m_EditSymbolVisibleColumns() { // Make Coverity happy m_UseEeschemaColorSettings = true;; @@ -75,7 +75,7 @@ SYMBOL_EDITOR_SETTINGS::SYMBOL_EDITOR_SETTINGS() : m_params.emplace_back( new PARAM( "lib_table_width", &m_LibWidth, 250 ) ); m_params.emplace_back( new PARAM( "edit_component_visible_columns", - &m_EditComponentVisibleColumns, "0 1 2 3 4 5 6 7" ) ); + &m_EditSymbolVisibleColumns, "0 1 2 3 4 5 6 7" ) ); m_params.emplace_back( new PARAM( "pin_table_visible_columns", &m_PinTableVisibleColumns, "0 1 2 3 4 8 9" ) ); diff --git a/eeschema/symbol_editor/symbol_editor_settings.h b/eeschema/symbol_editor/symbol_editor_settings.h index 14856d9802..b837e12f56 100644 --- a/eeschema/symbol_editor/symbol_editor_settings.h +++ b/eeschema/symbol_editor/symbol_editor_settings.h @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * -* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors. +* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -62,7 +62,7 @@ public: int m_LibWidth; - wxString m_EditComponentVisibleColumns; + wxString m_EditSymbolVisibleColumns; wxString m_PinTableVisibleColumns; diff --git a/eeschema/symbol_tree_synchronizing_adapter.cpp b/eeschema/symbol_tree_synchronizing_adapter.cpp index 7be81005f6..fd7f0cdb22 100644 --- a/eeschema/symbol_tree_synchronizing_adapter.cpp +++ b/eeschema/symbol_tree_synchronizing_adapter.cpp @@ -165,8 +165,8 @@ void SYMBOL_TREE_SYNCHRONIZING_ADAPTER::updateLibrary( LIB_TREE_NODE_LIB& aLibNo if( aliasIt != aliases.end() ) { - // alias exists both in the component tree and the library manager, - // update only the node data + // alias exists both in the symbol tree and the library manager, + // update only the node data. static_cast( nodeIt->get() )->Update( *aliasIt ); aliases.erase( aliasIt ); ++nodeIt; diff --git a/eeschema/symbol_viewer_frame.cpp b/eeschema/symbol_viewer_frame.cpp index 5e86fb3296..e0e9ebaea1 100644 --- a/eeschema/symbol_viewer_frame.cpp +++ b/eeschema/symbol_viewer_frame.cpp @@ -126,7 +126,7 @@ SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAM m_libListWidth = 200; m_symbolListWidth = 300; - m_listPowerCmpOnly = false; + m_listPowerOnly = false; SetScreen( new SCH_SCREEN ); GetScreen()->m_Center = true; // Axis origin centered on screen. @@ -491,7 +491,7 @@ bool SYMBOL_VIEWER_FRAME::ReCreateLibList() } // Remove libs which have no power symbols, if this filter is activated - if( m_listPowerCmpOnly ) + if( m_listPowerOnly ) { for( unsigned ii = 0; ii < libs.size(); ) { @@ -551,7 +551,7 @@ bool SYMBOL_VIEWER_FRAME::ReCreateSymbolList() try { Prj().SchSymbolLibTable()->EnumerateSymbolLib( m_libraryName, aliasNames, - m_listPowerCmpOnly ); + m_listPowerOnly ); } catch( const IO_ERROR& ) {} // ignore, it is handled below @@ -763,13 +763,13 @@ void SYMBOL_VIEWER_FRAME::CloseLibraryViewer( wxCommandEvent& event ) void SYMBOL_VIEWER_FRAME::SetFilter( const SCHLIB_FILTER* aFilter ) { - m_listPowerCmpOnly = false; + m_listPowerOnly = false; m_allowedLibs.Clear(); if( aFilter ) { m_allowedLibs = aFilter->GetAllowedLibList(); - m_listPowerCmpOnly = aFilter->GetFilterPowerParts(); + m_listPowerOnly = aFilter->GetFilterPowerParts(); } ReCreateLibList(); diff --git a/eeschema/symbol_viewer_frame.h b/eeschema/symbol_viewer_frame.h index a286a9c037..f2ae1618a4 100644 --- a/eeschema/symbol_viewer_frame.h +++ b/eeschema/symbol_viewer_frame.h @@ -109,7 +109,7 @@ public: * Set a filter to display only libraries and/or symbols which match the filter. * * @param aFilter is a filter to pass the allowed library name list and/or some other filter - * see SCH_BASE_FRAME::SelectComponentFromLibrary() for details. + * see SCH_BASE_FRAME::SelectSymbolFromLibrary() for details. * if aFilter == NULL, remove all filtering. */ void SetFilter( const SCHLIB_FILTER* aFilter ); @@ -174,7 +174,7 @@ private: int m_symbolListWidth; // Last width of the window. // Filters to build list of libs/list of symbols. - bool m_listPowerCmpOnly; + bool m_listPowerOnly; wxArrayString m_allowedLibs; static wxString m_libraryName; diff --git a/eeschema/tools/assign_footprints.cpp b/eeschema/tools/assign_footprints.cpp index f1d39f3ddb..61432b1186 100644 --- a/eeschema/tools/assign_footprints.cpp +++ b/eeschema/tools/assign_footprints.cpp @@ -206,7 +206,7 @@ int SCH_EDITOR_CONTROL::ImportFPAssignments( const TOOL_EVENT& aEvent ) wxFileDialog dlg( m_frame, _( "Load Symbol Footprint Link File" ), path, wxEmptyString, - ComponentFileWildcard(), + FootprintAssignmentFileWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST ); if( dlg.ShowModal() == wxID_CANCEL ) diff --git a/eeschema/tools/ee_grid_helper.h b/eeschema/tools/ee_grid_helper.h index d680b968a2..076b78a0d1 100644 --- a/eeschema/tools/ee_grid_helper.h +++ b/eeschema/tools/ee_grid_helper.h @@ -68,11 +68,11 @@ private: ANCHOR* nearestAnchor( const VECTOR2I& aPos, int aFlags, int aMatchLayer ); /** - * computeAnchors inserts the local anchor points in to the grid helper for the specified + * Insert the local anchor points in to the grid helper for the specified * schematic item, given the reference point and the direction of use for the point. * * @param aItem The schematic item for which to compute the anchors - * @param aRefPos The point for which to compute the anchors (if used by the component) + * @param aRefPos The point for which to compute the anchors (if used by the symbol) * @param aFrom Is this for an anchor that is designating a source point (aFrom=true) or not */ void computeAnchors( SCH_ITEM* aItem, const VECTOR2I& aRefPos, bool aFrom = false ); diff --git a/eeschema/tools/ee_inspection_tool.cpp b/eeschema/tools/ee_inspection_tool.cpp index dfb84f86b1..7660d5c977 100644 --- a/eeschema/tools/ee_inspection_tool.cpp +++ b/eeschema/tools/ee_inspection_tool.cpp @@ -481,7 +481,7 @@ int EE_INSPECTION_TOOL::ShowDatasheet( const TOOL_EVENT& aEvent ) } else if( m_frame->IsType( FRAME_SCH ) ) { - EE_SELECTION& selection = m_selectionTool->RequestSelection( EE_COLLECTOR::ComponentsOnly ); + EE_SELECTION& selection = m_selectionTool->RequestSelection( EE_COLLECTOR::SymbolsOnly ); if( selection.Empty() ) return 0; diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index 9d312c7566..7fd07b1ee3 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -1167,7 +1167,7 @@ int SCH_EDIT_TOOL::AutoplaceFields( const TOOL_EVENT& aEvent ) int SCH_EDIT_TOOL::ChangeSymbols( const TOOL_EVENT& aEvent ) { SCH_SYMBOL* selectedSymbol = nullptr; - EE_SELECTION& selection = m_selectionTool->RequestSelection( EE_COLLECTOR::ComponentsOnly ); + EE_SELECTION& selection = m_selectionTool->RequestSelection( EE_COLLECTOR::SymbolsOnly ); if( !selection.Empty() ) selectedSymbol = dynamic_cast( selection.Front() ); @@ -1190,7 +1190,7 @@ int SCH_EDIT_TOOL::ChangeSymbols( const TOOL_EVENT& aEvent ) int SCH_EDIT_TOOL::ConvertDeMorgan( const TOOL_EVENT& aEvent ) { - EE_SELECTION& selection = m_selectionTool->RequestSelection( EE_COLLECTOR::ComponentsOnly ); + EE_SELECTION& selection = m_selectionTool->RequestSelection( EE_COLLECTOR::SymbolsOnly ); if( selection.Empty() ) return 0; diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 33ab310fde..e4ba5b189a 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -610,7 +610,7 @@ void SCH_EDITOR_CONTROL::doCrossProbeSchToPcb( const TOOL_EVENT& aEvent, bool aF static KICAD_T wires[] = { SCH_LINE_LOCATE_WIRE_T, EOT }; static KICAD_T wiresAndPins[] = { SCH_LINE_LOCATE_WIRE_T, SCH_PIN_T, SCH_SHEET_PIN_T, EOT }; -static KICAD_T fieldsAndComponents[] = { SCH_SYMBOL_T, SCH_FIELD_T, EOT }; +static KICAD_T fieldsAndSymbols[] = { SCH_SYMBOL_T, SCH_FIELD_T, EOT }; #define HITTEST_THRESHOLD_PIXELS 5 @@ -755,7 +755,7 @@ int SCH_EDITOR_CONTROL::SimTune( const TOOL_EVENT& aEvent ) { EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool(); EDA_ITEM* item = nullptr; - selTool->SelectPoint( aPosition, fieldsAndComponents, &item ); + selTool->SelectPoint( aPosition, fieldsAndSymbols, &item ); if( !item ) return false; @@ -782,7 +782,7 @@ int SCH_EDITOR_CONTROL::SimTune( const TOOL_EVENT& aEvent ) { EE_COLLECTOR collector; collector.m_Threshold = KiROUND( getView()->ToWorld( HITTEST_THRESHOLD_PIXELS ) ); - collector.Collect( m_frame->GetScreen(), fieldsAndComponents, (wxPoint) aPos ); + collector.Collect( m_frame->GetScreen(), fieldsAndSymbols, (wxPoint) aPos ); EE_SELECTION_TOOL* selectionTool = m_toolMgr->GetTool(); selectionTool->GuessSelectionCandidates( collector, aPos ); @@ -1770,7 +1770,7 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent ) int SCH_EDITOR_CONTROL::EditWithSymbolEditor( const TOOL_EVENT& aEvent ) { EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool(); - EE_SELECTION& selection = selTool->RequestSelection( EE_COLLECTOR::ComponentsOnly ); + EE_SELECTION& selection = selTool->RequestSelection( EE_COLLECTOR::SymbolsOnly ); SCH_SYMBOL* symbol = nullptr; SYMBOL_EDIT_FRAME* symbolEditor; @@ -1816,7 +1816,7 @@ int SCH_EDITOR_CONTROL::EditSymbolFields( const TOOL_EVENT& aEvent ) int SCH_EDITOR_CONTROL::EditSymbolLibraryLinks( const TOOL_EVENT& aEvent ) { - if( InvokeDialogEditComponentsLibId( m_frame ) ) + if( InvokeDialogEditSymbolsLibId( m_frame ) ) m_frame->HardRedraw(); return 0; diff --git a/eeschema/transform.h b/eeschema/transform.h index fcd8012884..f6f1522f5a 100644 --- a/eeschema/transform.h +++ b/eeschema/transform.h @@ -5,8 +5,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2007-2010 Wayne Stambaugh - * Copyright (C) 2007-2017 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2007-2010 Wayne Stambaugh + * Copyright (C) 2007-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -64,7 +64,7 @@ public: /** * Calculate a new coordinate according to the mirror/rotation transform. * Useful to calculate actual coordinates of a point - * from coordinates relative to a component + * from coordinates relative to a symbol. * which are given for a non rotated, non mirrored item * @param aPoint = The position to transform * @return The transformed coordinate. @@ -74,7 +74,7 @@ public: /** * Calculate a new rect according to the mirror/rotation transform. * Useful to calculate actual coordinates of a point - * from coordinates relative to a component + * from coordinates relative to a symbol * which are given for a non rotated, non mirrored item * @param aRect = The rectangle to transform * @return The transformed rectangle. @@ -83,7 +83,7 @@ public: /** * Calculate the Inverse mirror/rotation transform. - * Useful to calculate coordinates relative to a component + * Useful to calculate coordinates relative to a symbol. * which must be for a non rotated, non mirrored item * from the actual coordinate. * @return The inverse transform. diff --git a/eeschema/widgets/symbol_tree_pane.cpp b/eeschema/widgets/symbol_tree_pane.cpp index 301b94fbd3..c7e6f09e3c 100644 --- a/eeschema/widgets/symbol_tree_pane.cpp +++ b/eeschema/widgets/symbol_tree_pane.cpp @@ -2,6 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2017 CERN + * Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors. * @author Maciej Suminski * * This program is free software; you can redistribute it and/or @@ -49,7 +50,7 @@ SYMBOL_TREE_PANE::SYMBOL_TREE_PANE( SYMBOL_EDIT_FRAME* aParent, SYMBOL_LIBRARY_M m_libMgr->GetAdapter()->FinishTreeInitialization(); // Event handlers - Bind( SYMBOL_SELECTED, &SYMBOL_TREE_PANE::onComponentSelected, this ); + Bind( SYMBOL_SELECTED, &SYMBOL_TREE_PANE::onSymbolSelected, this ); m_tree->Bind( wxEVT_UPDATE_UI, &SYMBOL_TREE_PANE::onUpdateUI, this ); } @@ -60,7 +61,7 @@ SYMBOL_TREE_PANE::~SYMBOL_TREE_PANE() } -void SYMBOL_TREE_PANE::onComponentSelected( wxCommandEvent& aEvent ) +void SYMBOL_TREE_PANE::onSymbolSelected( wxCommandEvent& aEvent ) { m_symbolEditFrame->GetToolManager()->RunAction( EE_ACTIONS::editSymbol, true ); diff --git a/eeschema/widgets/symbol_tree_pane.h b/eeschema/widgets/symbol_tree_pane.h index d855fadd01..00dbf3674f 100644 --- a/eeschema/widgets/symbol_tree_pane.h +++ b/eeschema/widgets/symbol_tree_pane.h @@ -2,6 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2017 CERN + * Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors. * @author Maciej Suminski * * This program is free software; you can redistribute it and/or @@ -49,7 +50,7 @@ public: } protected: - void onComponentSelected( wxCommandEvent& aEvent ); + void onSymbolSelected( wxCommandEvent& aEvent ); void onUpdateUI( wxUpdateUIEvent& aEvent ); SYMBOL_EDIT_FRAME* m_symbolEditFrame; diff --git a/eeschema/widgets/tuner_slider.h b/eeschema/widgets/tuner_slider.h index 2001e49128..a8e43671d7 100644 --- a/eeschema/widgets/tuner_slider.h +++ b/eeschema/widgets/tuner_slider.h @@ -42,7 +42,7 @@ class SCH_SYMBOL; class TUNER_SLIDER : public TUNER_SLIDER_BASE { public: - TUNER_SLIDER( SIM_PLOT_FRAME *aFrame, wxWindow* aParent, SCH_SYMBOL* aComponent ); + TUNER_SLIDER( SIM_PLOT_FRAME *aFrame, wxWindow* aParent, SCH_SYMBOL* aSymbol ); wxString GetComponentName() const { diff --git a/include/wildcards_and_files_ext.h b/include/wildcards_and_files_ext.h index 35c09a367a..2b23ad0df1 100644 --- a/include/wildcards_and_files_ext.h +++ b/include/wildcards_and_files_ext.h @@ -139,7 +139,7 @@ extern const std::string DesignRulesFileExtension; extern const std::string LegacyFootprintLibPathExtension; extern const std::string PdfFileExtension; extern const std::string MacrosFileExtension; -extern const std::string ComponentFileExtension; +extern const std::string FootprintAssignmentFileExtension; extern const std::string DrillFileExtension; extern const std::string SVGFileExtension; extern const std::string ReportFileExtension; @@ -148,7 +148,6 @@ extern const std::string KiCadFootprintFileExtension; extern const std::string KiCadFootprintLibPathExtension; extern const std::string GedaPcbFootprintLibFileExtension; extern const std::string EagleFootprintLibPathExtension; -extern const std::string ComponentFileExtension; extern const std::string DrawingSheetFileExtension; extern const std::string SpecctraDsnFileExtension; extern const std::string IpcD356FileExtension; @@ -176,7 +175,7 @@ bool IsProtelExtension( const wxString& ext ); extern wxString AllFilesWildcard(); -extern wxString ComponentFileWildcard(); +extern wxString FootprintAssignmentFileWildcard(); extern wxString DrawingSheetFileWildcard(); extern wxString SchematicSymbolFileWildcard(); extern wxString KiCadSymbolLibFileWildcard(); @@ -209,7 +208,6 @@ extern wxString FabmasterPcbFileWildcard(); extern wxString PdfFileWildcard(); extern wxString PSFileWildcard(); extern wxString MacrosFileWildcard(); -extern wxString ComponentFileWildcard(); extern wxString DrillFileWildcard(); extern wxString SVGFileWildcard(); extern wxString ReportFileWildcard(); diff --git a/kicad/project_tree_pane.cpp b/kicad/project_tree_pane.cpp index 44fcb068b2..373dadfced 100644 --- a/kicad/project_tree_pane.cpp +++ b/kicad/project_tree_pane.cpp @@ -282,7 +282,7 @@ wxString PROJECT_TREE_PANE::GetFileExt( TREE_FILE_TYPE type ) case TREE_FILE_TYPE::PDF: return PdfFileExtension; case TREE_FILE_TYPE::TXT: return TextFileExtension; case TREE_FILE_TYPE::NET: return NetlistFileExtension; - case TREE_FILE_TYPE::CMP_LINK: return ComponentFileExtension; + case TREE_FILE_TYPE::CMP_LINK: return FootprintAssignmentFileExtension; case TREE_FILE_TYPE::REPORT: return ReportFileExtension; case TREE_FILE_TYPE::FP_PLACE: return FootprintPlaceFileExtension; case TREE_FILE_TYPE::DRILL: return DrillFileExtension; diff --git a/kicad/tools/kicad_manager_control.cpp b/kicad/tools/kicad_manager_control.cpp index ec6cb74850..f5baa4f5f0 100644 --- a/kicad/tools/kicad_manager_control.cpp +++ b/kicad/tools/kicad_manager_control.cpp @@ -42,7 +42,8 @@ public: DIR_CHECKBOX( wxWindow* aParent ) : wxPanel( aParent ) { - m_cbCreateDir = new wxCheckBox( this, wxID_ANY, _( "Create a new folder for the project" ) ); + m_cbCreateDir = new wxCheckBox( this, wxID_ANY, + _( "Create a new folder for the project" ) ); m_cbCreateDir->SetValue( true ); wxBoxSizer* sizer = new wxBoxSizer( wxHORIZONTAL ); @@ -310,6 +311,7 @@ int KICAD_MANAGER_CONTROL::OpenProject( const TOOL_EVENT& aEvent ) return 0; } + int KICAD_MANAGER_CONTROL::CloseProject( const TOOL_EVENT& aEvent ) { m_frame->CloseProject( true ); @@ -385,7 +387,7 @@ public: || ext == LegacyPcbFileExtension || ext == KiCadFootprintFileExtension || ext == LegacyFootprintLibPathExtension - || ext == ComponentFileExtension + || ext == FootprintAssignmentFileExtension || destFile.GetName() == "fp-lib-table" ) { KIFACE* pcbnew = m_frame->Kiway().KiFACE( KIWAY::FACE_PCB ); diff --git a/pcbnew/exporters/export_footprint_associations.cpp b/pcbnew/exporters/export_footprint_associations.cpp index 4b338bf296..4923d5e716 100644 --- a/pcbnew/exporters/export_footprint_associations.cpp +++ b/pcbnew/exporters/export_footprint_associations.cpp @@ -68,10 +68,10 @@ void PCB_EDIT_FRAME::RecreateCmpFileFromBoard( wxCommandEvent& aEvent ) wxString projectDir = wxPathOnly( Prj().GetProjectFullName() ); wxFileName fn = GetBoard()->GetFileName(); - fn.SetExt( ComponentFileExtension ); + fn.SetExt( FootprintAssignmentFileExtension ); wxFileDialog dlg( this, _( "Save Footprint Association File" ), - projectDir, fn.GetFullName(), ComponentFileWildcard(), + projectDir, fn.GetFullName(), FootprintAssignmentFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); if( dlg.ShowModal() == wxID_CANCEL ) diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 1944e1f6b4..4c1c2dab65 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -317,7 +317,7 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aSrcPr // Footprints are not project-specific. Keep their source names. KiCopyFile( aSrcFilePath, destFile.GetFullPath(), aErrors ); } - else if( ext == ComponentFileExtension ) + else if( ext == FootprintAssignmentFileExtension ) { // JEY TODO }