From 40f044bd8da2e56cbf908ea343eacbe4c162821f Mon Sep 17 00:00:00 2001 From: Marco Ciampa Date: Sun, 2 Nov 2014 07:44:57 -0500 Subject: [PATCH 1/3] More renaming instances of module to footprint for consistency. --- pcbnew/autorouter/autorout.cpp | 2 +- pcbnew/autorouter/move_and_route_event_functions.cpp | 2 +- pcbnew/class_text_mod.cpp | 2 +- pcbnew/dialogs/dialog_netlist.cpp | 8 ++++---- pcbnew/exporters/gen_modules_placefile.cpp | 4 ++-- pcbnew/loadcmp.cpp | 4 ++-- pcbnew/netlist.cpp | 2 +- pcbnew/xchgmod.cpp | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pcbnew/autorouter/autorout.cpp b/pcbnew/autorouter/autorout.cpp index cc3c4720d2..32112d7c5f 100644 --- a/pcbnew/autorouter/autorout.cpp +++ b/pcbnew/autorouter/autorout.cpp @@ -95,7 +95,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode ) Module = (MODULE*) GetScreen()->GetCurItem(); if( (Module == NULL) || (Module->Type() != PCB_MODULE_T) ) { - wxMessageBox( _( "Module not selected" ) ); + wxMessageBox( _( "Footprint not selected" ) ); return; } break; diff --git a/pcbnew/autorouter/move_and_route_event_functions.cpp b/pcbnew/autorouter/move_and_route_event_functions.cpp index f2396035ea..5e9f31935c 100644 --- a/pcbnew/autorouter/move_and_route_event_functions.cpp +++ b/pcbnew/autorouter/move_and_route_event_functions.cpp @@ -136,7 +136,7 @@ void PCB_EDIT_FRAME::OnPlaceOrRouteFootprints( wxCommandEvent& event ) case ID_POPUP_PCB_SPREAD_NEW_MODULES: if( GetBoard()->m_Modules == NULL ) { - DisplayError( this, _( "No modules found!" ) ); + DisplayError( this, _( "No footprint found!" ) ); return; } diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 8eb13c4843..3d0800c7ac 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -384,7 +384,7 @@ void TEXTE_MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) }; Line = module->GetReference(); - aList.push_back( MSG_PANEL_ITEM( _( "Module" ), Line, DARKCYAN ) ); + aList.push_back( MSG_PANEL_ITEM( _( "Footprint" ), Line, DARKCYAN ) ); Line = GetShownText(); aList.push_back( MSG_PANEL_ITEM( _( "Text" ), Line, BROWN ) ); diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index ea17ac0f5a..ad6ab8653a 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -209,7 +209,7 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event ) { if( m_parent->GetBoard()->m_Modules == NULL ) { - DisplayInfoMessage( this, _( "No modules" ) ); + DisplayInfoMessage( this, _( "No footprints" ) ); return; } @@ -268,7 +268,7 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event ) // Search for missing modules on board. if( missing.size() == 0 ) - list << wxT("

") << _( "No missing modules." ) << wxT("

"); + list << wxT("

") << _( "No missing footprints." ) << wxT("

"); else { list << wxT("

") << _( "Missing:" ) << wxT("

"); @@ -287,7 +287,7 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event ) // Search for modules found on board but not in net list. if( notInNetlist.size() == 0 ) - list << wxT( "

" ) << _( "No extra modules." ) << wxT( "

" ); + list << wxT( "

" ) << _( "No extra footprints." ) << wxT( "

" ); else { list << wxT( "

" ) << _( "Not in Netlist:" ) << wxT( "

" ); @@ -319,7 +319,7 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event ) << wxT( "

" ); } - HTML_MESSAGE_BOX dlg( this, _( "Check Modules" ) ); + HTML_MESSAGE_BOX dlg( this, _( "Check footprints" ) ); dlg.AddHTML_Text( list ); dlg.ShowModal(); } diff --git a/pcbnew/exporters/gen_modules_placefile.cpp b/pcbnew/exporters/gen_modules_placefile.cpp index edcef62669..231b72c1fa 100644 --- a/pcbnew/exporters/gen_modules_placefile.cpp +++ b/pcbnew/exporters/gen_modules_placefile.cpp @@ -554,9 +554,9 @@ void PCB_EDIT_FRAME::GenFootprintsReport( wxCommandEvent& event ) wxString msg; if( success ) { - msg.Printf( _( "Module report file created:\n'%s'" ), + msg.Printf( _( "Footprint report file created:\n'%s'" ), GetChars( fn.GetFullPath() ) ); - wxMessageBox( msg, _( "Module Report" ), wxICON_INFORMATION ); + wxMessageBox( msg, _( "Footprint Report" ), wxICON_INFORMATION ); } else diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 92ce88082a..98bc26f49e 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -415,10 +415,10 @@ wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow, { wxArrayString headers; - headers.Add( _( "Module" ) ); + headers.Add( _( "Footprint" ) ); headers.Add( _( "Library" ) ); - msg.Printf( _( "Modules [%d items]" ), (int) rows.size() ); + msg.Printf( _( "Footprints [%d items]" ), (int) rows.size() ); EDA_LIST_DIALOG dlg( aWindow, msg, headers, rows, oldName, DisplayCmpDoc ); diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 364bd0d3a7..592ce504a4 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -148,7 +148,7 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName() { if( GetBoard()->m_Modules == NULL ) { - DisplayError( this, _( "No Modules" ) ); + DisplayError( this, _( "No footprints" ) ); return 0; } diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index bf9df13881..dcaea360dd 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -391,7 +391,7 @@ bool DIALOG_EXCHANGE_MODULE::Change_1_Module( MODULE* aModule, FPID oldFootprintFPID = aModule->GetFPID(); // Load module. - line.Printf( _( "Change module '%s' (from '%s') to '%s'" ), + line.Printf( _( "Change footprint '%s' (from '%s') to '%s'" ), GetChars( aModule->GetReference() ), oldFootprintFPID.Format().c_str(), aNewFootprintFPID.Format().c_str() ); @@ -519,7 +519,7 @@ void PCB_EDIT_FRAME::RecreateCmpFileFromBoard( wxCommandEvent& aEvent ) if( module == NULL ) { - DisplayError( this, _( "No Modules!" ) ); + DisplayError( this, _( "No footprints!" ) ); return; } From 322aae6a2edc840fb3e9421d00ecf859598e0184 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sun, 2 Nov 2014 08:17:48 -0500 Subject: [PATCH 2/3] Test for existence of *.sch file so Eeschema does not create a new one. --- eeschema/sheet.cpp | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index f1e9bd7db2..d902fe0111 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -36,6 +36,7 @@ #include #include +#include bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) @@ -85,7 +86,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) // Duplicate sheet names are not valid. const SCH_SHEET* sheet = GetScreen()->GetSheet( dlg.GetSheetName() ); - if( (sheet != NULL) && (sheet != aSheet) ) + if( sheet && sheet != aSheet ) { DisplayError( this, wxString::Format( _( "A sheet named \"%s\" already exists." ), GetChars( dlg.GetSheetName() ) ) ); @@ -101,29 +102,36 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) bool loadFromFile = false; SCH_SCREEN* useScreen = NULL; - wxString newFullFilename = fileName.GetFullPath(); - // Inside Eeschema, filenames are stored using unix notation - newFullFilename.Replace( wxT("\\"), wxT("/") ); + wxString newFilename = fileName.GetFullPath(); - // Search for a schematic file having the same filename exists, - // already in use in the hierarchy, or on disk, - // in order to reuse it - if( !g_RootSheet->SearchHierarchy( newFullFilename, &useScreen ) ) - loadFromFile = fileName.FileExists(); + // Search for a schematic file having the same filename + // already in use in the hierarchy or on disk, in order to reuse it. + if( !g_RootSheet->SearchHierarchy( newFilename, &useScreen ) ) + { + // if user entered a relative path, allow that to stay, but do the + // file existence test with an absolute (full) path. This transformation + // is local to this scope, but is the same one used at load time later. + wxString absolute = Prj().AbsolutePath( newFilename ); + + loadFromFile = wxFileExists( absolute ); + } + + // Inside Eeschema, filenames are stored using unix notation + newFilename.Replace( wxT("\\"), wxT("/") ); if( aSheet->GetScreen() == NULL ) // New sheet. { - if( ( useScreen != NULL ) || loadFromFile ) // Load from existing file. + if( useScreen || loadFromFile ) // Load from existing file. { if( useScreen != NULL ) { msg.Printf( _( "A file named '%s' already exists in the current schematic hierarchy." ), - GetChars( newFullFilename ) ); + GetChars( newFilename ) ); } else { msg.Printf( _( "A file named '%s' already exists." ), - GetChars( newFullFilename ) ); + GetChars( newFilename ) ); } msg += _("\n\nDo you want to create a sheet with the contents of this file?" ); @@ -139,7 +147,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) else // New file. { aSheet->SetScreen( new SCH_SCREEN( &Kiway() ) ); - aSheet->GetScreen()->SetFileName( newFullFilename ); + aSheet->GetScreen()->SetFileName( newFilename ); } } else // Existing sheet. @@ -151,24 +159,24 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) // to avoid issues under Windows, although under Unix // filenames are case sensitive. // But many users create schematic under both Unix and Windows - if( newFullFilename.CmpNoCase( aSheet->GetFileName() ) != 0 ) + if( newFilename.CmpNoCase( aSheet->GetFileName() ) != 0 ) { // Sheet file name changes cannot be undone. isUndoable = false; msg = _( "Changing the sheet file name cannot be undone. " ); - if( ( useScreen != NULL ) || loadFromFile ) // Load from existing file. + if( useScreen || loadFromFile ) // Load from existing file. { wxString tmp; if( useScreen != NULL ) { tmp.Printf( _( "A file named <%s> already exists in the current schematic hierarchy." ), - GetChars( newFullFilename ) ); + GetChars( newFilename ) ); } else { tmp.Printf( _( "A file named <%s> already exists." ), - GetChars( newFullFilename ) ); + GetChars( newFilename ) ); } msg += tmp; @@ -203,7 +211,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) if( renameFile ) { - aSheet->GetScreen()->SetFileName( newFullFilename ); + aSheet->GetScreen()->SetFileName( newFilename ); SaveEEFile( aSheet->GetScreen() ); // If the the associated screen is shared by more than one sheet, remove the @@ -217,7 +225,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) } } - aSheet->SetFileName( newFullFilename ); + aSheet->SetFileName( newFilename ); if( useScreen ) aSheet->SetScreen( useScreen ); From 24f516f6aed438e1315015bf1561f1d034cd8d78 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 2 Nov 2014 17:25:04 +0100 Subject: [PATCH 3/3] Fix many doxygen warnings (due to missing info, old comments, typo ...) when building the doxygen doc. --- Doxyfile | 2 +- common/class_bitmap_base.cpp | 2 +- common/project.cpp | 9 +- eeschema/class_library.h | 5 +- eeschema/component_tree_search_container.h | 2 +- eeschema/dialogs/dialog_plot_schematic.cpp | 4 +- .../dialogs/dialog_plot_schematic_base.cpp | 4 +- .../dialogs/dialog_plot_schematic_base.fbp | 2 +- eeschema/dialogs/dialog_plot_schematic_base.h | 2 +- eeschema/libeditframe.h | 1 + eeschema/sch_sheet_path.h | 9 +- eeschema/viewlib_frame.h | 6 +- include/colors.h | 2 +- include/common.h | 4 +- include/gal/color4d.h | 6 +- include/gal/opengl/noncached_container.h | 6 +- include/gal/opengl/vertex_container.h | 2 +- include/gal/opengl/vertex_item.h | 4 +- include/geometry/rtree.h | 1 - include/geometry/shape.h | 6 +- include/geometry/shape_index.h | 26 ++--- include/geometry/shape_line_chain.h | 2 +- include/math/matrix3x3.h | 4 +- include/painter.h | 4 +- include/profile.h | 6 +- include/project.h | 15 ++- include/richio.h | 3 +- include/sch_base_frame.h | 2 +- include/tool/tool_dispatcher.h | 2 +- include/tool/tool_manager.h | 15 +-- include/view/view.h | 8 +- include/view/view_controls.h | 2 +- include/wxunittext.h | 2 +- kicad/mainframe.cpp | 12 +-- pcbnew/class_board.h | 4 +- pcbnew/class_text_mod.cpp | 6 +- pcbnew/class_track.h | 4 +- pcbnew/class_zone.h | 4 +- pcbnew/cross-probing.cpp | 5 +- pcbnew/exporters/gendrill_Excellon_writer.h | 2 + pcbnew/files.cpp | 2 +- pcbnew/import_dxf/dialog_dxf_import.cpp | 17 ++-- pcbnew/invoke_pcb_dialog.h | 19 +++- pcbnew/router/pns_item.h | 96 +++++++++---------- pcbnew/router/pns_node.h | 49 +++++----- pcbnew/tools/edit_constraints.h | 4 +- polygon/poly2tri/sweep/sweep.h | 43 ++++----- 47 files changed, 235 insertions(+), 202 deletions(-) diff --git a/Doxyfile b/Doxyfile index 773175fcb6..b8f0de6f30 100644 --- a/Doxyfile +++ b/Doxyfile @@ -690,7 +690,7 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = include/boost +EXCLUDE = polygon/clipper.cpp # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or diff --git a/common/class_bitmap_base.cpp b/common/class_bitmap_base.cpp index c02f6c1e98..68d80e7612 100644 --- a/common/class_bitmap_base.cpp +++ b/common/class_bitmap_base.cpp @@ -1,5 +1,5 @@ /** - * @file sch_bitmap.cpp + * @file class_bitmap_base.cpp */ /* diff --git a/common/project.cpp b/common/project.cpp index 648573328a..d1b100710f 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -93,6 +93,11 @@ const wxString PROJECT::GetProjectFullName() const return m_project_name.GetFullPath(); } +const wxString PROJECT::GetProjectPath() const +{ + return m_project_name.GetPathWithSep(); +} + const wxString PROJECT::FootprintLibTblName() const { @@ -248,10 +253,10 @@ static bool copy_pro_file_template( const SEARCH_STACK& aSearchS, const wxString wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList, - const wxString& aGroupName, const wxString& aFileName ) + const wxString& aGroupName, const wxString& aProjectFileName ) { wxConfigBase* cfg = 0; - wxString cur_pro_fn = !aFileName ? GetProjectFullName() : aFileName; + wxString cur_pro_fn = !aProjectFileName ? GetProjectFullName() : aProjectFileName; if( wxFileName( cur_pro_fn ).IsFileReadable() ) { diff --git a/eeschema/class_library.h b/eeschema/class_library.h index e7462a809b..136e3670b7 100644 --- a/eeschema/class_library.h +++ b/eeschema/class_library.h @@ -121,8 +121,6 @@ public: * allocates and adds a part library to the library list. * * @param aFileName - File name object of part library. - * @param aErrorMsg - Error message if the part library failed to load. - * @return PART_LIB* - the new PART_LIB, which remains owned by this PART_LIBS container. * @throw IO_ERROR if there's any problem loading. */ PART_LIB* AddLibrary( const wxString& aFileName ) throw( IO_ERROR ); @@ -136,7 +134,8 @@ public: * @return PART_LIB* - the new PART_LIB, which remains owned by this PART_LIBS container. * @throw IO_ERROR if there's any problem loading. */ - PART_LIB* AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator ) throw( IO_ERROR ); + PART_LIB* AddLibrary( const wxString& aFileName, + PART_LIBS::iterator& aIterator ) throw( IO_ERROR ); /** * Function RemoveLibrary diff --git a/eeschema/component_tree_search_container.h b/eeschema/component_tree_search_container.h index 3ffd94f410..1d523fe1b0 100644 --- a/eeschema/component_tree_search_container.h +++ b/eeschema/component_tree_search_container.h @@ -97,7 +97,7 @@ public: /** Function GetSelectedAlias * - * @param if not-NULL, the selected sub-unit is set here. + * @param aUnit : if not NULL, the selected sub-unit is set here. * @return the selected alias or NULL if there is none, or there is no tree. */ LIB_ALIAS* GetSelectedAlias( int* aUnit ); diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp index 8dbdd51f51..47bd296df0 100644 --- a/eeschema/dialogs/dialog_plot_schematic.cpp +++ b/eeschema/dialogs/dialog_plot_schematic.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include // Keys for configuration @@ -183,8 +184,7 @@ void DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked( wxCommandEvent& even if( dialog.ShowModal() == wxID_YES ) { - wxString plotFilePath = m_parent->GetUniqueFilenameForCurrentSheet() + wxT( "." ) - + PS_PLOTTER::GetDefaultFileExtension(); + wxString plotFilePath = g_RootSheet->GetFileName(); plotFilePath = Prj().AbsolutePath(plotFilePath); plotFilePath = wxPathOnly( plotFilePath ); diff --git a/eeschema/dialogs/dialog_plot_schematic_base.cpp b/eeschema/dialogs/dialog_plot_schematic_base.cpp index cef11dbc12..d1b5fdb3a0 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 11 2014) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -28,7 +28,7 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_outputDirectoryName->SetMaxLength( 0 ); - m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the schematic file location.") ); + m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the schematic main file location.") ); bSizer5->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 ); diff --git a/eeschema/dialogs/dialog_plot_schematic_base.fbp b/eeschema/dialogs/dialog_plot_schematic_base.fbp index 86771a8252..9648366f91 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.fbp +++ b/eeschema/dialogs/dialog_plot_schematic_base.fbp @@ -247,7 +247,7 @@ 0 - Target directory for plot files. Can be absolute or relative to the schematic file location. + Target directory for plot files. Can be absolute or relative to the schematic main file location. wxFILTER_NONE wxDefaultValidator diff --git a/eeschema/dialogs/dialog_plot_schematic_base.h b/eeschema/dialogs/dialog_plot_schematic_base.h index 9c9da7cecb..39e15609b6 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.h +++ b/eeschema/dialogs/dialog_plot_schematic_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 11 2014) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h index eca4003b18..a5562c7185 100644 --- a/eeschema/libeditframe.h +++ b/eeschema/libeditframe.h @@ -431,6 +431,7 @@ private: * Any changes are updated in memory only and NOT to a file. The old component is * deleted from the library and/or any aliases before the edited component is updated * in the library. + * @param aLib - the part library where the part must be saved. * @param aPromptUser true to ask for confirmation, when the part_lib is already existing * in memory, false to save silently * @return true if the part was saved, false if aborted by user diff --git a/eeschema/sch_sheet_path.h b/eeschema/sch_sheet_path.h index 88a73a3875..365680a430 100644 --- a/eeschema/sch_sheet_path.h +++ b/eeschema/sch_sheet_path.h @@ -211,6 +211,7 @@ public: /** * Function AnnotatePowerSymbols * annotates the power symbols only starting at \a aReference in the sheet path. + * @param aLibs the library list to use * @param aReference A pointer to the number for the reference designator of the * first power symbol to be annotated. If the pointer is NULL * the annotation starts at 1. The number is incremented for @@ -221,10 +222,12 @@ public: /** * Function GetComponents * adds a SCH_REFERENCE() object to \a aReferences for each component in the sheet. + * @param aLibs the library list to use * @param aReferences List of references to populate. - * @param aIncludePowerSymbols Set to false to only get normal components. + * @param aIncludePowerSymbols : false to only get normal components. */ - void GetComponents( PART_LIBS* aLibs, SCH_REFERENCE_LIST& aReferences, bool aIncludePowerSymbols = true ); + void GetComponents( PART_LIBS* aLibs, SCH_REFERENCE_LIST& aReferences, + bool aIncludePowerSymbols = true ); /** * Function SetFootprintField @@ -391,6 +394,7 @@ public: /** * Function AnnotatePowerSymbols * clear and annotates the entire hierarchy of the sheet path list. + * @param aLib the library list to use */ void AnnotatePowerSymbols( PART_LIBS* aLib ); @@ -398,6 +402,7 @@ public: * Function GetComponents * adds a SCH_REFERENCE() object to \a aReferences for each component in the list * of sheets. + * @param aLibs the library list to use * @param aReferences List of references to populate. * @param aIncludePowerSymbols Set to false to only get normal components. */ diff --git a/eeschema/viewlib_frame.h b/eeschema/viewlib_frame.h index 2d83dcc3b5..a24b76fd2f 100644 --- a/eeschema/viewlib_frame.h +++ b/eeschema/viewlib_frame.h @@ -49,8 +49,11 @@ public: /** * Constructor + * @param aKiway + * @param aParent = the parent frame * @param aFrameType must be given either FRAME_SCH_LIB_VIEWER or * FRAME_SCH_LIB_VIEWER_MODAL + * @param aLibrary = the library to open when starting (default = NULL) */ LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, PART_LIB* aLibrary = NULL ); @@ -115,10 +118,11 @@ public: /** * Set the selected component. * - * @param the alias name of the component to be selected. + * @param aComponentName : the name of the component to be selected. */ void SetSelectedComponent( const wxString& aComponentName ); + // Accessors: void SetUnit( int aUnit ) { m_unit = aUnit; } int GetUnit( void ) { return m_unit; } diff --git a/include/colors.h b/include/colors.h index d4c415f782..9f16558a11 100644 --- a/include/colors.h +++ b/include/colors.h @@ -163,7 +163,7 @@ EDA_COLOR_T ColorFindNearest( const wxColour &aColor ); * Find the nearest color match * @param aR is the red component of the color to be matched (in range 0-255) * @param aG is the green component of the color to be matched (in range 0-255) - * @param aG is the blue component of the color to be matched (in range 0-255) + * @param aB is the blue component of the color to be matched (in range 0-255) */ EDA_COLOR_T ColorFindNearest( int aR, int aG, int aB ); diff --git a/include/common.h b/include/common.h index db96185273..af9bf1c297 100644 --- a/include/common.h +++ b/include/common.h @@ -584,8 +584,8 @@ void SystemDirsAppend( SEARCH_STACK* aSearchStack ); *

* Return the KiCad help file with path and extension. * Help files can be html (.html ext) or pdf (.pdf ext) files. - * A .html file is searched and if not found, - * .pdf file is searched in the same path. + * A \.html file is searched and if not found, + * \.pdf file is searched in the same path. * If the help file for the current locale is not found, an attempt to find * the English version of the help file is made. * Help file is searched in directories in this order: diff --git a/include/gal/color4d.h b/include/gal/color4d.h index fb4d9d9cf3..46ae899745 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -199,9 +199,9 @@ public: * Function FromHSV() * Changes currently used color to the one given by hue, saturation and value parameters. * - * @param aOutH is hue component. - * @param aOutS is saturation component. - * @param aOutV is value component. + * @param aInH is hue component. + * @param aInS is saturation component. + * @param aInV is value component. */ void FromHSV( double aInH, double aInS, double aInV ); diff --git a/include/gal/opengl/noncached_container.h b/include/gal/opengl/noncached_container.h index 07e1ca5d99..3a51e6d6b7 100644 --- a/include/gal/opengl/noncached_container.h +++ b/include/gal/opengl/noncached_container.h @@ -44,13 +44,13 @@ public: NONCACHED_CONTAINER( unsigned int aSize = defaultInitSize ); virtual ~NONCACHED_CONTAINER(); - ///< @copydoc VERTEX_CONTAINER::SetItem() + ///< @copydoc VERTEX_CONTAINER::SetItem( VERTEX_ITEM* aItem ) virtual void SetItem( VERTEX_ITEM* aItem ); - ///< @copydoc VERTEX_CONTAINER::Allocate() + ///< @copydoc VERTEX_CONTAINER::Allocate( unsigned int aSize ) virtual VERTEX* Allocate( unsigned int aSize ); - ///< @copydoc VERTEX_CONTAINER::Delete() + ///< @copydoc VERTEX_CONTAINER::Delete( VERTEX_ITEM* aItem ) void Delete( VERTEX_ITEM* aItem ) {}; ///< @copydoc VERTEX_CONTAINER::Clear() diff --git a/include/gal/opengl/vertex_container.h b/include/gal/opengl/vertex_container.h index 807731bb37..1c7b00bd66 100644 --- a/include/gal/opengl/vertex_container.h +++ b/include/gal/opengl/vertex_container.h @@ -99,7 +99,7 @@ public: /** * Function GetVertices() * returns vertices stored at the specific offset. - * @aOffset is the offset. + * @param aOffset is the offset. */ virtual inline VERTEX* GetVertices( unsigned int aOffset ) const { diff --git a/include/gal/opengl/vertex_item.h b/include/gal/opengl/vertex_item.h index 1905b9511e..3b56e35a05 100644 --- a/include/gal/opengl/vertex_item.h +++ b/include/gal/opengl/vertex_item.h @@ -50,7 +50,7 @@ public: /** * Function GetSize() * Returns information about number of vertices stored. - * @param Number of vertices. + * @return Number of vertices. */ inline unsigned int GetSize() const { @@ -69,7 +69,7 @@ public: /** * Function GetVertices() - * Returns pointer to the data used by the VERTEX_ITEM. + * areturn a pointer to the data used by the VERTEX_ITEM. */ VERTEX* GetVertices() const; diff --git a/include/geometry/rtree.h b/include/geometry/rtree.h index 40f7957421..35ccadb6e5 100644 --- a/include/geometry/rtree.h +++ b/include/geometry/rtree.h @@ -123,7 +123,6 @@ public: /// Find all within search rectangle /// \param a_min Min of search bounding rect /// \param a_max Max of search bounding rect - /// \param a_searchResult Search result array. Caller should set grow size. Function will reset, not append to array. /// \param a_resultCallback Callback function to return result. Callback should return 'true' to continue searching /// \param a_context User context to pass as parameter to a_resultCallback /// \return Returns the number of entries found diff --git a/include/geometry/shape.h b/include/geometry/shape.h index 98c8ffcd82..7ba77b671b 100644 --- a/include/geometry/shape.h +++ b/include/geometry/shape.h @@ -112,8 +112,8 @@ public: * @param aMTV minimum translation vector * @return true, if there is a collision. */ - virtual bool Collide( const SHAPE* aShape, int aClerance, VECTOR2I& aMTV ) const; - virtual bool Collide( const SHAPE* aShape, int aClerance = 0 ) const; + virtual bool Collide( const SHAPE* aShape, int aClearance, VECTOR2I& aMTV ) const; + virtual bool Collide( const SHAPE* aShape, int aClearance = 0 ) const; /** * Function Collide() @@ -129,7 +129,7 @@ public: * * Computes a bounding box of the shape, with a margin of aClearance * a collision. - * @aClearance how much the bounding box is expanded wrs to the minimum enclosing rectangle + * @param aClearance how much the bounding box is expanded wrs to the minimum enclosing rectangle * for the shape. * @return the bounding box. */ diff --git a/include/geometry/shape_index.h b/include/geometry/shape_index.h index 49b0e124f9..0c5822520f 100644 --- a/include/geometry/shape_index.h +++ b/include/geometry/shape_index.h @@ -37,7 +37,7 @@ * It is used by SHAPE_INDEX to get a SHAPE* from another type. * By default relies on T::GetShape() method, should be specialized if the T object * doesn't allow that method. - * @param object generic T object + * @param aItem generic T object * @return a SHAPE* object equivalent to object. */ template @@ -59,7 +59,7 @@ const SHAPE* shapeFunctor( SHAPE* aItem ); * It is used by SHAPE_INDEX to get the bounding box of a generic T object. * By default relies on T::BBox() method, should be specialized if the T object * doesn't allow that method. - * @param object generic T object + * @param aObject generic T object * @return a BOX2I object containing the bounding box of the T object. */ template @@ -75,8 +75,8 @@ BOX2I boundingBox( T aObject ) * It is used by SHAPE_INDEX to implement Accept(). * By default relies on V::operation() redefinition, should be specialized if V class * doesn't have its () operation defined to accept T objects. - * @param object generic T object - * @param visitor V visitor object + * @param aObject generic T object + * @param aVisitor V visitor object */ template void acceptVisitor( T aObject, V aVisitor ) @@ -91,9 +91,9 @@ void acceptVisitor( T aObject, V aVisitor ) * It is used by SHAPE_INDEX to implement Query(). * By default relies on T::Collide(U) method, should be specialized if the T object * doesn't allow that method. - * @param object generic T object - * @param anotherObject generic U object - * @param minDistance minimum collision distance + * @param aObject generic T object + * @param aAnotherObject generic U object + * @param aMinDistance minimum collision distance * @return if object and anotherObject collide */ template @@ -126,7 +126,7 @@ class SHAPE_INDEX * Function Init() * * Setup the internal tree iterator. - * @param tree pointer to a RTREE object + * @param aTree pointer to a RTREE object */ void Init( RTree* aTree ) { @@ -138,7 +138,7 @@ class SHAPE_INDEX * Iterator constructor * * Creates an iterator for the index object - * @param index SHAPE_INDEX object to iterate + * @param aIndex SHAPE_INDEX object to iterate */ Iterator( SHAPE_INDEX* aIndex ) { @@ -244,7 +244,7 @@ class SHAPE_INDEX * Function Accept() * * Accepts a visitor for every SHAPE object contained in this INDEX. - * @param visitor Visitor object to be run + * @param aVisitor Visitor object to be run */ template void Accept( V aVisitor ) @@ -271,9 +271,9 @@ class SHAPE_INDEX * Function Query() * * Runs a callback on every SHAPE object contained in the bounding box of (shape). - * @param shape shape to search against - * @param minDistance distance threshold - * @param visitor object to be invoked on every object contained in the search area. + * @param aShape shape to search against + * @param aMinDistance distance threshold + * @param aVisitor object to be invoked on every object contained in the search area. */ template int Query( const SHAPE *aShape, int aMinDistance, V& aVisitor, bool aExact ) diff --git a/include/geometry/shape_line_chain.h b/include/geometry/shape_line_chain.h index b3bd7d9c2d..8c9c549d98 100644 --- a/include/geometry/shape_line_chain.h +++ b/include/geometry/shape_line_chain.h @@ -270,7 +270,7 @@ public: * Function Collide() * * Checks if box aBox lies closer to us than aClearance. - * @param aP the box to check for collisions with + * @param aBox the box to check for collisions with * @param aClearance minimum distance that does not qualify as a collision. * @return true, when a collision has been found */ diff --git a/include/math/matrix3x3.h b/include/math/matrix3x3.h index dd27b08eac..7719cb36d5 100644 --- a/include/math/matrix3x3.h +++ b/include/math/matrix3x3.h @@ -78,12 +78,12 @@ public: * @param a00 is the component [0,0]. * @param a01 is the component [0,1]. * @param a02 is the component [0,2]. + * @param a10 is the component [1,0]. * @param a11 is the component [1,1]. * @param a12 is the component [1,2]. - * @param a13 is the component [1,3]. * @param a20 is the component [2,0]. * @param a21 is the component [2,1]. - * @param a00 is the component [2,2]. + * @param a22 is the component [2,2]. */ MATRIX3x3( T a00, T a01, T a02, T a10, T a11, T a12, T a20, T a21, T a22 ); diff --git a/include/painter.h b/include/painter.h index 3f56e1037d..a001aff2e9 100644 --- a/include/painter.h +++ b/include/painter.h @@ -133,7 +133,7 @@ public: * Function SetHighlight * Turns on/off highlighting - it may be done for the active layer or the specified net. * @param aEnabled tells if highlighting should be enabled. - * @param aNetCode is optional and if specified, turns on higlighting only for the net with + * @param aNetcode is optional and if specified, turns on higlighting only for the net with * number given as the parameter. */ inline void SetHighlight( bool aEnabled, int aNetcode = -1 ) @@ -180,7 +180,7 @@ public: /** * Function TranslateColor * Returns the color responding to the one of EDA_COLOR_T enum values. - * @param EDA_COLOR_T color equivalent. + * @param aColor equivalent. */ inline const COLOR4D& TranslateColor( EDA_COLOR_T aColor ) { diff --git a/include/profile.h b/include/profile.h index c0b1010faa..4035fcb277 100644 --- a/include/profile.h +++ b/include/profile.h @@ -68,8 +68,8 @@ struct prof_counter /** * Function prof_start * Begins code execution time counting for a given profiling counter. - * @param cnt is the counter which should be started. - * @param use_rdtsc tells if processor's time-stamp counter should be used for time counting. + * @param aCnt is the counter which should be started. + * use_rdtsc tells if processor's time-stamp counter should be used for time counting. * Otherwise is system tics method will be used. IMPORTANT: time-stamp counter should not * be used on multicore machines executing threaded code. */ @@ -81,7 +81,7 @@ static inline void prof_start( prof_counter* aCnt ) /** * Function prof_stop * Ends code execution time counting for a given profiling counter. - * @param cnt is the counter which should be stopped. + * @param aCnt is the counter which should be stopped. */ static inline void prof_end( prof_counter* aCnt ) { diff --git a/include/project.h b/include/project.h index 9683518849..c7b2a123b3 100644 --- a/include/project.h +++ b/include/project.h @@ -86,6 +86,13 @@ public: */ VTBL_ENTRY const wxString GetProjectFullName() const; + /** + * Function GetProjectPath + * returns the full path of the project. This is the path + * of the *.pro file and will always be an absolute path, ending by a dir separator. + */ + VTBL_ENTRY const wxString GetProjectPath() const; + /** * Function FootprintLibTblName * returns the path and filename of this project's fp-lib-table, @@ -98,8 +105,8 @@ public: * saves the current "project" parameters into the wxConfigBase* derivative. * Then the wxConfigBase derivative is written to the *.pro file for the project. * - * @param aSearchS a SEARCH_STACK - * @param aGroupName + * @param aSList a SEARCH_STACK + * @param aGroupName is the name of the group inside the config which contains parameters * @param aParams is a ptr vector of PARAM_CFG_BASE derivatives. * Saved parameters are the subset in this array having the .m_Setup member * set to false. @@ -258,9 +265,9 @@ private: * @param aProjectFileName is the *.pro file to open. */ wxConfigBase* configCreate( const SEARCH_STACK& aSList, - const wxString& aGroupName, const wxString& aFileName = wxEmptyString ); + const wxString& aGroupName, const wxString& aProjectFileName = wxEmptyString ); - wxFileName m_project_name; ///< /.pro + wxFileName m_project_name; ///< \/\.pro wxString m_pro_date_and_time; /// @see this::SetRString(), GetRString(), and enum RSTRING_T. diff --git a/include/richio.h b/include/richio.h index 677c1d0e7e..e3bf3bf104 100644 --- a/include/richio.h +++ b/include/richio.h @@ -58,8 +58,7 @@ int * Function StrPrintf * is like sprintf() but the output is returned in a std::string instead of to a * character array. - * @param aResult is the string to append to, previous text is not clear()ed. - * @param aFormat is a printf() style format string. + * @param format is a printf() style format string. * @return std::string - the result of the sprintf(). */ std::string diff --git a/include/sch_base_frame.h b/include/sch_base_frame.h index 0172b6e17e..38fa98d037 100644 --- a/include/sch_base_frame.h +++ b/include/sch_base_frame.h @@ -107,7 +107,7 @@ protected: * Calls the library viewer to select component to import into schematic. * if the library viewer is currently running, it is closed and reopened * in modal mode. - * @param aPreslectedAlias Preselected component alias. NULL if none. + * @param aPreselectedAlias Preselected component alias. NULL if none. * @param aUnit Pointer to Unit-number. Input is the pre-selected unit, output * is the finally selected unit by the user. Can be NULL. * @param aConvert Pointer to deMorgan conversion. Input is what is pre-selected, diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index 8a7289e56c..ef673b2792 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -54,9 +54,9 @@ public: * Constructor * * @param aToolMgr: tool manager instance the events will be sent to - * @param aEditFrame: the frame wx events come from */ TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr ); + virtual ~TOOL_DISPATCHER(); /** diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index e5d4ce9458..9e2dfdee50 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -252,11 +252,12 @@ public: /** * Sets behaviour of the tool's context popup menu. + * @param aTool - the parent tool * @param aMenu - the menu structure, defined by the tool * @param aTrigger - when the menu is activated: - * CMENU_NOW: opens the menu right now - * CMENU_BUTTON: opens the menu when RMB is pressed - * CMENU_OFF: menu is disabled. + * CMENU_NOW: opens the menu right now + * CMENU_BUTTON: opens the menu when RMB is pressed + * CMENU_OFF: menu is disabled. * May be called from a coroutine context. */ void ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, @@ -309,7 +310,7 @@ private: /** * Function dispatchStandardEvents() * Handles specific events, that are intended for TOOL_MANAGER rather than tools. - * @aEvent is the event to be processed. + * @param aEvent is the event to be processed. * @return False if the event was processed and should not go any further. */ bool dispatchStandardEvents( TOOL_EVENT& aEvent ); @@ -350,7 +351,7 @@ private: * Makes a tool active, so it can receive events and react to them. Activated tool is pushed * on the active tools stack, so the last activated tool receives events first. * - * @param aToolId is the name of tool to be run. + * @param aName is the name of tool to be run. */ bool runTool( const std::string& aName ); @@ -359,7 +360,7 @@ private: * Makes a tool active, so it can receive events and react to them. Activated tool is pushed * on the active tools stack, so the last activated tool receives events first. * - * @param aToolId is the tool to be run. + * @param aTool is the tool to be run. */ bool runTool( TOOL_BASE* aTool ); @@ -379,7 +380,7 @@ private: * Returns information about a tool registration status. * * @param aTool is the tool to be checked. - * @return True if the tool is in the registered tools list, false otherwise. + * @return true if the tool is in the registered tools list, false otherwise. */ bool isRegistered( TOOL_BASE* aTool ) const { diff --git a/include/view/view.h b/include/view/view.h index 57e7a8bf3f..844f72bd2c 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -65,7 +65,6 @@ public: /** * Constructor. * @param aIsDynamic decides whether we are creating a static or a dynamic VIEW. - * @param aUseGroups tells if items added to the VIEW should be stored in groups. */ VIEW( bool aIsDynamic = true ); @@ -192,6 +191,7 @@ public: * Function SetScale() * Sets the scaling factor, zooming around a given anchor point. * (depending on correct GAL unit length & DPI settings). + * @param aAnchor: the zooming anchor point * @param aScale: the scale factor */ void SetScale( double aScale, const VECTOR2D& aAnchor ); @@ -235,7 +235,7 @@ public: * Function ToWorld() * Converts a screen space one dimensional size to a one dimensional size in world * space coordinates. - * @param aCoord: the size to be converted + * @param aSize : the size to be converted */ double ToWorld( double aSize ) const; @@ -383,7 +383,7 @@ public: * Enables or disables display of the top layer. When disabled - layers are rendered as usual * with no influence from SetTopLayer function. Otherwise on the top there is displayed the * layer set previously with SetTopLayer function. - * @param aEnabled: whether to enable or disable display of the top layer. + * @param aEnable whether to enable or disable display of the top layer. */ void EnableTopLayer( bool aEnable ); @@ -574,7 +574,7 @@ private: * Function draw() * Draws a group of items on all layers that those items use. * - * @param aItem is the group to be drawn. + * @param aGroup is the group to be drawn. * @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode * for cached items. */ diff --git a/include/view/view_controls.h b/include/view/view_controls.h index 90fecd9ef9..a2770df7e8 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -125,7 +125,7 @@ public: /** * Function SetAutoPanMArgin() * Sets margin for autopanning (ie. the area when autopanning becomes active). - * @param aSpeed is a new margin for autopanning. + * @param aMargin is a new margin for autopanning. */ virtual void SetAutoPanMargin( float aMargin ) { diff --git a/include/wxunittext.h b/include/wxunittext.h index 54c52e14dc..f86d4aa55b 100644 --- a/include/wxunittext.h +++ b/include/wxunittext.h @@ -68,7 +68,7 @@ public: */ virtual void SetValue( double aValue ); - /** + /* * Function GetValue * Returns the current value using specified units (if currently used units are different, then * they are converted first). diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 986871678c..a79f78431d 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -42,7 +42,7 @@ #include -#define TreeFrameWidthEntry wxT( "LeftWinWidth" ) +#define TREE_FRAME_WIDTH_ENTRY wxT( "LeftWinWidth" ) KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, @@ -440,13 +440,11 @@ void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) #include void KICAD_MANAGER_FRAME::OnRunGerbview( wxCommandEvent& event ) { - // Gerbview is called without any file to open, because we do not know // the list and the name of files to open (if any...). // however we run it in the path of the project - wxFileName fn( GetProjectFileName() ); wxString cwd = wxGetCwd(); - wxSetWorkingDirectory( fn.GetPathWithSep() ); + wxSetWorkingDirectory( Prj().GetProjectPath() ); Execute( this, GERBVIEW_EXE, wxEmptyString ); wxSetWorkingDirectory( cwd ); } @@ -470,7 +468,7 @@ void KICAD_MANAGER_FRAME::OnOpenFileInTextEditor( wxCommandEvent& event ) #endif mask = _( "Text file (" ) + mask + wxT( ")|" ) + mask; - wxString default_dir = wxFileName( Prj().GetProjectFullName() ).GetPathWithSep(); + wxString default_dir = Prj().GetProjectPath(); wxFileDialog dlg( this, _( "Load File to Edit" ), default_dir, wxEmptyString, mask, wxFD_OPEN ); @@ -509,14 +507,14 @@ void KICAD_MANAGER_FRAME::ClearMsg() void KICAD_MANAGER_FRAME::LoadSettings( wxConfigBase* aCfg ) { EDA_BASE_FRAME::LoadSettings( aCfg ); - aCfg->Read( TreeFrameWidthEntry, &m_leftWinWidth ); + aCfg->Read( TREE_FRAME_WIDTH_ENTRY, &m_leftWinWidth ); } void KICAD_MANAGER_FRAME::SaveSettings( wxConfigBase* aCfg ) { EDA_BASE_FRAME::SaveSettings( aCfg ); - aCfg->Write( TreeFrameWidthEntry, m_LeftWin->GetSize().x ); + aCfg->Write( TREE_FRAME_WIDTH_ENTRY, m_LeftWin->GetSize().x ); } diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 3cc7c35731..f25da375bb 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -651,8 +651,8 @@ public: * GetLayerName() if want the layer names of a specific BOARD, which could * be different than the default if the user has renamed any copper layers. * - * @param aLayerNumber is the layer number to fetch - * @return const wxString - containing the layer name or "BAD INDEX" if aLayerNumber + * @param aLayerId is the layer identifier (index) to fetch + * @return const wxString - containing the layer name or "BAD INDEX" if aLayerId * is not legal */ static const wxString GetStandardLayerName( LAYER_ID aLayerId ) diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 3d0800c7ac..645877f8aa 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -254,11 +254,9 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode, if( panel == NULL ) return; - MODULE* module = static_cast( m_Parent ); - - /* parent must *not* be NULL (a module text without a footprint + /* parent must *not* be NULL (a footprint text without a footprint parent has no sense) */ - wxASSERT( module ); + wxASSERT( m_Parent ); BOARD* brd = GetBoard( ); diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index c658395ee4..8347deedde 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -398,8 +398,8 @@ public: * Function SetLayerPair * For a via m_Layer contains the top layer, the other layer is in * m_BottomLayer - * @param top_layer = first layer connected by the via - * @param bottom_layer = last layer connected by the via + * @param aTopLayer = first layer connected by the via + * @param aBottomLayer = last layer connected by the via */ void SetLayerPair( LAYER_ID aTopLayer, LAYER_ID aBottomLayer ); diff --git a/pcbnew/class_zone.h b/pcbnew/class_zone.h index 332e3c5141..d2dd9ea6b6 100644 --- a/pcbnew/class_zone.h +++ b/pcbnew/class_zone.h @@ -235,7 +235,7 @@ public: /** * Function HitTest * tests if a point is near an outline edge or a corner of this zone. - * @param aRefPos A wxPoint to test + * @param aPosition the wxPoint to test * @return bool - true if a hit, else false */ virtual bool HitTest( const wxPoint& aPosition ) const; @@ -244,7 +244,7 @@ public: * Function HitTest * tests if a point is inside the zone area, i.e. inside the main outline * and outside holes. - * @param aRefPos A wxPoint to test + * @param aPosition : the wxPoint to test * @return bool - true if a hit, else false */ bool HitTestInsideZone( const wxPoint& aPosition ) const diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index d227511f6c..e09da9d899 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -183,9 +183,8 @@ std::string FormatProbeItem( BOARD_ITEM* aItem ) } -/** - * Send a remote command to Eeschema via a socket, - * @param objectToSync = item to be located on schematic (module, pin or text) +/* Send a remote command to Eeschema via a socket, + * aSyncItem = item to be located on schematic (module, pin or text) * Commands are * $PART: "reference" put cursor on component anchor * $PART: "reference" $PAD: "pad number" put cursor on the component pin diff --git a/pcbnew/exporters/gendrill_Excellon_writer.h b/pcbnew/exporters/gendrill_Excellon_writer.h index ff2901975f..bcdcec661e 100644 --- a/pcbnew/exporters/gendrill_Excellon_writer.h +++ b/pcbnew/exporters/gendrill_Excellon_writer.h @@ -181,6 +181,7 @@ public: * @param aMirror = true to create mirrored coordinates (Y coordinates negated) * @param aMinimalHeader = true to use a minimal header (no comments, no info) * @param aOffset = drill coordinates offset + * @param aMergePTHNPTH : true to create only one list which contains both PTH and NPTH */ void SetOptions( bool aMirror, bool aMinimalHeader, wxPoint aOffset, bool aMergePTHNPTH ) { @@ -202,6 +203,7 @@ public: * @param aGenerateNPTH_list : * true to create NPTH only list (with no plated holes) * false to created plated holes list (with no NPTH ) + * @param aMergePTHNPTH : true to create only one list which contains both PTH and NPTH */ void BuildHolesList( int aFirstLayer, int aLastLayer, bool aExcludeThroughHoles, diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 208ad446c1..4d8be1e126 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -143,7 +143,7 @@ bool AskLoadBoardFileName( wxWindow* aParent, int* aCtl, wxString* aFileName, bo * puts up a wxFileDialog asking for a BOARD filename to save. * * @param aParent is a wxFrame passed to wxFileDialog. - * @param aFullFileName on entry is a probable choice, on return is the + * @param aFileName on entry is a probable choice, on return is the * chosen full filename (includes path). * * @return bool - true if chosen, else false if user aborted. diff --git a/pcbnew/import_dxf/dialog_dxf_import.cpp b/pcbnew/import_dxf/dialog_dxf_import.cpp index 5f9ff5acf1..f0cf1486e2 100644 --- a/pcbnew/import_dxf/dialog_dxf_import.cpp +++ b/pcbnew/import_dxf/dialog_dxf_import.cpp @@ -206,16 +206,17 @@ bool InvokeDXFDialogBoardImport( PCB_BASE_FRAME* aCaller ) bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule ) { + wxASSERT( aModule ); + DIALOG_DXF_IMPORT dlg( aCaller ); bool success = ( dlg.ShowModal() == wxID_OK ); if( success ) { const std::list& list = dlg.GetImportedItems(); - MODULE* module = aCaller->GetBoard()->m_Modules; KIGFX::VIEW* view = aCaller->GetGalCanvas()->GetView(); - aCaller->SaveCopyInUndoList( module, UR_MODEDIT ); + aCaller->SaveCopyInUndoList( aModule, UR_MODEDIT ); aCaller->OnModify(); std::list::const_iterator it, itEnd; @@ -230,9 +231,9 @@ bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule ) { case PCB_LINE_T: { - converted = new EDGE_MODULE( module ); + converted = new EDGE_MODULE( aModule ); *static_cast( converted ) = *static_cast( item ); - module->Add( converted ); + aModule->Add( converted ); static_cast( converted )->SetLocalCoord(); delete item; break; @@ -240,20 +241,20 @@ bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule ) case PCB_TEXT_T: { - converted = new TEXTE_MODULE( module ); + converted = new TEXTE_MODULE( aModule ); *static_cast( converted ) = *static_cast( item ); - module->Add( module ); + aModule->Add( converted ); static_cast( converted )->SetLocalCoord(); delete item; break; } default: - assert( false ); // there is a type that is currently not handled here + wxLogDebug( wxT( "type %d currently not handled" ), item->Type() ); break; } - if( aCaller->IsGalCanvasActive() ) + if( aCaller->IsGalCanvasActive() && converted ) view->Add( converted ); } } diff --git a/pcbnew/invoke_pcb_dialog.h b/pcbnew/invoke_pcb_dialog.h index 5f264ca000..89d5bb5ef4 100644 --- a/pcbnew/invoke_pcb_dialog.h +++ b/pcbnew/invoke_pcb_dialog.h @@ -64,6 +64,10 @@ class PCB_PLOT_PARAMS; * Function InvokePcbLibTableEditor * shows the modal DIALOG_FP_LIB_TABLE for purposes of editing two lib tables. * + * @param aCaller is the wxTopLevelWindow which is invoking the dialog. + * @param aGlobal is the common footprint library table file being edited. + * @param aProject is the project specific footprint library table file being edited. + * * @return int - bits 0 and 1 tell whether a change was made to the @a aGlobal * and/or the @a aProject table, respectively. If set, table was modified. */ @@ -76,7 +80,7 @@ int InvokePcbLibTableEditor( wxTopLevelWindow* aCaller, FP_LIB_TABLE* aGlobal, F * @param aCaller is the wxTopLevelWindow which is invoking the dialog. * @param aNickname is the footprint library whose options are being edited. * @param aPluginType is something that will pass through IO_MGR::EnumFromStr(). - * @param aOptionsIn is the options string on calling into this function. + * @param aOptions is the options string on calling into this function. * @param aResult is where to put the result of the editing. */ void InvokePluginOptionsEditor( wxTopLevelWindow* aCaller, const wxString& aNickname, @@ -93,9 +97,10 @@ bool InvokeDXFDialogBoardImport( PCB_BASE_FRAME* aCaller ); /** * Function InvokeDXFDialogModuleImport - * shows the modal DIALOG_DXF_IMPORT for importing a DXF file.to a module. + * shows the modal DIALOG_DXF_IMPORT for importing a DXF file as footprint outlines. * * @param aCaller is the wxTopLevelWindow which is invoking the dialog. + * @param aModule is the footprint currently edited. * @return true if the import was made. */ bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule ); @@ -103,10 +108,20 @@ bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule ); /** * Function InvokeLayerSetup * shows the layer setup dialog + * @param aCaller is the wxTopLevelWindow which is invoking the dialog. + * @param aBoard is the currently edited board. * @return bool - true if user pressed OK (did not abort), else false. */ bool InvokeLayerSetup( wxTopLevelWindow* aCaller, BOARD* aBoard ); +/** + * Function InvokeSVGPrint + * shows the SVG print dialog + * @param aCaller is the wxTopLevelWindow which is invoking the dialog. + * @param aBoard is the currently edited board. + * @param aSettings is the current pcb plot parameters. + * @return bool - true if user pressed OK (did not abort), else false. + */ bool InvokeSVGPrint( wxTopLevelWindow* aCaller, BOARD* aBoard, PCB_PLOT_PARAMS* aSettings ); #endif // INVOKE_A_DIALOG_H_ diff --git a/pcbnew/router/pns_item.h b/pcbnew/router/pns_item.h index cf1e24b1c6..7e4333052e 100644 --- a/pcbnew/router/pns_item.h +++ b/pcbnew/router/pns_item.h @@ -89,7 +89,7 @@ public: /** * Function Clone() * - * Returns a deep copy of the item + * Returns a deep copy of the item */ virtual PNS_ITEM* Clone() const = 0; @@ -111,17 +111,17 @@ public: * * Returns the type (kind) of the item */ - PnsKind Kind() const - { + PnsKind Kind() const + { return m_kind; } - + /** * Function OfKind() * * Returns true if the item's type matches the mask aKindMask. */ - bool OfKind( int aKindMask ) const + bool OfKind( int aKindMask ) const { return ( aKindMask & m_kind ) != 0; } @@ -138,19 +138,19 @@ public: * * Sets the corresponding parent object in the host application's model. */ - void SetParent( BOARD_CONNECTED_ITEM* aParent ) + void SetParent( BOARD_CONNECTED_ITEM* aParent ) { m_parent = aParent; } - + /** * Function Parent() * * Returns the corresponding parent object in the host application's model. */ - BOARD_CONNECTED_ITEM* Parent() const - { - return m_parent; + BOARD_CONNECTED_ITEM* Parent() const + { + return m_parent; } /** @@ -158,9 +158,9 @@ public: * * Sets the item's net to aNet */ - void SetNet( int aNet ) - { - m_net = aNet; + void SetNet( int aNet ) + { + m_net = aNet; } /** @@ -168,9 +168,9 @@ public: * * Returns the item's net. */ - int Net() const - { - return m_net; + int Net() const + { + return m_net; } /** @@ -178,11 +178,11 @@ public: * * Sets the layers spanned by the item to aLayers. */ - void SetLayers( const PNS_LAYERSET& aLayers ) - { - m_layers = aLayers; + void SetLayers( const PNS_LAYERSET& aLayers ) + { + m_layers = aLayers; } - + /** * Function SetLayer() * @@ -193,23 +193,23 @@ public: m_layers = PNS_LAYERSET( aLayer, aLayer ); } - /** + /** * Function Layers() * * Returns the contiguous set of layers spanned by the item. */ - const PNS_LAYERSET& Layers() const - { - return m_layers; + const PNS_LAYERSET& Layers() const + { + return m_layers; } - + /** * Function Layer() * * Returns the item's layer, for single-layered items only. */ virtual int Layer() const - { + { return Layers().Start(); } @@ -227,27 +227,27 @@ public: /** * Functon SetOwner() * - * Sets the node that owns this item. An item can belong to a single + * Sets the node that owns this item. An item can belong to a single * PNS_NODE or stay unowned. */ - void SetOwner( PNS_NODE* aOwner ) - { - m_owner = aOwner; + void SetOwner( PNS_NODE* aOwner ) + { + m_owner = aOwner; } - + /** * Function BelongsTo() * - * Returns true if the item is owned by the node aNode. + * @return true if the item is owned by the node aNode. */ - bool BelongsTo( PNS_NODE* aNode ) const - { - return m_owner == aNode; + bool BelongsTo( PNS_NODE* aNode ) const + { + return m_owner == aNode; } - + /** * Function Owner() - * + * * Returns the owner of this item, or NULL if there's none. */ PNS_NODE* Owner() const { return m_owner; } @@ -255,7 +255,7 @@ public: /** * Function Collide() * - * Checks for a collision (clearance violation) with between us and item aOther. + * Checks for a collision (clearance violation) with between us and item aOther. * Collision checking takes all PCB stuff into accound (layers, nets, DRC rules). * Optionally returns a minimum translation vector for force propagation * algorithm. @@ -264,7 +264,7 @@ public: * @param aClearance desired clearance * @param aNeedMTV when true, the minimum translation vector is calculated * @param aMTV the minimum translation vector - * @param true, if a collision was found. + * @return true, if a collision was found. */ virtual bool Collide( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const; @@ -292,17 +292,17 @@ public: return NULL; } - virtual void Mark(int aMarker) + virtual void Mark(int aMarker) { m_marker = aMarker; } - virtual void Unmark () + virtual void Unmark () { m_marker = 0; } - virtual int Marker() const + virtual int Marker() const { return m_marker; } @@ -312,19 +312,19 @@ public: m_rank = aRank; } - virtual int Rank() const + virtual int Rank() const { return m_rank; } virtual VECTOR2I Anchor( int n ) const - { + { return VECTOR2I (); } - - virtual int AnchorCount() const - { - return 0; + + virtual int AnchorCount() const + { + return 0; } private: diff --git a/pcbnew/router/pns_node.h b/pcbnew/router/pns_node.h index 93d590195c..13e1672f6a 100644 --- a/pcbnew/router/pns_node.h +++ b/pcbnew/router/pns_node.h @@ -99,7 +99,7 @@ public: typedef boost::optional OPT_OBSTACLE; typedef std::vector ITEM_VECTOR; typedef std::vector OBSTACLES; - + PNS_NODE (); ~PNS_NODE (); @@ -131,12 +131,12 @@ public: } ///> Returns the number of nodes in the inheritance chain (wrs to the root node) - int Depth() const + int Depth() const { return m_depth; } - /** + /** * Function QueryColliding() * * Finds items collliding (closer than clearance) with the item aItem. @@ -150,7 +150,7 @@ public: OBSTACLES& aObstacles, int aKindMask = PNS_ITEM::ANY, int aLimitCount = -1 ); - + /** * Function NearestObstacle() * @@ -163,7 +163,7 @@ public: OPT_OBSTACLE NearestObstacle( const PNS_LINE* aItem, int aKindMask = PNS_ITEM::ANY ); - /** + /** * Function CheckColliding() * * Checks if the item collides with anything else in the world, @@ -174,9 +174,9 @@ public: */ OPT_OBSTACLE CheckColliding( const PNS_ITEM* aItem, int aKindMask = PNS_ITEM::ANY ); - - /** + + /** * Function CheckColliding() * * Checks if any item in the set collides with anything else in the world, @@ -189,12 +189,13 @@ public: int aKindMask = PNS_ITEM::ANY ); - /** + /** * Function CheckColliding() * - * Checks if any item in the set collides with anything else in the world, + * Checks if 2 items collide. * and if found, returns the obstacle. - * @param aSet set of items to find collisions with + * @param aItemA first item to find collisions with + * @param aItemB second item to find collisions with * @param aKindMask mask of obstacle types to take into account * @return the obstacle, if found, otherwise empty. */ @@ -202,7 +203,7 @@ public: const PNS_ITEM* aItemB, int aKindMask = PNS_ITEM::ANY ); - /** + /** * Function HitTest() * * Finds all items that contain the point aPoint. @@ -214,22 +215,22 @@ public: /** * Function Add() * - * Adds an item to the current node. + * Adds an item to the current node. * @param aItem item to add - * @param aAllowRedundant if true, duplicate items are allowed (e.g. a segment or via + * @param aAllowRedundant if true, duplicate items are allowed (e.g. a segment or via * at the same coordinates as an existing one) */ void Add( PNS_ITEM* aItem, bool aAllowRedundant = false ); - - /** + + /** * Function Remove() * * Just as the name says, removes an item from this branch. * @param aItem item to remove */ void Remove( PNS_ITEM* aItem ); - - /** + + /** * Function Replace() * * Just as the name says, replaces an item with another one. @@ -248,10 +249,10 @@ public: */ PNS_NODE* Branch(); - /** + /** * Function AssembleLine() * - * Follows the joint map to assemble a line connecting two non-trivial + * Follows the joint map to assemble a line connecting two non-trivial * joints starting from segment aSeg. * @param aSeg the initial segment * @param aOriginSegmentIndex index of aSeg in the resulting line @@ -271,7 +272,7 @@ public: * @param aAdded added items */ void GetUpdatedItems( ITEM_VECTOR& aRemoved, ITEM_VECTOR& aAdded ); - + /** * Function Commit() * @@ -313,14 +314,14 @@ public: ///> finds the joints corresponding to the ends of line aLine void FindLineEnds( PNS_LINE* aLine, PNS_JOINT& aA, PNS_JOINT& aB ); - + ///> Destroys all child nodes. Applicable only to the root node. void KillChildren(); void AllItemsInNet( int aNet, std::set& aItems ); - + void ClearRanks(); - + int FindByMarker( int aMarker, PNS_ITEMSET& aItems ); int RemoveByMarker( int aMarker ); @@ -334,7 +335,7 @@ private: PNS_NODE& operator=( const PNS_NODE& aB ); ///> tries to find matching joint and creates a new one if not found - PNS_JOINT& touchJoint( const VECTOR2I& aPos, + PNS_JOINT& touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet ); diff --git a/pcbnew/tools/edit_constraints.h b/pcbnew/tools/edit_constraints.h index 6df17e438d..a1744d36db 100644 --- a/pcbnew/tools/edit_constraints.h +++ b/pcbnew/tools/edit_constraints.h @@ -184,8 +184,8 @@ public: * Constructor. * * @param aConstrained is the point that is put under constrain. - * @parama aCenter is the point that is the center of the circle. - * @parama aEnd is the point that decides on the radius of the circle. + * @param aCenter is the point that is the center of the circle. + * @param aEnd is the point that decides on the radius of the circle. */ EC_CIRCLE( EDIT_POINT& aConstrained, const EDIT_POINT& aCenter, const EDIT_POINT& aEnd ) : EDIT_CONSTRAINT( aConstrained ), m_center( aCenter ), m_end( aEnd ) diff --git a/polygon/poly2tri/sweep/sweep.h b/polygon/poly2tri/sweep/sweep.h index f62c4cc3f2..07822d1f65 100644 --- a/polygon/poly2tri/sweep/sweep.h +++ b/polygon/poly2tri/sweep/sweep.h @@ -49,17 +49,17 @@ struct Point; struct Edge; class Triangle; -class Sweep +class Sweep { public: /** * Triangulate - * + * * @param tcx */ void Triangulate(SweepContext& tcx); - + /** * Destructor - clean up memory */ @@ -69,7 +69,7 @@ private: /** * Start sweeping the Y-sorted point set from bottom to top - * + * * @param tcx */ void SweepPoints(SweepContext& tcx); @@ -86,8 +86,8 @@ private: Node& PointEvent(SweepContext& tcx, Point& point); /** - * - * + * + * * @param tcx * @param edge * @param node @@ -98,7 +98,7 @@ private: /** * Creates a new front triangle and legalize it - * + * * @param tcx * @param point * @param node @@ -136,10 +136,10 @@ private: * a,b and c
* d is outside B if orient2d(a,b,d) or orient2d(c,a,d) is CW
* This preknowledge gives us a way to optimize the incircle test - * @param a - triangle point, opposite d - * @param b - triangle point - * @param c - triangle point - * @param d - point opposite a + * @param pa - triangle point, opposite d + * @param pb - triangle point + * @param pc - triangle point + * @param pd - point opposite a * @return true if d is inside circle, false if on circle edge */ bool Incircle(Point& pa, Point& pb, Point& pc, Point& pd); @@ -168,8 +168,8 @@ private: * @param n */ void FillAdvancingFront(SweepContext& tcx, Node& n); - - // Decision-making about when to Fill hole. + + // Decision-making about when to Fill hole. // Contributed by ToolmakerSteve2 bool LargeHole_DontFill(Node* node); bool AngleExceeds90Degrees(Point* origin, Point* pa, Point* pb); @@ -204,7 +204,6 @@ private: * * @param tcx * @param node - bottom_node - * @param cnt - counter used to alternate on even and odd numbers */ void FillBasinReq(SweepContext& tcx, Node* node); @@ -235,22 +234,22 @@ private: /** * After a flip we have two triangles and know that only one will still be * intersecting the edge. So decide which to contiune with and legalize the other - * + * * @param tcx * @param o - should be the result of an orient2d( eq, op, ep ) * @param t - triangle 1 * @param ot - triangle 2 - * @param p - a point shared by both triangles + * @param p - a point shared by both triangles * @param op - another point shared by both triangles * @return returns the triangle still intersecting the edge */ Triangle& NextFlipTriangle(SweepContext& tcx, int o, Triangle& t, Triangle& ot, Point& p, Point& op); /** - * When we need to traverse from one triangle to the next we need + * When we need to traverse from one triangle to the next we need * the point in current triangle that is the opposite point to the next - * triangle. - * + * triangle. + * * @param ep * @param eq * @param ot @@ -261,10 +260,10 @@ private: /** * Scan part of the FlipScan algorithm
- * When a triangle pair isn't flippable we will scan for the next - * point that is inside the flip triangle scan area. When found + * When a triangle pair isn't flippable we will scan for the next + * point that is inside the flip triangle scan area. When found * we generate a new flipEdgeEvent - * + * * @param tcx * @param ep - last point on the edge we are traversing * @param eq - first point on the edge we are traversing