diff --git a/3d-viewer/3d_rendering/opengl/create_scene.cpp b/3d-viewer/3d_rendering/opengl/create_scene.cpp index 7c222e7216..0ed0f88bea 100644 --- a/3d-viewer/3d_rendering/opengl/create_scene.cpp +++ b/3d-viewer/3d_rendering/opengl/create_scene.cpp @@ -33,7 +33,7 @@ #include // To use GetRunningMicroSecs or another profiling utility #include #include -#include +#include void RENDER_3D_OPENGL::addObjectTriangles( const FILLED_CIRCLE_2D* aCircle, @@ -937,7 +937,7 @@ void RENDER_3D_OPENGL::load3dModels( REPORTER* aStatusReporter ) { // FindRow() can throw an exception const FP_LIB_TABLE_ROW* fpRow = - PROJECT_PCBNEW::PcbFootprintLibs( m_boardAdapter.GetBoard()->GetProject() ) + PROJECT_PCB::PcbFootprintLibs( m_boardAdapter.GetBoard()->GetProject() ) ->FindRow( libraryName, false ); if( fpRow ) diff --git a/3d-viewer/3d_rendering/raytracing/create_scene.cpp b/3d-viewer/3d_rendering/raytracing/create_scene.cpp index 47185b82d4..08be15b13b 100644 --- a/3d-viewer/3d_rendering/raytracing/create_scene.cpp +++ b/3d-viewer/3d_rendering/raytracing/create_scene.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include // To use GetRunningMicroSecs or another profiling utility @@ -1259,7 +1259,7 @@ void RENDER_3D_RAYTRACE::load3DModels( CONTAINER_3D& aDstContainer, bool aSkipMa { // FindRow() can throw an exception const FP_LIB_TABLE_ROW* fpRow = - PROJECT_PCBNEW::PcbFootprintLibs( m_boardAdapter.GetBoard()->GetProject() ) + PROJECT_PCB::PcbFootprintLibs( m_boardAdapter.GetBoard()->GetProject() ) ->FindRow( libraryName, false ); if( fpRow ) diff --git a/3d-viewer/3d_viewer/eda_3d_viewer_frame.cpp b/3d-viewer/3d_viewer/eda_3d_viewer_frame.cpp index 5d1649b62a..e50788fd17 100644 --- a/3d-viewer/3d_viewer/eda_3d_viewer_frame.cpp +++ b/3d-viewer/3d_viewer/eda_3d_viewer_frame.cpp @@ -56,7 +56,7 @@ #include #include #include -#include +#include #include <3d_navlib/nl_3d_viewer_plugin.h> @@ -118,7 +118,7 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent m_canvas = new EDA_3D_CANVAS( this, OGL_ATT_LIST::GetAttributesList( aaMode ), m_boardAdapter, m_currentCamera, - PROJECT_PCBNEW::Get3DCacheManager( &Prj() ) ); + PROJECT_PCB::Get3DCacheManager( &Prj() ) ); m_appearancePanel = new APPEARANCE_CONTROLS_3D( this, GetCanvas() ); @@ -393,14 +393,14 @@ void EDA_3D_VIEWER_FRAME::ReloadRequest() // This will schedule a request to load later if( m_canvas ) - m_canvas->ReloadRequest( GetBoard(), PROJECT_PCBNEW::Get3DCacheManager( &Prj() ) ); + m_canvas->ReloadRequest( GetBoard(), PROJECT_PCB::Get3DCacheManager( &Prj() ) ); } void EDA_3D_VIEWER_FRAME::NewDisplay( bool aForceImmediateRedraw ) { if( m_canvas ) - m_canvas->ReloadRequest( GetBoard(), PROJECT_PCBNEW::Get3DCacheManager( &Prj() ) ); + m_canvas->ReloadRequest( GetBoard(), PROJECT_PCB::Get3DCacheManager( &Prj() ) ); // After the ReloadRequest call, the refresh often takes a bit of time, // and it is made here only on request. diff --git a/3d-viewer/dialogs/panel_preview_3d_model.cpp b/3d-viewer/dialogs/panel_preview_3d_model.cpp index 4921d836f0..49ab0286a3 100644 --- a/3d-viewer/dialogs/panel_preview_3d_model.cpp +++ b/3d-viewer/dialogs/panel_preview_3d_model.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -123,7 +123,7 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM // Create the 3D canvas m_previewPane = new EDA_3D_CANVAS( this, OGL_ATT_LIST::GetAttributesList( ANTIALIASING_MODE::AA_8X ), - m_boardAdapter, m_currentCamera, PROJECT_PCBNEW::Get3DCacheManager( &aFrame->Prj() ) ); + m_boardAdapter, m_currentCamera, PROJECT_PCB::Get3DCacheManager( &aFrame->Prj() ) ); m_boardAdapter.SetBoard( m_dummyBoard ); m_boardAdapter.m_IsBoardView = false; diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 5d73d1558f..ad1856a2c5 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -652,7 +652,7 @@ set( PCB_COMMON_SRCS ${CMAKE_SOURCE_DIR}/pcbnew/pcb_field.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_text.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_textbox.cpp - ${CMAKE_SOURCE_DIR}/pcbnew/project_pcbnew.cpp + ${CMAKE_SOURCE_DIR}/pcbnew/project_pcb.cpp ${CMAKE_SOURCE_DIR}/pcbnew/board_stackup_manager/board_stackup.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_track.cpp ${CMAKE_SOURCE_DIR}/pcbnew/zone.cpp diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp index 7f908c8a08..caacd54124 100644 --- a/cvpcb/cvpcb_mainframe.cpp +++ b/cvpcb/cvpcb_mainframe.cpp @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include @@ -863,7 +863,7 @@ void CVPCB_MAINFRAME::DisplayStatus() } // Extract the library information - FP_LIB_TABLE* fptbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* fptbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); if( fptbl->HasLibrary( lib ) ) msg = wxString::Format( _( "Library location: %s" ), fptbl->GetFullURI( lib ) ); @@ -876,7 +876,7 @@ void CVPCB_MAINFRAME::DisplayStatus() bool CVPCB_MAINFRAME::LoadFootprintFiles() { - FP_LIB_TABLE* fptbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* fptbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); // Check if there are footprint libraries in the footprint library table. if( !fptbl || !fptbl->GetLogicalLibs().size() ) @@ -983,7 +983,7 @@ void CVPCB_MAINFRAME::BuildLibrariesList() { COMMON_SETTINGS* cfg = Pgm().GetCommonSettings(); PROJECT_FILE& project = Kiway().Prj().GetProjectFile(); - FP_LIB_TABLE* tbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); std::set pinnedMatches; std::set otherMatches; m_librariesListBox->ClearList(); diff --git a/cvpcb/display_footprints_frame.cpp b/cvpcb/display_footprints_frame.cpp index 95b94c0160..1a95de1189 100644 --- a/cvpcb/display_footprints_frame.cpp +++ b/cvpcb/display_footprints_frame.cpp @@ -57,7 +57,7 @@ #include #include #include -#include +#include BEGIN_EVENT_TABLE( DISPLAY_FOOTPRINTS_FRAME, PCB_BASE_FRAME ) EVT_CLOSE( DISPLAY_FOOTPRINTS_FRAME::OnCloseWindow ) @@ -412,7 +412,7 @@ FOOTPRINT* DISPLAY_FOOTPRINTS_FRAME::GetFootprint( const wxString& aFootprintNam wxString libNickname = From_UTF8( fpid.GetLibNickname().c_str() ); wxString fpName = From_UTF8( fpid.GetLibItemName().c_str() ); - FP_LIB_TABLE* fpTable = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* fpTable = PROJECT_PCB::PcbFootprintLibs( &Prj() ); wxASSERT( fpTable ); // See if the library requested is in the library table diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index ea31ae15bd..84ad65d95d 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include /** @@ -135,7 +135,7 @@ bool CVPCB_MAINFRAME::readNetListAndFpFiles( const std::string& aNetlist ) if( component->GetFPID().IsLegacy() ) { // get this first here, it's possibly obsoleted if we get it too soon. - FP_LIB_TABLE* tbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); int guess = guessNickname( tbl, (LIB_ID*) &component->GetFPID() ); diff --git a/pcbnew/dialogs/dialog_footprint_associations.cpp b/pcbnew/dialogs/dialog_footprint_associations.cpp index 2573409558..21fa443172 100644 --- a/pcbnew/dialogs/dialog_footprint_associations.cpp +++ b/pcbnew/dialogs/dialog_footprint_associations.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include DIALOG_FOOTPRINT_ASSOCIATIONS::DIALOG_FOOTPRINT_ASSOCIATIONS( PCB_BASE_FRAME* aFrame, @@ -58,7 +58,7 @@ bool DIALOG_FOOTPRINT_ASSOCIATIONS::TransferDataToWindow() wxString fpDesc; PROJECT* project = m_footprint->GetBoard()->GetProject(); - FP_LIB_TABLE* libTable = PROJECT_PCBNEW::PcbFootprintLibs( project ); + FP_LIB_TABLE* libTable = PROJECT_PCB::PcbFootprintLibs( project ); const LIB_TABLE_ROW* libTableRow = nullptr; try diff --git a/pcbnew/dialogs/dialog_footprint_properties.cpp b/pcbnew/dialogs/dialog_footprint_properties.cpp index 26b8b40263..05a036d978 100644 --- a/pcbnew/dialogs/dialog_footprint_properties.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -187,7 +187,7 @@ DIALOG_FOOTPRINT_PROPERTIES::~DIALOG_FOOTPRINT_PROPERTIES() // free the memory used by all models, otherwise models which were // browsed but not used would consume memory - PROJECT_PCBNEW::Get3DCacheManager( &Prj() )->FlushCache( false ); + PROJECT_PCB::Get3DCacheManager( &Prj() )->FlushCache( false ); // the GL canvas has to be visible before it is destroyed m_page = m_NoteBook->GetSelection(); diff --git a/pcbnew/dialogs/panel_fp_lib_table.cpp b/pcbnew/dialogs/panel_fp_lib_table.cpp index 10c546752c..165ed3a77a 100644 --- a/pcbnew/dialogs/panel_fp_lib_table.cpp +++ b/pcbnew/dialogs/panel_fp_lib_table.cpp @@ -67,7 +67,7 @@ #include #include #include -#include +#include // clang-format off @@ -1147,7 +1147,7 @@ void InvokePcbLibTableEditor( KIWAY* aKiway, wxWindow* aCaller ) { FP_LIB_TABLE* globalTable = &GFootprintTable; wxString globalTablePath = FP_LIB_TABLE::GetGlobalTableFileName(); - FP_LIB_TABLE* projectTable = PROJECT_PCBNEW::PcbFootprintLibs( &aKiway->Prj() ); + FP_LIB_TABLE* projectTable = PROJECT_PCB::PcbFootprintLibs( &aKiway->Prj() ); wxString projectTablePath = aKiway->Prj().FootprintLibTblName(); wxString msg; diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp index 807ede7d49..99bd84968c 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp +++ b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp @@ -44,7 +44,7 @@ #include "dialogs/3d_cache_dialogs.h" #include #include -#include +#include enum MODELS_TABLE_COLUMNS { @@ -98,7 +98,7 @@ PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL( m_modelsGrid->SetColAttr( COL_SHOWN, attr ); m_modelsGrid->SetWindowStyleFlag( m_modelsGrid->GetWindowStyle() & ~wxHSCROLL ); - PROJECT_PCBNEW::Get3DCacheManager( &m_frame->Prj() )->GetResolver()->SetProgramBase( &Pgm() ); + PROJECT_PCB::Get3DCacheManager( &m_frame->Prj() )->GetResolver()->SetProgramBase( &Pgm() ); m_previewPane = new PANEL_PREVIEW_3D_MODEL( this, m_frame, m_footprint, &m_shapes3D_list ); @@ -118,7 +118,7 @@ PANEL_FP_PROPERTIES_3D_MODEL::~PANEL_FP_PROPERTIES_3D_MODEL() // free the memory used by all models, otherwise models which were // browsed but not used would consume memory - PROJECT_PCBNEW::Get3DCacheManager( &m_frame->Prj() )->FlushCache( false ); + PROJECT_PCB::Get3DCacheManager( &m_frame->Prj() )->FlushCache( false ); delete m_previewPane; } @@ -155,7 +155,7 @@ void PANEL_FP_PROPERTIES_3D_MODEL::ReloadModelsFromFootprint() m_modelsGrid->ClearRows(); wxString origPath, alias, shortPath; - FILENAME_RESOLVER* res = PROJECT_PCBNEW::Get3DCacheManager( &m_frame->Prj() )->GetResolver(); + FILENAME_RESOLVER* res = PROJECT_PCB::Get3DCacheManager( &m_frame->Prj() )->GetResolver(); for( const FP_3DMODEL& model : m_footprint->Models() ) { @@ -214,7 +214,7 @@ void PANEL_FP_PROPERTIES_3D_MODEL::On3DModelCellChanged( wxGridEvent& aEvent ) if( aEvent.GetCol() == COL_FILENAME ) { bool hasAlias = false; - FILENAME_RESOLVER* res = PROJECT_PCBNEW::Get3DCacheManager( &m_frame->Prj() )->GetResolver(); + FILENAME_RESOLVER* res = PROJECT_PCB::Get3DCacheManager( &m_frame->Prj() )->GetResolver(); wxString filename = m_modelsGrid->GetCellValue( aEvent.GetRow(), COL_FILENAME ); // Perform cleanup and validation on the filename if it isn't empty @@ -309,7 +309,7 @@ void PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel( wxCommandEvent& ) filter = (int) tmp; } - if( !S3D::Select3DModel( m_parentDialog, PROJECT_PCBNEW::Get3DCacheManager( &m_frame->Prj() ), initialpath, filter, &model ) + if( !S3D::Select3DModel( m_parentDialog, PROJECT_PCB::Get3DCacheManager( &m_frame->Prj() ), initialpath, filter, &model ) || model.m_Filename.empty() ) { if( selected >= 0 ) @@ -324,7 +324,7 @@ void PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel( wxCommandEvent& ) prj.SetRString( PROJECT::VIEWER_3D_PATH, initialpath ); sidx = wxString::Format( wxT( "%i" ), filter ); prj.SetRString( PROJECT::VIEWER_3D_FILTER_INDEX, sidx ); - FILENAME_RESOLVER* res = PROJECT_PCBNEW::Get3DCacheManager( &m_frame->Prj() )->GetResolver(); + FILENAME_RESOLVER* res = PROJECT_PCB::Get3DCacheManager( &m_frame->Prj() )->GetResolver(); wxString alias; wxString shortPath; wxString filename = model.m_Filename; @@ -430,7 +430,7 @@ MODEL_VALIDATE_ERRORS PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists( const w return MODEL_VALIDATE_ERRORS::NO_FILENAME; bool hasAlias = false; - FILENAME_RESOLVER* resolv = PROJECT_PCBNEW::Get3DFilenameResolver( &m_frame->Prj() ); + FILENAME_RESOLVER* resolv = PROJECT_PCB::Get3DFilenameResolver( &m_frame->Prj() ); if( !resolv ) return MODEL_VALIDATE_ERRORS::RESOLVE_FAIL; @@ -442,7 +442,7 @@ MODEL_VALIDATE_ERRORS PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists( const w const FP_LIB_TABLE_ROW* fpRow = nullptr; try { - fpRow = PROJECT_PCBNEW::PcbFootprintLibs( &m_frame->Prj() )->FindRow( libraryName, false ); + fpRow = PROJECT_PCB::PcbFootprintLibs( &m_frame->Prj() )->FindRow( libraryName, false ); } catch( ... ) { @@ -468,7 +468,7 @@ MODEL_VALIDATE_ERRORS PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists( const w void PANEL_FP_PROPERTIES_3D_MODEL::Cfg3DPath( wxCommandEvent& event ) { - if( S3D::Configure3DPaths( this, PROJECT_PCBNEW::Get3DCacheManager( &m_frame->Prj() )->GetResolver() ) ) + if( S3D::Configure3DPaths( this, PROJECT_PCB::Get3DCacheManager( &m_frame->Prj() )->GetResolver() ) ) m_previewPane->UpdateDummyFootprint(); } diff --git a/pcbnew/drc/drc_test_provider_library_parity.cpp b/pcbnew/drc/drc_test_provider_library_parity.cpp index 8345f04716..60e49921ec 100644 --- a/pcbnew/drc/drc_test_provider_library_parity.cpp +++ b/pcbnew/drc/drc_test_provider_library_parity.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include /* Library parity test. @@ -754,7 +754,7 @@ bool DRC_TEST_PROVIDER_LIBRARY_PARITY::Run() std::map> libFootprintCache; - FP_LIB_TABLE* libTable = PROJECT_PCBNEW::PcbFootprintLibs( project ); + FP_LIB_TABLE* libTable = PROJECT_PCB::PcbFootprintLibs( project ); wxString msg; int ii = 0; const int progressDelta = 250; diff --git a/pcbnew/exporters/export_idf.cpp b/pcbnew/exporters/export_idf.cpp index 7aeebfc24d..e983b645c0 100644 --- a/pcbnew/exporters/export_idf.cpp +++ b/pcbnew/exporters/export_idf.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include "project.h" #include "kiway.h" @@ -283,7 +283,7 @@ static void idf_export_footprint( BOARD* aPcb, FOOTPRINT* aFootprint, IDF3_BOARD try { - fpRow = PROJECT_PCBNEW::PcbFootprintLibs( aPcb->GetProject() )->FindRow( libraryName, false ); + fpRow = PROJECT_PCB::PcbFootprintLibs( aPcb->GetProject() )->FindRow( libraryName, false ); } catch( ... ) { @@ -606,7 +606,7 @@ bool PCB_EDIT_FRAME::Export_IDF3( BOARD* aPcb, const wxString& aFullFileName, // Switch the locale to standard C (needed to print floating point numbers) LOCALE_IO toggle; - resolver = PROJECT_PCBNEW::Get3DCacheManager( &Prj() )->GetResolver(); + resolver = PROJECT_PCB::Get3DCacheManager( &Prj() )->GetResolver(); bool ok = true; double scale = pcbIUScale.MM_PER_IU; // we must scale internal units to mm for IDF diff --git a/pcbnew/exporters/exporter_vrml.cpp b/pcbnew/exporters/exporter_vrml.cpp index eea8e336b5..ced39ab04c 100644 --- a/pcbnew/exporters/exporter_vrml.cpp +++ b/pcbnew/exporters/exporter_vrml.cpp @@ -38,7 +38,7 @@ #include "pad.h" #include "pcb_text.h" #include "pcb_track.h" -#include +#include #include #include #include "plugins/3dapi/ifsg_all.h" @@ -1004,7 +1004,7 @@ void EXPORTER_PCB_VRML::ExportVrmlFootprint( FOOTPRINT* aFootprint, std::ostream try { - fpRow = PROJECT_PCBNEW::PcbFootprintLibs( m_board->GetProject() )->FindRow( libraryName, false ); + fpRow = PROJECT_PCB::PcbFootprintLibs( m_board->GetProject() )->FindRow( libraryName, false ); } catch( ... ) { @@ -1251,7 +1251,7 @@ bool EXPORTER_PCB_VRML::ExportVRML_File( PROJECT* aProject, wxString *aMessages, m_Subdir3DFpModels = subdir.GetAbsolutePath( wxFileName( aFullFileName ).GetPath() ); m_UseRelPathIn3DModelFilename = aUseRelativePaths; - m_Cache3Dmodels = PROJECT_PCBNEW::Get3DCacheManager( aProject ); + m_Cache3Dmodels = PROJECT_PCB::Get3DCacheManager( aProject ); // When 3D models are separate files, for historical reasons the VRML unit // is expected to be 0.1 inch (2.54mm) instead of 1mm, so we adjust the m_BoardToVrmlScale diff --git a/pcbnew/exporters/step/exporter_step.cpp b/pcbnew/exporters/step/exporter_step.cpp index 9db7214990..aae0f88f7e 100644 --- a/pcbnew/exporters/step/exporter_step.cpp +++ b/pcbnew/exporters/step/exporter_step.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include // OpenCascade messenger #include // OpenCascade output messenger @@ -220,7 +220,7 @@ bool EXPORTER_STEP::buildFootprint3DShapes( FOOTPRINT* aFootprint, VECTOR2D aOri { // FindRow() can throw an exception const FP_LIB_TABLE_ROW* fpRow = - PROJECT_PCBNEW::PcbFootprintLibs( m_board->GetProject() )->FindRow( libraryName, false ); + PROJECT_PCB::PcbFootprintLibs( m_board->GetProject() )->FindRow( libraryName, false ); if( fpRow ) footprintBasePath = fpRow->GetFullURI( true ); diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index a0dda37d9e..9c0cc1e686 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include @@ -791,7 +791,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in } } - FP_LIB_TABLE* prjlibtable = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* prjlibtable = PROJECT_PCB::PcbFootprintLibs( &Prj() ); const wxString& project_env = PROJECT_VAR_NAME; wxString rel_path, env_path; @@ -811,7 +811,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in try { - PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->Save( tblName ); + PROJECT_PCB::PcbFootprintLibs( &Prj() )->Save( tblName ); } catch( const IO_ERROR& ioe ) { diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index 26089fb3f4..2b14b2ce0e 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include @@ -935,7 +935,7 @@ void FOOTPRINT_EDIT_FRAME::UpdateTitle() { try { - writable = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->IsFootprintLibWritable( fpid.GetLibNickname() ); + writable = PROJECT_PCB::PcbFootprintLibs( &Prj() )->IsFootprintLibWritable( fpid.GetLibNickname() ); } catch( const IO_ERROR& ) { @@ -988,7 +988,7 @@ void FOOTPRINT_EDIT_FRAME::UpdateView() void FOOTPRINT_EDIT_FRAME::initLibraryTree() { - FP_LIB_TABLE* fpTable = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* fpTable = PROJECT_PCB::PcbFootprintLibs( &Prj() ); WX_PROGRESS_REPORTER progressReporter( this, _( "Loading Footprint Libraries" ), 2 ); @@ -1010,7 +1010,7 @@ void FOOTPRINT_EDIT_FRAME::initLibraryTree() void FOOTPRINT_EDIT_FRAME::SyncLibraryTree( bool aProgress ) { - FP_LIB_TABLE* fpTable = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* fpTable = PROJECT_PCB::PcbFootprintLibs( &Prj() ); auto adapter = static_cast( m_adapter.get() ); LIB_ID target = GetTargetFPID(); bool targetSelected = ( target == m_treePane->GetLibTree()->GetSelectedLibId() ); diff --git a/pcbnew/footprint_editor_utils.cpp b/pcbnew/footprint_editor_utils.cpp index 9889fa5cef..d455f509f5 100644 --- a/pcbnew/footprint_editor_utils.cpp +++ b/pcbnew/footprint_editor_utils.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include using namespace std::placeholders; @@ -319,7 +319,7 @@ void FOOTPRINT_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) wxString libNickname; wxString msg; - FP_LIB_TABLE* libTable = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* libTable = PROJECT_PCB::PcbFootprintLibs( &Prj() ); const LIB_TABLE_ROW* libTableRow = libTable->FindRowByURI( fpFileName.GetPath() ); if( !libTableRow ) diff --git a/pcbnew/footprint_libraries_utils.cpp b/pcbnew/footprint_libraries_utils.cpp index b4e7f7d9b6..a1ae1bc50f 100644 --- a/pcbnew/footprint_libraries_utils.cpp +++ b/pcbnew/footprint_libraries_utils.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include "footprint_viewer_frame.h" @@ -286,7 +286,7 @@ void FOOTPRINT_EDIT_FRAME::ExportFootprint( FOOTPRINT* aFootprint ) wxString PCB_BASE_EDIT_FRAME::CreateNewProjectLibrary( const wxString& aLibName, const wxString& aProposedName ) { - return createNewLibrary( aLibName, aProposedName, PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ) ); + return createNewLibrary( aLibName, aProposedName, PROJECT_PCB::PcbFootprintLibs( &Prj() ) ); } @@ -435,7 +435,7 @@ FP_LIB_TABLE* PCB_BASE_EDIT_FRAME::selectLibTable( bool aOptional ) switch( dlg.GetSelection() ) { case 0: return &GFootprintTable; - case 1: return PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + case 1: return PROJECT_PCB::PcbFootprintLibs( &Prj() ); default: return nullptr; } } @@ -492,7 +492,7 @@ bool PCB_BASE_EDIT_FRAME::AddLibrary( const wxString& aFilename, FP_LIB_TABLE* a if( isGlobal ) GFootprintTable.Save( FP_LIB_TABLE::GetGlobalTableFileName() ); else - PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->Save( Prj().FootprintLibTblName() ); + PROJECT_PCB::PcbFootprintLibs( &Prj() )->Save( Prj().FootprintLibTblName() ); } catch( const IO_ERROR& ioe ) { @@ -528,7 +528,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary( const LIB_ID& aFPID, bool // Legacy libraries are readable, but modifying legacy format is not allowed // So prompt the user if he try to delete a footprint from a legacy lib - wxString libfullname = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->FindRow( nickname )->GetFullURI(); + wxString libfullname = PROJECT_PCB::PcbFootprintLibs( &Prj() )->FindRow( nickname )->GetFullURI(); if( IO_MGR::GuessPluginTypeFromLibPath( libfullname ) == IO_MGR::LEGACY ) { @@ -536,7 +536,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary( const LIB_ID& aFPID, bool return false; } - if( !PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->IsFootprintLibWritable( nickname ) ) + if( !PROJECT_PCB::PcbFootprintLibs( &Prj() )->IsFootprintLibWritable( nickname ) ) { wxString msg = wxString::Format( _( "Library '%s' is read only." ), nickname ); ShowInfoBarError( msg ); @@ -553,7 +553,7 @@ bool FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary( const LIB_ID& aFPID, bool try { - PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->FootprintDelete( nickname, fpname ); + PROJECT_PCB::PcbFootprintLibs( &Prj() )->FootprintDelete( nickname, fpname ); } catch( const IO_ERROR& ioe ) { @@ -607,7 +607,7 @@ void PCB_EDIT_FRAME::ExportFootprintsToLibrary( bool aStoreInNewLib, const wxStr { try { - FP_LIB_TABLE* tbl = PROJECT_PCBNEW::PcbFootprintLibs( &prj ); + FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &prj ); if( !footprint->GetFPID().GetLibItemName().empty() ) // Handle old boards. { @@ -649,7 +649,7 @@ void PCB_EDIT_FRAME::ExportFootprintsToLibrary( bool aStoreInNewLib, const wxStr if( map ) { - const LIB_TABLE_ROW* row = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->FindRowByURI( libPath ); + const LIB_TABLE_ROW* row = PROJECT_PCB::PcbFootprintLibs( &Prj() )->FindRowByURI( libPath ); if( row ) libNickname = row->GetNickName(); @@ -731,7 +731,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprint( FOOTPRINT* aFootprint ) } } - FP_LIB_TABLE* tbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); // Legacy libraries are readable, but modifying legacy format is not allowed // So prompt the user if he try to add/replace a footprint in a legacy lib @@ -780,7 +780,7 @@ bool FOOTPRINT_EDIT_FRAME::DuplicateFootprint( FOOTPRINT* aFootprint ) // Legacy libraries are readable, but modifying legacy format is not allowed // So prompt the user if he try to add/replace a footprint in a legacy lib - wxString libFullName = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->FindRow( libraryName )->GetFullURI(); + wxString libFullName = PROJECT_PCB::PcbFootprintLibs( &Prj() )->FindRow( libraryName )->GetFullURI(); if( IO_MGR::GuessPluginTypeFromLibPath( libFullName ) == IO_MGR::LEGACY ) { @@ -788,7 +788,7 @@ bool FOOTPRINT_EDIT_FRAME::DuplicateFootprint( FOOTPRINT* aFootprint ) return false; } - FP_LIB_TABLE* tbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); int i = 1; wxString newName = footprintName; @@ -812,7 +812,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary( FOOTPRINT* aFootprint, { aFootprint->SetFPID( LIB_ID( wxEmptyString, aFootprint->GetFPID().GetLibItemName() ) ); - PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->FootprintSave( aLibraryName, aFootprint ); + PROJECT_PCB::PcbFootprintLibs( &Prj() )->FootprintSave( aLibraryName, aFootprint ); aFootprint->SetFPID( LIB_ID( aLibraryName, aFootprint->GetFPID().GetLibItemName() ) ); return true; @@ -946,7 +946,7 @@ public: { COMMON_SETTINGS* cfg = Pgm().GetCommonSettings(); PROJECT_FILE& project = aParent->Prj().GetProjectFile(); - FP_LIB_TABLE* tbl = PROJECT_PCBNEW::PcbFootprintLibs( &aParent->Prj() ); + FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &aParent->Prj() ); std::vector nicknames = tbl->GetLogicalLibs(); wxArrayString headers; std::vector itemsToDisplay; @@ -1047,7 +1047,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintAs( FOOTPRINT* aFootprint ) if( aFootprint == nullptr ) return false; - FP_LIB_TABLE* tbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); SetMsgPanel( aFootprint ); @@ -1076,7 +1076,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintAs( FOOTPRINT* aFootprint ) // Legacy libraries are readable, but modifying legacy format is not allowed // So prompt the user if he try to add/replace a footprint in a legacy lib - const FP_LIB_TABLE_ROW* row = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->FindRow( newLib ); + const FP_LIB_TABLE_ROW* row = PROJECT_PCB::PcbFootprintLibs( &Prj() )->FindRow( newLib ); wxString libPath = row->GetFullURI(); IO_MGR::PCB_FILE_T piType = IO_MGR::GuessPluginTypeFromLibPath( libPath ); @@ -1209,7 +1209,7 @@ private: FOOTPRINT* PCB_BASE_FRAME::CreateNewFootprint( const wxString& aFootprintName, const wxString& aLibName, bool aQuiet ) { - FP_LIB_TABLE* tbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); wxString footprintName = aFootprintName; wxString msg; @@ -1336,7 +1336,7 @@ wxString PCB_BASE_FRAME::SelectLibrary( const wxString& aNicknameExisting ) COMMON_SETTINGS* cfg = Pgm().GetCommonSettings(); PROJECT_FILE& project = Kiway().Prj().GetProjectFile(); - FP_LIB_TABLE* fptbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* fptbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); std::vector< wxArrayString > itemsToDisplay; std::vector< wxString > nicknames = fptbl->GetLogicalLibs(); diff --git a/pcbnew/footprint_preview_panel.cpp b/pcbnew/footprint_preview_panel.cpp index 1765ed5272..babb1356af 100644 --- a/pcbnew/footprint_preview_panel.cpp +++ b/pcbnew/footprint_preview_panel.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include FOOTPRINT_PREVIEW_PANEL::FOOTPRINT_PREVIEW_PANEL( KIWAY* aKiway, wxWindow* aParent, UNITS_PROVIDER* aUnitsProvider, @@ -163,7 +163,7 @@ bool FOOTPRINT_PREVIEW_PANEL::DisplayFootprint( const LIB_ID& aFPID ) m_currentFootprint->SetParent( nullptr ); } - FP_LIB_TABLE* fptbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* fptbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); try { diff --git a/pcbnew/footprint_viewer_frame.cpp b/pcbnew/footprint_viewer_frame.cpp index 36b5ad45f7..067eb3ffdb 100644 --- a/pcbnew/footprint_viewer_frame.cpp +++ b/pcbnew/footprint_viewer_frame.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include @@ -423,7 +423,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() COMMON_SETTINGS* cfg = Pgm().GetCommonSettings(); PROJECT_FILE& project = Kiway().Prj().GetProjectFile(); - std::vector nicknames = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->GetLogicalLibs(); + std::vector nicknames = PROJECT_PCB::PcbFootprintLibs( &Prj() )->GetLogicalLibs(); std::vector pinnedMatches; std::vector otherMatches; @@ -508,7 +508,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() wxString nickname = getCurNickname(); - fp_info_list->ReadFootprintFiles( PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ), !nickname ? nullptr : &nickname ); + fp_info_list->ReadFootprintFiles( PROJECT_PCB::PcbFootprintLibs( &Prj() ), !nickname ? nullptr : &nickname ); if( fp_info_list->GetErrorCount() ) { @@ -935,7 +935,7 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event ) if( event.GetActive() ) { // Ensure we have the right library list: - std::vector< wxString > libNicknames = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->GetLogicalLibs(); + std::vector< wxString > libNicknames = PROJECT_PCB::PcbFootprintLibs( &Prj() )->GetLogicalLibs(); bool stale = false; if( libNicknames.size() != m_libList->GetCount() ) @@ -1033,7 +1033,7 @@ bool FOOTPRINT_VIEWER_FRAME::ShowModal( wxString* aFootprint, wxWindow* aParent if( aFootprint && !aFootprint->IsEmpty() ) { wxString msg; - LIB_TABLE* fpTable = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + LIB_TABLE* fpTable = PROJECT_PCB::PcbFootprintLibs( &Prj() ); LIB_ID fpid; fpid.Parse( *aFootprint, true ); @@ -1147,7 +1147,7 @@ void FOOTPRINT_VIEWER_FRAME::UpdateTitle() { try { - FP_LIB_TABLE* libtable = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* libtable = PROJECT_PCB::PcbFootprintLibs( &Prj() ); const LIB_TABLE_ROW* row = libtable->FindRow( getCurNickname() ); title = getCurNickname() + wxT( " \u2014 " ) + row->GetFullURI( true ); @@ -1201,7 +1201,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode ) GetBoard()->DeleteAllFootprints(); GetBoard()->GetNetInfo().RemoveUnusedNets(); - FOOTPRINT* footprint = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->FootprintLoad( getCurNickname(), + FOOTPRINT* footprint = PROJECT_PCB::PcbFootprintLibs( &Prj() )->FootprintLoad( getCurNickname(), getCurFootprintName() ); if( footprint ) diff --git a/pcbnew/load_select_footprint.cpp b/pcbnew/load_select_footprint.cpp index ddd3f80d2d..68886d323b 100644 --- a/pcbnew/load_select_footprint.cpp +++ b/pcbnew/load_select_footprint.cpp @@ -49,7 +49,7 @@ using namespace std::placeholders; #include #include #include -#include +#include static wxArrayString s_FootprintHistoryList; @@ -234,7 +234,7 @@ FOOTPRINT* PCB_BASE_FRAME::LoadFootprint( const LIB_ID& aFootprintId ) FOOTPRINT* PCB_BASE_FRAME::loadFootprint( const LIB_ID& aFootprintId ) { - FP_LIB_TABLE* fptbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* fptbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); wxCHECK_MSG( fptbl, nullptr, wxT( "Cannot look up LIB_ID in NULL FP_LIB_TABLE." ) ); diff --git a/pcbnew/netlist_reader/netlist.cpp b/pcbnew/netlist_reader/netlist.cpp index c75298bc6a..87a7c75e4b 100644 --- a/pcbnew/netlist_reader/netlist.cpp +++ b/pcbnew/netlist_reader/netlist.cpp @@ -45,7 +45,7 @@ using namespace std::placeholders; #include #include #include // LAST_PATH_TYPE -#include +#include bool PCB_EDIT_FRAME::ReadNetlistFromFile( const wxString &aFilename, NETLIST& aNetlist, @@ -148,7 +148,7 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter ) FOOTPRINT* footprint = nullptr; FOOTPRINT* fpOnBoard = nullptr; - if( aNetlist.IsEmpty() || PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->IsEmpty() ) + if( aNetlist.IsEmpty() || PROJECT_PCB::PcbFootprintLibs( &Prj() )->IsEmpty() ) return; aNetlist.SortByFPID(); diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index 3675749adc..94c7845c80 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include @@ -112,7 +112,7 @@ bool PCB_BASE_FRAME::canCloseWindow( wxCloseEvent& aEvent ) // Similarly, wxConvBrokenFileNames uses some statically allocated variables that make it // crash when run later from a d'tor. - PROJECT_PCBNEW::Cleanup3DCache( &Prj() ); + PROJECT_PCB::Cleanup3DCache( &Prj() ); return true; } @@ -1153,7 +1153,7 @@ void PCB_BASE_FRAME::setFPWatcher( FOOTPRINT* aFootprint ) } wxString libfullname; - FP_LIB_TABLE* tbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); if( !aFootprint || !tbl ) return; @@ -1229,7 +1229,7 @@ void PCB_BASE_FRAME::OnFpChangeDebounceTimer( wxTimerEvent& aEvent ) m_watcherLastModified = lastModified; FOOTPRINT* fp = GetBoard()->GetFirstFootprint(); - FP_LIB_TABLE* tbl = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() ); + FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &Prj() ); // When loading a footprint from a library in the footprint editor // the items UUIDs must be keep and not reinitialized diff --git a/pcbnew/project_pcbnew.cpp b/pcbnew/project_pcb.cpp similarity index 92% rename from pcbnew/project_pcbnew.cpp rename to pcbnew/project_pcb.cpp index 3b63c6ccc9..7ff31ae59c 100644 --- a/pcbnew/project_pcbnew.cpp +++ b/pcbnew/project_pcb.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "project_pcbnew.h" +#include "project_pcb.h" #include #include #include @@ -34,7 +34,7 @@ static std::mutex mutex3D_cacheManager; -FP_LIB_TABLE* PROJECT_PCBNEW::PcbFootprintLibs( PROJECT* aProject ) +FP_LIB_TABLE* PROJECT_PCB::PcbFootprintLibs( PROJECT* aProject ) { // This is a lazy loading function, it loads the project specific table when // that table is asked for, not before. @@ -74,7 +74,7 @@ FP_LIB_TABLE* PROJECT_PCBNEW::PcbFootprintLibs( PROJECT* aProject ) } -S3D_CACHE* PROJECT_PCBNEW::Get3DCacheManager( PROJECT* aProject, bool aUpdateProjDir ) +S3D_CACHE* PROJECT_PCB::Get3DCacheManager( PROJECT* aProject, bool aUpdateProjDir ) { std::lock_guard lock( mutex3D_cacheManager ); @@ -104,13 +104,13 @@ S3D_CACHE* PROJECT_PCBNEW::Get3DCacheManager( PROJECT* aProject, bool aUpdatePro } -FILENAME_RESOLVER* PROJECT_PCBNEW::Get3DFilenameResolver( PROJECT* aProject ) +FILENAME_RESOLVER* PROJECT_PCB::Get3DFilenameResolver( PROJECT* aProject ) { return Get3DCacheManager( aProject )->GetResolver(); } -void PROJECT_PCBNEW::Cleanup3DCache( PROJECT* aProject ) +void PROJECT_PCB::Cleanup3DCache( PROJECT* aProject ) { std::lock_guard lock( mutex3D_cacheManager ); diff --git a/pcbnew/project_pcbnew.h b/pcbnew/project_pcb.h similarity index 97% rename from pcbnew/project_pcbnew.h rename to pcbnew/project_pcb.h index 5b589ddaa4..22473ac68d 100644 --- a/pcbnew/project_pcbnew.h +++ b/pcbnew/project_pcb.h @@ -28,7 +28,7 @@ class PROJECT; class S3D_CACHE; class FILENAME_RESOLVER; -class PROJECT_PCBNEW +class PROJECT_PCB { public: /** @@ -51,5 +51,5 @@ public: static FILENAME_RESOLVER* Get3DFilenameResolver( PROJECT* aProject ); private: - PROJECT_PCBNEW() {} + PROJECT_PCB() {} }; \ No newline at end of file diff --git a/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp b/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp index becb3b78b8..8224cf8ced 100644 --- a/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp +++ b/pcbnew/python/scripting/pcbnew_scripting_helpers.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include @@ -307,7 +307,7 @@ FP_LIB_TABLE* GetFootprintLibraryTable() if( !project ) return nullptr; - return PROJECT_PCBNEW::PcbFootprintLibs( project ); + return PROJECT_PCB::PcbFootprintLibs( project ); } diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index a2294d2620..a3b3491d23 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include BOARD_INSPECTION_TOOL::BOARD_INSPECTION_TOOL() : @@ -1490,7 +1490,7 @@ void BOARD_INSPECTION_TOOL::DiffFootprint( FOOTPRINT* aFootprint ) r->Report( "" ); PROJECT* project = aFootprint->GetBoard()->GetProject(); - FP_LIB_TABLE* libTable = PROJECT_PCBNEW::PcbFootprintLibs( project ); + FP_LIB_TABLE* libTable = PROJECT_PCB::PcbFootprintLibs( project ); const LIB_TABLE_ROW* libTableRow = nullptr; try diff --git a/pcbnew/tools/footprint_editor_control.cpp b/pcbnew/tools/footprint_editor_control.cpp index 4ca3e88f99..c732961b00 100644 --- a/pcbnew/tools/footprint_editor_control.cpp +++ b/pcbnew/tools/footprint_editor_control.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include @@ -285,7 +285,7 @@ int FOOTPRINT_EDITOR_CONTROL::SaveAs( const TOOL_EVENT& aEvent ) { // Save Library As const wxString& src_libNickname = m_frame->GetTargetFPID().GetLibNickname(); - wxString src_libFullName = PROJECT_PCBNEW::PcbFootprintLibs( &m_frame->Prj() )->GetFullURI( src_libNickname ); + wxString src_libFullName = PROJECT_PCB::PcbFootprintLibs( &m_frame->Prj() )->GetFullURI( src_libNickname ); if( m_frame->SaveLibraryAs( src_libFullName ) ) m_frame->SyncLibraryTree( true ); @@ -360,7 +360,7 @@ int FOOTPRINT_EDITOR_CONTROL::PasteFootprint( const TOOL_EVENT& aEvent ) wxString newLib = m_frame->GetTreeFPID().GetLibNickname(); wxString newName = m_copiedFootprint->GetFPID().GetLibItemName(); - while( PROJECT_PCBNEW::PcbFootprintLibs( &m_frame->Prj() )->FootprintExists( newLib, newName ) ) + while( PROJECT_PCB::PcbFootprintLibs( &m_frame->Prj() )->FootprintExists( newLib, newName ) ) newName += _( "_copy" ); m_copiedFootprint->SetFPID( LIB_ID( newLib, newName ) ); @@ -427,7 +427,7 @@ private: int FOOTPRINT_EDITOR_CONTROL::RenameFootprint( const TOOL_EVENT& aEvent ) { - FP_LIB_TABLE* tbl = PROJECT_PCBNEW::PcbFootprintLibs( &m_frame->Prj() ); + FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &m_frame->Prj() ); LIB_ID fpID = m_frame->GetTreeFPID(); wxString libraryName = fpID.GetLibNickname(); wxString oldName = fpID.GetLibItemName(); @@ -493,7 +493,7 @@ int FOOTPRINT_EDITOR_CONTROL::RenameFootprint( const TOOL_EVENT& aEvent ) m_frame->SaveFootprintInLibrary( footprint, libraryName ); - PROJECT_PCBNEW::PcbFootprintLibs( &m_frame->Prj() )->FootprintDelete( libraryName, oldName ); + PROJECT_PCB::PcbFootprintLibs( &m_frame->Prj() )->FootprintDelete( libraryName, oldName ); } catch( const IO_ERROR& ioe ) { diff --git a/pcbnew/widgets/panel_footprint_chooser.cpp b/pcbnew/widgets/panel_footprint_chooser.cpp index d23153692b..650c5a4383 100644 --- a/pcbnew/widgets/panel_footprint_chooser.cpp +++ b/pcbnew/widgets/panel_footprint_chooser.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER( PCB_BASE_FRAME* aFrame, wxTopLevelWindow* aParent, @@ -50,7 +50,7 @@ PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER( PCB_BASE_FRAME* aFrame, wxTopL m_frame( aFrame ), m_closeHandler( std::move( aCloseHandler ) ) { - FP_LIB_TABLE* fpTable = PROJECT_PCBNEW::PcbFootprintLibs( &aFrame->Prj() ); + FP_LIB_TABLE* fpTable = PROJECT_PCB::PcbFootprintLibs( &aFrame->Prj() ); // Load footprint files: WX_PROGRESS_REPORTER* progressReporter = new WX_PROGRESS_REPORTER( aParent,