KiCad PCB EDA Suite
|
Container for project specific data. More...
#include <project.h>
Classes | |
class | _ELEM |
A PROJECT can hold stuff it knows nothing about, in the form of _ELEM derivatives. More... | |
Public Types | |
enum class | ELEM { FPTBL , SCH_SYMBOL_LIBS , SCH_SEARCH_STACK , S3DCACHE , SYMBOL_LIB_TABLE , SEARCH_STACK , DESIGN_BLOCK_LIB_TABLE , COUNT } |
The set of #_ELEMs that a PROJECT can hold. More... | |
enum | LIB_TYPE_T { SYMBOL_LIB , FOOTPRINT_LIB , DESIGN_BLOCK_LIB , LIB_TYPE_COUNT } |
enum | RSTRING_T { DOC_PATH , SCH_LIB_PATH , SCH_LIB_SELECT , SCH_LIBEDIT_CUR_LIB , SCH_LIBEDIT_CUR_SYMBOL , VIEWER_3D_PATH , VIEWER_3D_FILTER_INDEX , PCB_LIB_NICKNAME , PCB_FOOTPRINT , PCB_FOOTPRINT_EDITOR_FP_NAME , PCB_FOOTPRINT_EDITOR_LIB_NICKNAME , PCB_FOOTPRINT_VIEWER_FP_NAME , PCB_FOOTPRINT_VIEWER_LIB_NICKNAME , RSTRING_COUNT } |
Retain a number of project specific wxStrings, enumerated here: More... | |
Public Member Functions | |
PROJECT () | |
virtual | ~PROJECT () |
virtual bool | TextVarResolver (wxString *aToken) const |
virtual std::map< wxString, wxString > & | GetTextVars () const |
virtual void | ApplyTextVars (const std::map< wxString, wxString > &aVarsMap) |
Applies the given var map, it will create or update existing vars. | |
int | GetTextVarsTicker () const |
void | IncrementTextVarsTicker () |
int | GetNetclassesTicker () const |
void | IncrementNetclassesTicker () |
virtual const wxString | GetProjectFullName () const |
Return the full path and name of the project. | |
virtual const wxString | GetProjectPath () const |
Return the full path of the project. | |
virtual const wxString | GetProjectDirectory () const |
Return the full path of the project DIRECTORY. | |
virtual const wxString | GetProjectName () const |
Return the short name of the project. | |
virtual bool | IsNullProject () const |
Check if this project is a null project (i.e. | |
virtual bool | IsReadOnly () const |
virtual void | SetReadOnly (bool aReadOnly=true) |
virtual const wxString | GetSheetName (const KIID &aSheetID) |
Return the name of the sheet identified by the given UUID. | |
virtual const wxString | FootprintLibTblName () const |
Returns the path and filename of this project's footprint library table. | |
virtual const wxString | SymbolLibTableName () const |
Return the path and file name of this projects symbol library table. | |
virtual const wxString | DesignBlockLibTblName () const |
Return the path and file name of this projects design block library table. | |
void | PinLibrary (const wxString &aLibrary, enum LIB_TYPE_T aLibType) |
void | UnpinLibrary (const wxString &aLibrary, enum LIB_TYPE_T aLibType) |
virtual PROJECT_FILE & | GetProjectFile () const |
virtual PROJECT_LOCAL_SETTINGS & | GetLocalSettings () const |
virtual const wxString & | GetRString (RSTRING_T aStringId) |
Return a "retained string", which is any session and project specific string identified in enum RSTRING_T. | |
virtual void | SetRString (RSTRING_T aStringId, const wxString &aString) |
Store a "retained string", which is any session and project specific string identified in enum RSTRING_T. | |
virtual _ELEM * | GetElem (PROJECT::ELEM aIndex) |
Get and set the elements for this project. | |
virtual void | SetElem (PROJECT::ELEM aIndex, _ELEM *aElem) |
virtual void | ElemsClear () |
Delete all the _ELEMs and set their pointers to NULL. | |
void | Clear () |
Clear the _ELEMs and RSTRINGs. | |
virtual const wxString | AbsolutePath (const wxString &aFileName) const |
Fix up aFileName if it is relative to the project's directory to be an absolute path and filename. | |
virtual FP_LIB_TABLE * | PcbFootprintLibs (KIWAY &aKiway) |
Return the table of footprint libraries. | |
virtual DESIGN_BLOCK_LIB_TABLE * | DesignBlockLibs () |
Return the table of design block libraries. | |
Private Member Functions | |
virtual void | setProjectFullName (const wxString &aFullPathAndName) |
Set the full directory, basename, and extension of the project. | |
virtual void | setProjectFile (PROJECT_FILE *aFile) |
Set the backing store file for this project. | |
virtual void | setLocalSettings (PROJECT_LOCAL_SETTINGS *aSettings) |
Set the local settings backing store. | |
const wxString | libTableName (const wxString &aLibTableName) const |
Return the full path and file name of the project specific library table aLibTableName. | |
Private Attributes | |
wxFileName | m_project_name |
<fullpath>/<basename>.pro | |
wxString | m_pro_date_and_time |
bool | m_readOnly |
No project files will be written to disk. | |
int | m_textVarsTicker |
Update counter on text vars. | |
int | m_netclassesTicker |
Update counter on netclasses. | |
PROJECT_FILE * | m_projectFile |
Backing store for project data – owned by SETTINGS_MANAGER. | |
PROJECT_LOCAL_SETTINGS * | m_localSettings |
Backing store for project local settings – owned by SETTINGS_MANAGER. | |
std::map< KIID, wxString > | m_sheetNames |
std::array< wxString, RSTRING_COUNT > | m_rstrings |
std::array< _ELEM *, static_cast< unsigned int >(PROJECT::ELEM::COUNT)> | m_elems |
Friends | |
class | SETTINGS_MANAGER |
class | TEST_NETLISTS_FIXTURE |
Container for project specific data.
Because it is in the neutral program top, which is not linked to by subsidiary DSOs, any functions in this interface must be virtual.
|
strong |
enum PROJECT::LIB_TYPE_T |
enum PROJECT::RSTRING_T |
Retain a number of project specific wxStrings, enumerated here:
PROJECT::PROJECT | ( | ) |
Definition at line 44 of file project.cpp.
References m_elems.
|
virtual |
Definition at line 66 of file project.cpp.
References ElemsClear().
|
virtual |
Fix up aFileName if it is relative to the project's directory to be an absolute path and filename.
This intends to overcome the now missing chdir() into the project directory.
Definition at line 359 of file project.cpp.
References FN_NORMALIZE_FLAGS, and GetProjectFullName().
Referenced by PCB_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::doCloseWindow(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_BASE_EDIT_FRAME::GetDesignRulesPath(), PANEL_SETUP_RULES::ImportSettingsFrom(), DIALOG_EXPORT_STEP::onExportButton(), DIALOG_GENDRILL::OnGenReportFile(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_SYMBOL_FIELDS_TABLE::OnOutputFileBrowseClicked(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::PrintPage(), SIM_LIB_MGR::ResolveLibraryPath(), SCH_EDIT_FRAME::SaveProject(), SCH_EDIT_FRAME::saveSchematicFile(), SIMULATOR_CONTROL::SaveWorkbook(), PROJECT_SCH::SchSearchS(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), SIMULATOR_FRAME::UpdateTitle(), and WriteDRCReport().
|
virtual |
Applies the given var map, it will create or update existing vars.
Definition at line 90 of file project.cpp.
References GetTextVars().
Referenced by EESCHEMA_JOBS_HANDLER::JobExportBom(), PCBNEW_JOBS_HANDLER::JobExportDrc(), PCBNEW_JOBS_HANDLER::JobExportDxf(), PCBNEW_JOBS_HANDLER::JobExportGerber(), PCBNEW_JOBS_HANDLER::JobExportGerbers(), PCBNEW_JOBS_HANDLER::JobExportPdf(), EESCHEMA_JOBS_HANDLER::JobExportPlot(), PCBNEW_JOBS_HANDLER::JobExportRender(), PCBNEW_JOBS_HANDLER::JobExportStep(), PCBNEW_JOBS_HANDLER::JobExportSvg(), and EESCHEMA_JOBS_HANDLER::JobSchErc().
|
inline |
Clear the _ELEMs and RSTRINGs.
Definition at line 275 of file project.h.
Referenced by setProjectFullName().
|
virtual |
Return the table of design block libraries.
Definition at line 418 of file project.cpp.
References _, DESIGN_BLOCK_LIB_TABLE, DesignBlockLibTblName(), DisplayErrorMessage(), GetElem(), DESIGN_BLOCK_LIB_TABLE::GetGlobalLibTable(), LIB_TABLE::Load(), DESIGN_BLOCK_LIB_TABLE::ProjectElementType(), SetElem(), and IO_ERROR::What().
Referenced by SCH_EDIT_FRAME::AddDesignBlockLibrary(), SCH_EDIT_FRAME::DeleteDesignBlockFromLibrary(), SCH_EDIT_FRAME::DeleteDesignBlockLibrary(), SCH_EDIT_FRAME::EditDesignBlockProperties(), InvokeEditDesignBlockLibTable(), PANEL_DESIGN_BLOCK_CHOOSER::PANEL_DESIGN_BLOCK_CHOOSER(), PANEL_DESIGN_BLOCK_CHOOSER::RefreshLibs(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), SCH_EDIT_FRAME::SaveSheetAsDesignBlock(), and SCH_EDIT_FRAME::selectDesignBlockLibTable().
|
virtual |
Return the path and file name of this projects design block library table.
Definition at line 171 of file project.cpp.
References libTableName().
Referenced by DesignBlockLibs(), and InvokeEditDesignBlockLibTable().
|
virtual |
Delete all the _ELEMs and set their pointers to NULL.
Definition at line 55 of file project.cpp.
References m_elems, and SetElem().
Referenced by ~PROJECT().
|
virtual |
Returns the path and filename of this project's footprint library table.
This project specific footprint library table not the global one.
Definition at line 165 of file project.cpp.
References libTableName().
Referenced by InvokePcbLibTableEditor(), PCB_EDIT_FRAME::OpenProjectFiles(), PcbFootprintLibs(), and PROJECT_PCB::PcbFootprintLibs().
|
virtual |
Get and set the elements for this project.
This is a cross module API, therefore the #_ELEM destructor is virtual and can point to a destructor function in another link image. Be careful that that program module is resident at time of destruction.
Summary: -#) cross module API. -#) PROJECT knows nothing about #_ELEM objects except how to delete them and set and get pointers to them.
Definition at line 337 of file project.cpp.
References m_elems.
Referenced by PROJECT_PCB::Cleanup3DCache(), DesignBlockLibs(), PROJECT_PCB::Get3DCacheManager(), PcbFootprintLibs(), PROJECT_PCB::PcbFootprintLibs(), PROJECT_SCH::SchLibs(), PROJECT_SCH::SchSearchS(), PROJECT_SCH::SchSymbolLibTable(), and LEGACY_RESCUER::WriteRescueLibrary().
|
inlinevirtual |
Definition at line 206 of file project.h.
Referenced by PCB_NET_INSPECTOR_PANEL::buildColumns(), PCB_NET_INSPECTOR_PANEL::buildNetsList(), BOARD::GetVisibleElements(), BOARD::GetVisibleLayers(), BOARD::IsElementVisible(), BOARD::IsLayerVisible(), SCH_EDIT_FRAME::LoadProjectSettings(), PCB_EDIT_FRAME::LoadProjectSettings(), EDA_BASE_FRAME::LoadWindowState(), PCB_NET_INSPECTOR_PANEL::netFilterMatches(), KICAD_MANAGER_CONTROL::NewFromRepository(), PCB_NET_INSPECTOR_PANEL::OnBoardChanged(), PCB_EDIT_FRAME::onBoardLoaded(), PCB_NET_INSPECTOR_PANEL::OnConfigButton(), PROJECT_TREE_PANE::onGitInitializeProject(), KICAD_MANAGER_FRAME::OnIdle(), PCB_EDIT_FRAME::OpenProjectFiles(), APPEARANCE_CONTROLS::rebuildNets(), PROJECT_TREE_PANE::ReCreateTreePrj(), SETTINGS_MANAGER::SaveProject(), KICAD_MANAGER_CONTROL::SaveProjectAs(), SETTINGS_MANAGER::SaveProjectAs(), SETTINGS_MANAGER::SaveProjectCopy(), SCH_EDIT_FRAME::SaveProjectLocalSettings(), PCB_EDIT_FRAME::saveProjectSettings(), ROUTER_TOOL::saveRouterDebugLog(), PCB_NET_INSPECTOR_PANEL::SaveSettings(), EDA_BASE_FRAME::SaveSettings(), BOARD::SetElementVisibility(), BOARD::SetVisibleLayers(), APPEARANCE_CONTROLS::showNetclass(), KICAD_MANAGER_CONTROL::ShowPlayer(), and SETTINGS_MANAGER::unloadProjectFile().
|
inline |
Definition at line 117 of file project.h.
Referenced by PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES(), and PANEL_SETUP_NETCLASSES::TransferDataToWindow().
|
virtual |
Return the full path of the project DIRECTORY.
This is the path of the project file and will always be an absolute path, ending with a path separator.
Definition at line 141 of file project.cpp.
References m_project_name.
Referenced by PROJECT_SCH::SchSearchS().
|
inlinevirtual |
Definition at line 200 of file project.h.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), DIALOG_PLOT::applyPlotSettings(), CONNECTION_GRAPH::buildConnectionGraph(), CVPCB_MAINFRAME::buildEquivalenceList(), CVPCB_MAINFRAME::BuildLibrariesList(), BOARD::ClearProject(), DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), SCHEMATIC::ErcSettings(), EVT_UPDATE_UI_RANGE(), FIELDS_GRID_TABLE::GetAttr(), SCH_ITEM::GetEffectiveNetClass(), PCB_EDIT_FRAME::GetLastPath(), SYMBOL_LIBS::GetLibNamesAndPaths(), SCH_EDIT_FRAME::GetSchematicJunctionSize(), GetSheetName(), GetTextVars(), API_HANDLER_COMMON::handleGetNetClasses(), DIALOG_EXPORT_2581::Init(), DIALOG_PLOT::init_Dialog(), DIALOG_EXPORT_SVG::initDialog(), DIALOG_GEN_FOOTPRINT_POSITION::initDialog(), FIELDS_GRID_TABLE::initGrid(), PCB_EDIT_FRAME::LoadDrawingSheet(), PCBNEW_JOBS_HANDLER::loadOverrideDrawingSheet(), PCB_EDIT_FRAME::LoadProjectSettings(), SCH_IO_ALTIUM::LoadSchematicFile(), SIMULATOR_FRAME::LoadSettings(), DIALOG_SCHEMATIC_SETUP::onAuxiliaryAction(), DIALOG_BOARD_SETUP::onAuxiliaryAction(), PCB_EDIT_FRAME::onBoardLoaded(), DIALOG_GEN_FOOTPRINT_POSITION::OnGenerate(), DIALOG_CONFIG_EQUFILES::OnOkClick(), PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER(), SCH_EDIT_FRAME::RecalculateConnections(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SCHEMATIC::Reset(), SAVE_AS_DIALOG::SAVE_AS_DIALOG(), SCH_EDIT_FRAME::SaveProject(), KICAD_MANAGER_CONTROL::SaveProjectAs(), PCB_EDIT_FRAME::SaveProjectLocalSettings(), SCH_EDIT_FRAME::saveProjectSettings(), ROUTER_TOOL::saveRouterDebugLog(), SIMULATOR_FRAME::SaveSettings(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), PCB_EDIT_FRAME::SetLastPath(), SYMBOL_LIBS::SetLibNamesAndPaths(), SCHEMATIC::SetProject(), BOARD::SetProject(), SCHEMATIC::Settings(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), ERC_TESTER::TestMissingNetclasses(), DIALOG_ASSIGN_NETCLASS::TransferDataFromWindow(), DIALOG_EXPORT_2581::TransferDataFromWindow(), DIALOG_EXPORT_SVG::~DIALOG_EXPORT_SVG(), and EDA_3D_VIEWER_FRAME::~EDA_3D_VIEWER_FRAME().
|
virtual |
Return the full path and name of the project.
This is the same as the name of the project file (.pro prior to version 6 and .kicad_prj from version 6 onwards) and will always be an absolute path.
Definition at line 129 of file project.cpp.
References m_project_name.
Referenced by AbsolutePath(), DIALOG_SYMBOL_REMAP::backupProject(), DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS(), SCH_EDIT_FRAME::doCloseWindow(), BOARD_EDITOR_CONTROL::ExportNetlist(), SYMBOL_EDITOR_CONTROL::ExportSymbolAsSVG(), SYMBOL_EDITOR_CONTROL::ExportView(), BACK_ANNOTATE::FetchNetlistFromPCB(), TEST_NETLIST_EXPORTER_SPICE_FIXTURE::GetNetlistPath(), TEST_SIM_REGRESSIONS_FIXTURE::GetNetlistPath(), KICAD_MANAGER_FRAME::GetProjectFileName(), SCH_EDITOR_CONTROL::ImportFPAssignments(), SCH_DRAWING_TOOLS::ImportSheet(), libTableName(), SYMBOL_LIBS::LoadAllLibraries(), SETTINGS_MANAGER::loadProjectFile(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_EDIT_FRAME::OnImportProject(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), SETTINGS_MANAGER::SaveProject(), SETTINGS_MANAGER::SaveProjectAs(), SETTINGS_MANAGER::SaveProjectCopy(), PCB_EDIT_FRAME::SaveProjectLocalSettings(), PCB_EDIT_FRAME::saveProjectSettings(), setProjectFullName(), EDA_3D_VIEWER_FRAME::takeScreenshot(), SETTINGS_MANAGER::UnloadProject(), SETTINGS_MANAGER::unloadProjectFile(), and SCH_EDIT_FRAME::updateAutoSaveFile().
|
virtual |
Return the short name of the project.
This is the file name without extension or path.
Definition at line 147 of file project.cpp.
References m_project_name.
Referenced by SIMULATOR_CONTROL::getDefaultFilename(), SCH_IO_ALTIUM::getLibName(), SCH_IO_EAGLE::getLibName(), SETTINGS_MANAGER::GetProjectBackupsPath(), SCH_IO_EAGLE::loadLibrary(), DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged(), SCH_EDITOR_CONTROL::Paste(), SCH_EDITOR_CONTROL::prunePastedSymbolInstances(), SCHEMATIC::ResolveTextVar(), BOARD::ResolveTextVar(), KICAD_MANAGER_CONTROL::SaveProjectAs(), DIALOG_BOARD_STATISTICS::saveReportClicked(), SCH_IO_KICAD_SEXPR::saveSheet(), PROJECT_FILE::SaveToFile(), PROJECT_LOCAL_SETTINGS::SaveToFile(), SETTINGS_MANAGER::TriggerBackupIfNeeded(), SCH_EDITOR_CONTROL::updatePastedSymbol(), and NETLIST_EXPORTER_SPICE_MODEL::WriteHead().
|
virtual |
Return the full path of the project.
This is the path of the project file and will always be an absolute path, ending with a path separator.
Definition at line 135 of file project.cpp.
References m_project_name.
Referenced by PANEL_SYM_LIB_TABLE::browseLibrariesHandler(), SCH_EDIT_FRAME::createNewDesignBlockLibrary(), PCB_BASE_EDIT_FRAME::createNewLibrary(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), KICAD_MANAGER_CONTROL::Execute(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), SIMULATOR_CONTROL::getDefaultPath(), FOOTPRINT_LIST::GetInstance(), SCH_IO_ALTIUM::getLibFileName(), SCH_IO_EAGLE::getLibFileName(), SETTINGS_MANAGER::GetPathForSettingsFile(), SETTINGS_MANAGER::GetProjectBackupsPath(), FIELDS_GRID_TABLE::initGrid(), SIMULATOR_FRAME_UI::InitWorkbook(), InvokeEditDesignBlockLibTable(), InvokePcbLibTableEditor(), InvokeSchEditSymbolLibTable(), EDA_DRAW_FRAME::LibraryFileBrowser(), LTSPICE_SCHEMATIC::Load(), PCBNEW_JOBS_HANDLER::loadOverrideDrawingSheet(), SCH_EDIT_FRAME::LoadProject(), SCH_IO_ALTIUM::LoadSchematicFile(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_EAGLE::LoadSchematicFile(), SCH_IO_EASYEDAPRO::LoadSchematicFile(), SCH_IO_KICAD_LEGACY::LoadSchematicFile(), SCH_IO_KICAD_SEXPR::LoadSchematicFile(), CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(), SCH_EDIT_FRAME::LoadSheetFromFile(), CADSTAR_SCH_ARCHIVE_LOADER::loadSheets(), SIMULATOR_FRAME_UI::LoadWorkbook(), NormalizePath(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), DIALOG_SIM_MODEL< T >::onBrowseButtonClick(), WX_HTML_REPORT_PANEL::onBtnSaveToFile(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), DIALOG_ERC::OnSaveReport(), DIALOG_DRC::OnSaveReport(), PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), SCH_IO_ALTIUM::ParseAltiumSch(), SCH_IO_ALTIUM::ParseHarnessType(), SCH_EDITOR_CONTROL::Paste(), PathIsInsideProject(), SYMBOL_EDIT_FRAME::replaceLibTableEntry(), ResolveFile(), SETTINGS_MANAGER::SaveProject(), SIMULATOR_FRAME_UI::SaveWorkbook(), FILENAME_RESOLVER::SetProject(), PANEL_SYM_LIB_TABLE::setupGrid(), SCH_EDIT_FRAME::WriteNetListFile(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().
|
virtual |
Return a "retained string", which is any session and project specific string identified in enum RSTRING_T.
Retained strings are not written to disk, and are therefore good only for the current session.
Definition at line 318 of file project.cpp.
References m_rstrings.
Referenced by PCB_EDIT_FRAME::ExportFootprintsToLibrary(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), SYMBOL_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), SYMBOL_EDIT_FRAME::saveLibrary(), and SCH_BASE_FRAME::SelectLibraryFromList().
|
virtual |
Return the name of the sheet identified by the given UUID.
Definition at line 292 of file project.cpp.
References KIID::AsString(), GetProjectFile(), and m_sheetNames.
|
virtual |
Definition at line 84 of file project.cpp.
References GetProjectFile(), and PROJECT_FILE::m_TextVars.
Referenced by ApplyTextVars(), PANEL_TEXT_VARIABLES::checkReload(), DIALOG_TABLE_PROPERTIES::getContextualTextVars(), DIALOG_TEXT_PROPERTIES::getContextualTextVars(), PANEL_TEXT_VARIABLES::ImportSettingsFrom(), CADSTAR_SCH_ARCHIVE_LOADER::loadTextVariables(), CADSTAR_PCB_ARCHIVE_LOADER::loadTextVariables(), NETLIST_EXPORTER_XML::makeDesignHeader(), SCH_FIELD::OnScintillaCharAdded(), PROPERTIES_FRAME::onScintillaCharAdded(), SCH_IO_ALTIUM::ParseParameter(), BOARD::SynchronizeProperties(), TextVarResolver(), PANEL_TEXT_VARIABLES::TransferDataFromWindow(), and PANEL_TEXT_VARIABLES::TransferDataToWindow().
|
inline |
Definition at line 114 of file project.h.
Referenced by PANEL_SETUP_NETCLASSES::checkReload(), PANEL_TEXT_VARIABLES::checkReload(), PANEL_TEXT_VARIABLES::ImportSettingsFrom(), PANEL_TEXT_VARIABLES::PANEL_TEXT_VARIABLES(), and PANEL_TEXT_VARIABLES::TransferDataToWindow().
|
inline |
Definition at line 118 of file project.h.
Referenced by PCB_EDIT_FRAME::ShowBoardSetupDialog(), and SCH_EDIT_FRAME::ShowSchematicSetupDialog().
|
inline |
Definition at line 115 of file project.h.
Referenced by PCB_EDIT_FRAME::ShowBoardSetupDialog(), and SCH_EDIT_FRAME::ShowSchematicSetupDialog().
|
virtual |
Check if this project is a null project (i.e.
the default project object created when no real project is open).
The null project still presents all the same project interface, but is not backed by any files, so saving it makes no sense.
Definition at line 153 of file project.cpp.
References m_project_name.
Referenced by AskSaveBoardFileName(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), PANEL_SETUP_RULES::ImportSettingsFrom(), InvokeEditDesignBlockLibTable(), InvokePcbLibTableEditor(), InvokeSchEditSymbolLibTable(), EDA_DRAW_FRAME::LibraryFileBrowser(), SYMBOL_LIBS::LoadAllLibraries(), PCB_EDIT_FRAME::SaveProjectLocalSettings(), BOARD::SynchronizeProperties(), PANEL_SETUP_RULES::TransferDataFromWindow(), and PANEL_SETUP_RULES::TransferDataToWindow().
|
inlinevirtual |
Definition at line 162 of file project.h.
Referenced by SETTINGS_MANAGER::SaveProject(), and SETTINGS_MANAGER::SaveProjectAs().
|
private |
Return the full path and file name of the project specific library table aLibTableName.
Definition at line 247 of file project.cpp.
References GetProjectFullName(), KIPLATFORM::ENV::GetUserConfigPath(), and path.
Referenced by DesignBlockLibTblName(), FootprintLibTblName(), and SymbolLibTableName().
|
virtual |
Return the table of footprint libraries.
Requires an active Kiway as this is fetched from Pcbnew.
Definition at line 378 of file project.cpp.
References _, DisplayErrorMessage(), KIWAY::FACE_PCB, FootprintLibTblName(), FPTBL, GetElem(), IFACE::IfaceOrAddress(), kiface(), KIWAY::KiFACE(), KIFACE_NEW_FOOTPRINT_TABLE, LIB_TABLE::Load(), FP_LIB_TABLE::ProjectElementType(), SetElem(), and IO_ERROR::What().
Referenced by FOOTPRINT_SELECT_WIDGET::Load().
void PROJECT::PinLibrary | ( | const wxString & | aLibrary, |
enum LIB_TYPE_T | aLibType | ||
) |
Definition at line 177 of file project.cpp.
References alg::contains(), DESIGN_BLOCK_LIB, FOOTPRINT_LIB, PGM_BASE::GetCommonSettings(), GetSettingsManager(), PGM_BASE::GetSettingsManager(), PROJECT_FILE::m_PinnedDesignBlockLibs, PROJECT_FILE::m_PinnedFootprintLibs, PROJECT_FILE::m_PinnedSymbolLibs, m_projectFile, COMMON_SETTINGS::m_Session, Pgm(), COMMON_SETTINGS::SESSION::pinned_design_block_libs, COMMON_SETTINGS::SESSION::pinned_fp_libs, COMMON_SETTINGS::SESSION::pinned_symbol_libs, SETTINGS_MANAGER::SaveProject(), JSON_SETTINGS::SaveToFile(), and SYMBOL_LIB.
Referenced by LIBRARY_EDITOR_CONTROL::PinLibrary(), SCH_DESIGN_BLOCK_CONTROL::PinLibrary(), and LIB_TREE_MODEL_ADAPTER::PinLibrary().
|
virtual |
Definition at line 348 of file project.cpp.
References m_elems.
Referenced by DesignBlockLibs(), ElemsClear(), PROJECT_PCB::Get3DCacheManager(), KI_TEST::LoadSchematic(), SCH_IO_ALTIUM::LoadSchematicFile(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_EAGLE::LoadSchematicFile(), SCH_IO_EASYEDAPRO::LoadSchematicFile(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), SCH_EDIT_FRAME::OpenProjectFiles(), PcbFootprintLibs(), PROJECT_PCB::PcbFootprintLibs(), PROJECT_SCH::SchLibs(), PROJECT_SCH::SchSearchS(), PROJECT_SCH::SchSymbolLibTable(), KICAD_MANAGER_CONTROL::ShowPluginManager(), LEGACY_RESCUER::WriteRescueLibrary(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().
|
inlineprivatevirtual |
Set the local settings backing store.
This should only be called by SETTINGS_MANAGER on load.
aSettings | is the local settings object (may or may not exist on disk at this point) |
|
inlineprivatevirtual |
Set the backing store file for this project.
This should only be called by #SETTINGS_MANGER on load.
aFile | is a loaded PROJECT_FILE. |
Definition at line 322 of file project.h.
Referenced by SETTINGS_MANAGER::loadProjectFile().
|
privatevirtual |
Set the full directory, basename, and extension of the project.
This is the name of the project file with full absolute path and it also defines the name of the project. The project name and the project file names are exactly the same, providing the project filename is absolute.
Definition at line 105 of file project.cpp.
References Clear(), GetProjectFullName(), m_project_name, FILEEXT::ProjectFileExtension, TO_UTF8, and tracePathsAndFiles.
Referenced by SETTINGS_MANAGER::SaveProjectAs().
|
inlinevirtual |
Definition at line 164 of file project.h.
Referenced by SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::SavePcbFile(), and SCH_EDIT_FRAME::SaveProject().
|
virtual |
Store a "retained string", which is any session and project specific string identified in enum RSTRING_T.
Retained strings are not written to disk, and are therefore good only for the current session.
Definition at line 307 of file project.cpp.
References m_rstrings.
Referenced by PCB_EDIT_FRAME::ExportFootprintsToLibrary(), SYMBOL_EDIT_FRAME::GetCurLib(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SYMBOL_EDIT_FRAME::saveLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), SYMBOL_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), and SYMBOL_EDIT_FRAME::SetCurSymbol().
|
virtual |
Return the path and file name of this projects symbol library table.
Definition at line 159 of file project.cpp.
References libTableName().
|
virtual |
Definition at line 72 of file project.cpp.
References GetTextVars().
Referenced by ExpandTextVars(), and KIwxExpandEnvVars().
void PROJECT::UnpinLibrary | ( | const wxString & | aLibrary, |
enum LIB_TYPE_T | aLibType | ||
) |
Definition at line 214 of file project.cpp.
References alg::delete_matching(), DESIGN_BLOCK_LIB, FOOTPRINT_LIB, PGM_BASE::GetCommonSettings(), GetSettingsManager(), PGM_BASE::GetSettingsManager(), PROJECT_FILE::m_PinnedDesignBlockLibs, PROJECT_FILE::m_PinnedFootprintLibs, PROJECT_FILE::m_PinnedSymbolLibs, m_projectFile, COMMON_SETTINGS::m_Session, Pgm(), COMMON_SETTINGS::SESSION::pinned_design_block_libs, COMMON_SETTINGS::SESSION::pinned_fp_libs, COMMON_SETTINGS::SESSION::pinned_symbol_libs, SETTINGS_MANAGER::SaveProject(), JSON_SETTINGS::SaveToFile(), and SYMBOL_LIB.
Referenced by LIBRARY_EDITOR_CONTROL::UnpinLibrary(), SCH_DESIGN_BLOCK_CONTROL::UnpinLibrary(), and LIB_TREE_MODEL_ADAPTER::UnpinLibrary().
|
friend |
|
private |
|
private |
Backing store for project local settings – owned by SETTINGS_MANAGER.
|
private |
|
private |
<fullpath>/<basename>.pro
Definition at line 345 of file project.h.
Referenced by GetProjectDirectory(), GetProjectFullName(), GetProjectName(), GetProjectPath(), IsNullProject(), and setProjectFullName().
|
private |
Backing store for project data – owned by SETTINGS_MANAGER.
Definition at line 353 of file project.h.
Referenced by PinLibrary(), and UnpinLibrary().
|
private |
|
private |
Definition at line 361 of file project.h.
Referenced by GetRString(), and SetRString().
|
private |
Definition at line 358 of file project.h.
Referenced by GetSheetName().
|
private |