KiCad PCB EDA Suite
|
#include <project_rescue.h>
Public Member Functions | |
SYMBOL_LIB_TABLE_RESCUER (PROJECT &aProject, SCHEMATIC *aSchematic, SCH_SHEET_PATH *aCurrentSheet, EDA_DRAW_PANEL_GAL::GAL_TYPE aGalBackeEndType) | |
virtual | ~SYMBOL_LIB_TABLE_RESCUER () |
virtual void | FindCandidates () override |
Populate the RESCUER with all possible candidates. | |
virtual void | InvokeDialog (wxWindow *aParent, bool aAskShowAgain) override |
Display a dialog to allow the user to select rescues. | |
virtual void | OpenRescueLibrary () override |
virtual bool | WriteRescueLibrary (wxWindow *aParent) override |
Write the rescue library. | |
virtual void | AddSymbol (LIB_SYMBOL *aNewSymbol) override |
void | RemoveDuplicates () |
Filter out duplicately named rescue candidates. | |
size_t | GetCandidateCount () |
Return the number of rescue candidates found. | |
size_t | GetChosenCandidateCount () |
Get the number of rescue candidates chosen by the user. | |
std::vector< SCH_SYMBOL * > * | GetSymbols () |
Get the list of symbols that need rescued. | |
PROJECT * | GetPrj () |
Return the #SCH_PROJECT object for access to the symbol libraries. | |
SCHEMATIC * | Schematic () |
void | LogRescue (SCH_SYMBOL *aSymbol, const wxString &aOldName, const wxString &aNewName) |
Used by individual RESCUE_CANDIDATE objects to log a rescue for undoing. | |
bool | DoRescues () |
Perform all chosen rescue actions, logging them to be undone if necessary. | |
void | UndoRescues () |
Reverse the effects of all rescues on the project. | |
Static Public Member Functions | |
static bool | RescueProject (wxWindow *aParent, RESCUER &aRescuer, bool aRunningOnDemand) |
Protected Attributes | |
std::vector< SCH_SYMBOL * > | m_symbols |
PROJECT * | m_prj |
SCHEMATIC * | m_schematic |
EDA_DRAW_PANEL_GAL::GAL_TYPE | m_galBackEndType |
SCH_SHEET_PATH * | m_currentSheet |
boost::ptr_vector< RESCUE_CANDIDATE > | m_all_candidates |
std::vector< RESCUE_CANDIDATE * > | m_chosen_candidates |
std::vector< RESCUE_LOG > | m_rescue_log |
Private Attributes | |
std::vector< std::unique_ptr< LIB_SYMBOL > > | m_rescueLibSymbols |
std::unique_ptr< std::map< std::string, UTF8 > > | m_properties |
Library plugin properties. | |
Definition at line 357 of file project_rescue.h.
SYMBOL_LIB_TABLE_RESCUER::SYMBOL_LIB_TABLE_RESCUER | ( | PROJECT & | aProject, |
SCHEMATIC * | aSchematic, | ||
SCH_SHEET_PATH * | aCurrentSheet, | ||
EDA_DRAW_PANEL_GAL::GAL_TYPE | aGalBackeEndType | ||
) |
Definition at line 802 of file project_rescue.cpp.
References m_properties.
|
inlinevirtual |
Definition at line 364 of file project_rescue.h.
|
overridevirtual |
Implements RESCUER.
Definition at line 917 of file project_rescue.cpp.
References m_rescueLibSymbols.
|
inherited |
Perform all chosen rescue actions, logging them to be undone if necessary.
Definition at line 565 of file project_rescue.cpp.
References RESCUER::m_chosen_candidates.
Referenced by RESCUER::RescueProject().
|
overridevirtual |
Populate the RESCUER with all possible candidates.
Implements RESCUER.
Definition at line 811 of file project_rescue.cpp.
References RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues(), and RESCUER::m_all_candidates.
|
inlineinherited |
Return the number of rescue candidates found.
Definition at line 275 of file project_rescue.h.
References RESCUER::m_all_candidates.
Referenced by SCH_EDITOR_CONTROL::rescueProject(), RESCUER::RescueProject(), and DIALOG_RESCUE_EACH::TransferDataFromWindow().
|
inlineinherited |
Get the number of rescue candidates chosen by the user.
Definition at line 280 of file project_rescue.h.
References RESCUER::m_chosen_candidates.
Referenced by RESCUER::RescueProject().
|
inlineinherited |
Return the #SCH_PROJECT object for access to the symbol libraries.
Definition at line 290 of file project_rescue.h.
References RESCUER::m_prj.
Referenced by RESCUE_CASE_CANDIDATE::FindRescues(), RESCUE_CACHE_CANDIDATE::FindRescues(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues().
|
inlineinherited |
Get the list of symbols that need rescued.
Definition at line 285 of file project_rescue.h.
References RESCUER::m_symbols.
Referenced by RESCUE_CASE_CANDIDATE::FindRescues(), RESCUE_CACHE_CANDIDATE::FindRescues(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues(), RESCUE_CASE_CANDIDATE::PerformAction(), RESCUE_CACHE_CANDIDATE::PerformAction(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::PerformAction(), and DIALOG_RESCUE_EACH::PopulateInstanceList().
|
overridevirtual |
Display a dialog to allow the user to select rescues.
aAskShowAgain | - whether the "Never Show Again" button should be visible |
Implements RESCUER.
Definition at line 817 of file project_rescue.cpp.
References InvokeDialogRescueEach(), RESCUER::m_currentSheet, and RESCUER::m_galBackEndType.
|
inherited |
Used by individual RESCUE_CANDIDATE objects to log a rescue for undoing.
Definition at line 554 of file project_rescue.cpp.
References RESCUER::m_rescue_log, RESCUE_LOG::new_name, RESCUE_LOG::old_name, and RESCUE_LOG::symbol.
Referenced by RESCUE_CASE_CANDIDATE::PerformAction(), RESCUE_CACHE_CANDIDATE::PerformAction(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::PerformAction().
|
overridevirtual |
Implements RESCUER.
Definition at line 824 of file project_rescue.cpp.
References SCH_IO_MGR::EnumFromStr(), SYMBOL_LIB_TABLE::FindRow(), GetRescueLibraryFileName(), SYMBOL_LIB_TABLE_ROW::GetType(), FILEEXT::KiCadSymbolLibFileExtension, SYMBOL_LIB_TABLE::LoadSymbolLib(), RESCUER::m_prj, m_rescueLibSymbols, RESCUER::m_schematic, SCH_IO_KICAD_LEGACY::PropBuffering, and PROJECT_SCH::SchSymbolLibTable().
|
inherited |
Filter out duplicately named rescue candidates.
Definition at line 636 of file project_rescue.cpp.
References RESCUER::m_all_candidates.
Referenced by RESCUER::RescueProject().
|
staticinherited |
Definition at line 590 of file project_rescue.cpp.
References _, RESCUER::DoRescues(), RESCUER::FindCandidates(), RESCUER::GetCandidateCount(), RESCUER::GetChosenCandidateCount(), RESCUER::InvokeDialog(), RESCUER::OpenRescueLibrary(), RESCUER::RemoveDuplicates(), RESCUER::UndoRescues(), and RESCUER::WriteRescueLibrary().
Referenced by DIALOG_SYMBOL_REMAP::OnRemapSymbols(), and SCH_EDITOR_CONTROL::rescueProject().
|
inlineinherited |
Definition at line 292 of file project_rescue.h.
References RESCUER::m_schematic.
Referenced by RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues().
|
inherited |
Reverse the effects of all rescues on the project.
Definition at line 577 of file project_rescue.cpp.
References RESCUER::m_rescue_log, and LIB_ID::SetLibItemName().
Referenced by RESCUER::RescueProject().
|
overridevirtual |
Write the rescue library.
Called after successful PerformAction()s. If this fails, undo the actions.
Implements RESCUER.
Definition at line 856 of file project_rescue.cpp.
References _, DisplayErrorMessage(), SCH_IO_MGR::EnumFromStr(), SYMBOL_LIB_TABLE::FindRow(), PROJECT::GetProjectPath(), GetRescueLibraryFileName(), SYMBOL_LIB_TABLE::GetSymbolLibTableFileName(), SYMBOL_LIB_TABLE_ROW::GetType(), LIB_TABLE::InsertRow(), FILEEXT::KiCadSymbolLibFileExtension, RESCUER::m_prj, m_properties, m_rescueLibSymbols, RESCUER::m_schematic, SCHEMATIC::Root(), LIB_TABLE::Save(), PROJECT_SCH::SchSymbolLibTable(), PROJECT::SetElem(), PROJECT::SYMBOL_LIB_TABLE, SCH_SCREENS::UpdateSymbolLinks(), and IO_ERROR::What().
|
protectedinherited |
Definition at line 322 of file project_rescue.h.
Referenced by DIALOG_RESCUE_EACH::displayItemsInConflict(), LEGACY_RESCUER::FindCandidates(), FindCandidates(), RESCUER::GetCandidateCount(), DIALOG_RESCUE_EACH::PopulateConflictList(), DIALOG_RESCUE_EACH::PopulateInstanceList(), RESCUER::RemoveDuplicates(), and DIALOG_RESCUE_EACH::TransferDataFromWindow().
|
protectedinherited |
Definition at line 323 of file project_rescue.h.
Referenced by RESCUER::DoRescues(), RESCUER::GetChosenCandidateCount(), DIALOG_RESCUE_EACH::OnCancelClick(), DIALOG_RESCUE_EACH::OnNeverShowClick(), and DIALOG_RESCUE_EACH::TransferDataFromWindow().
|
protectedinherited |
Definition at line 320 of file project_rescue.h.
Referenced by LEGACY_RESCUER::InvokeDialog(), InvokeDialog(), and RESCUER::RESCUER().
|
protectedinherited |
Definition at line 319 of file project_rescue.h.
Referenced by LEGACY_RESCUER::InvokeDialog(), InvokeDialog(), and RESCUER::RESCUER().
|
protectedinherited |
Definition at line 317 of file project_rescue.h.
Referenced by RESCUER::GetPrj(), LEGACY_RESCUER::OpenRescueLibrary(), OpenRescueLibrary(), RESCUER::RESCUER(), LEGACY_RESCUER::WriteRescueLibrary(), and WriteRescueLibrary().
|
private |
Library plugin properties.
Definition at line 381 of file project_rescue.h.
Referenced by SYMBOL_LIB_TABLE_RESCUER(), and WriteRescueLibrary().
|
protectedinherited |
Definition at line 325 of file project_rescue.h.
Referenced by RESCUER::LogRescue(), and RESCUER::UndoRescues().
|
private |
Definition at line 379 of file project_rescue.h.
Referenced by AddSymbol(), OpenRescueLibrary(), and WriteRescueLibrary().
|
protectedinherited |
Definition at line 318 of file project_rescue.h.
Referenced by LEGACY_RESCUER::OpenRescueLibrary(), OpenRescueLibrary(), RESCUER::RESCUER(), RESCUER::Schematic(), LEGACY_RESCUER::WriteRescueLibrary(), and WriteRescueLibrary().
|
protectedinherited |
Definition at line 316 of file project_rescue.h.
Referenced by RESCUER::GetSymbols(), and RESCUER::RESCUER().