On second thought rename PROJECT_PCBNEW to PROJECT_PCB
This commit is contained in:
parent
fabfe5b33d
commit
6b12a12b3e
|
@ -33,7 +33,7 @@
|
|||
#include <core/profile.h> // To use GetRunningMicroSecs or another profiling utility
|
||||
#include <fp_lib_table.h>
|
||||
#include <eda_3d_viewer_frame.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
|
||||
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 )
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include <footprint.h>
|
||||
#include <fp_lib_table.h>
|
||||
#include <eda_3d_viewer_frame.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
#include <base_units.h>
|
||||
#include <core/profile.h> // 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 )
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
#include <widgets/wx_infobar.h>
|
||||
#include <widgets/wx_aui_utils.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
#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.
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <common_ogl/ogl_attr_list.h>
|
||||
#include <dpi_scaling_common.h>
|
||||
#include <pgm_base.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
#include <settings/common_settings.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <widgets/wx_infobar.h>
|
||||
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
#include <tools/cvpcb_actions.h>
|
||||
#include <tools/cvpcb_association_tool.h>
|
||||
#include <tools/cvpcb_control.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
#include <wx/statline.h>
|
||||
#include <wx/stattext.h>
|
||||
|
@ -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<wxString> pinnedMatches;
|
||||
std::set<wxString> otherMatches;
|
||||
m_librariesListBox->ClearList();
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#include <wx/choice.h>
|
||||
#include <wx/debug.h>
|
||||
#include <cvpcb_id.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
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
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include <cvpcb_mainframe.h>
|
||||
#include <fp_conflict_assignment_selector.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
|
||||
/**
|
||||
|
@ -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() );
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <kiface_base.h>
|
||||
#include <fp_lib_table.h>
|
||||
#include <footprint.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
|
||||
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
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <pcb_edit_frame.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <pgm_base.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <widgets/grid_text_button_helpers.h>
|
||||
#include <widgets/text_ctrl_eval.h>
|
||||
|
@ -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();
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
#include <settings/settings_manager.h>
|
||||
#include <paths.h>
|
||||
#include <macros.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
// 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;
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "dialogs/3d_cache_dialogs.h"
|
||||
#include <settings/settings_manager.h>
|
||||
#include <wx/defs.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <drc/drc_engine.h>
|
||||
#include <drc/drc_item.h>
|
||||
#include <drc/drc_test_provider.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
/*
|
||||
Library parity test.
|
||||
|
@ -754,7 +754,7 @@ bool DRC_TEST_PROVIDER_LIBRARY_PARITY::Run()
|
|||
|
||||
std::map<LIB_ID, std::shared_ptr<FOOTPRINT>> 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;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <pad.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <build_version.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#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
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "pad.h"
|
||||
#include "pcb_text.h"
|
||||
#include "pcb_track.h"
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
#include <core/arraydim.h>
|
||||
#include <filename_resolver.h>
|
||||
#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
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <base_units.h>
|
||||
#include <filename_resolver.h>
|
||||
#include <trace_helpers.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
#include <Message.hxx> // OpenCascade messenger
|
||||
#include <Message_PrinterOStream.hxx> // 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 );
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
#include <paths.h>
|
||||
#include <pgm_base.h>
|
||||
#include <project/project_file.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
#include <project/project_local_settings.h>
|
||||
#include <project/net_settings.h>
|
||||
#include <plugins/cadstar/cadstar_pcb_archive_plugin.h>
|
||||
|
@ -791,7 +791,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& 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<wxString>& aFileSet, in
|
|||
|
||||
try
|
||||
{
|
||||
PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->Save( tblName );
|
||||
PROJECT_PCB::PcbFootprintLibs( &Prj() )->Save( tblName );
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
#include <pcbnew_id.h>
|
||||
#include <pgm_base.h>
|
||||
#include <project.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <tool/action_toolbar.h>
|
||||
#include <tool/common_control.h>
|
||||
|
@ -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<FP_TREE_SYNCHRONIZING_ADAPTER*>( m_adapter.get() );
|
||||
LIB_ID target = GetTargetFPID();
|
||||
bool targetSelected = ( target == m_treePane->GetLibTree()->GetSelectedLibId() );
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include <widgets/lib_tree.h>
|
||||
#include <pcb_layer_box_selector.h>
|
||||
#include <pcb_dimension.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
#include <dialogs/dialog_dimension_properties.h>
|
||||
|
||||
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 )
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#include <env_paths.h>
|
||||
#include <paths.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
#include <project/project_file.h>
|
||||
#include <footprint_editor_settings.h>
|
||||
#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<wxString> nicknames = tbl->GetLogicalLibs();
|
||||
wxArrayString headers;
|
||||
std::vector<wxArrayString> 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();
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include <wx/stattext.h>
|
||||
#include <zoom_defines.h>
|
||||
#include <dialog_shim.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
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
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#include <pcbnew_id.h>
|
||||
#include <footprint_editor_settings.h>
|
||||
#include <pgm_base.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
#include <project/project_file.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <tool/action_toolbar.h>
|
||||
|
@ -423,7 +423,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList()
|
|||
|
||||
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
|
||||
PROJECT_FILE& project = Kiway().Prj().GetProjectFile();
|
||||
std::vector<wxString> nicknames = PROJECT_PCBNEW::PcbFootprintLibs( &Prj() )->GetLogicalLibs();
|
||||
std::vector<wxString> nicknames = PROJECT_PCB::PcbFootprintLibs( &Prj() )->GetLogicalLibs();
|
||||
std::vector<wxString> pinnedMatches;
|
||||
std::vector<wxString> 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 )
|
||||
|
|
|
@ -49,7 +49,7 @@ using namespace std::placeholders;
|
|||
#include <widgets/lib_tree.h>
|
||||
#include <widgets/wx_progress_reporters.h>
|
||||
#include <dialog_pad_properties.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
|
||||
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." ) );
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ using namespace std::placeholders;
|
|||
#include <tools/pcb_actions.h>
|
||||
#include <tools/pcb_selection_tool.h>
|
||||
#include <project/project_file.h> // LAST_PATH_TYPE
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
|
||||
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();
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
#include <pcb_base_frame.h>
|
||||
#include <pcb_draw_panel_gal.h>
|
||||
#include <pgm_base.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <zoom_defines.h>
|
||||
|
||||
|
@ -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
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "project_pcbnew.h"
|
||||
#include "project_pcb.h"
|
||||
#include <fp_lib_table.h>
|
||||
#include <project.h>
|
||||
#include <confirm.h>
|
||||
|
@ -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<std::mutex> 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<std::mutex> lock( mutex3D_cacheManager );
|
||||
|
|
@ -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() {}
|
||||
};
|
|
@ -47,7 +47,7 @@
|
|||
#include <macros.h>
|
||||
#include <pcbnew_scripting_helpers.h>
|
||||
#include <project.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
#include <project/net_settings.h>
|
||||
#include <project/project_file.h>
|
||||
#include <settings/settings_manager.h>
|
||||
|
@ -307,7 +307,7 @@ FP_LIB_TABLE* GetFootprintLibraryTable()
|
|||
if( !project )
|
||||
return nullptr;
|
||||
|
||||
return PROJECT_PCBNEW::PcbFootprintLibs( project );
|
||||
return PROJECT_PCB::PcbFootprintLibs( project );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#include <widgets/footprint_diff_widget.h>
|
||||
#include <drc/drc_item.h>
|
||||
#include <pad.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
|
||||
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
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include <footprint_wizard_frame.h>
|
||||
#include <kiway.h>
|
||||
#include <drc/drc_item.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <widgets/footprint_preview_widget.h>
|
||||
#include <widgets/wx_progress_reporters.h>
|
||||
#include <footprint_info_impl.h>
|
||||
#include <project_pcbnew.h>
|
||||
#include <project_pcb.h>
|
||||
|
||||
|
||||
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,
|
||||
|
|
Loading…
Reference in New Issue