KiCad PCB EDA Suite
|
#include <project_rescue.h>
Public Member Functions | |
LEGACY_RESCUER (PROJECT &aProject, SCHEMATIC *aSchematic, SCH_SHEET_PATH *aCurrentSheet, EDA_DRAW_PANEL_GAL::GAL_TYPE aGalBackEndType) | |
virtual | ~LEGACY_RESCUER ()=default |
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::unique_ptr< SYMBOL_LIB > | m_rescue_lib |
Definition at line 343 of file project_rescue.h.
|
inline |
Definition at line 346 of file project_rescue.h.
References RESCUER::RESCUER().
|
virtualdefault |
|
overridevirtual |
Implements RESCUER.
Definition at line 741 of file project_rescue.cpp.
References m_rescue_lib, and LIB_SYMBOL::SetLib().
|
inherited |
Perform all chosen rescue actions, logging them to be undone if necessary.
Definition at line 517 of file project_rescue.cpp.
References m_chosen_candidates.
Referenced by RescueProject().
|
overridevirtual |
Populate the RESCUER with all possible candidates.
Implements RESCUER.
Definition at line 619 of file project_rescue.cpp.
References RESCUE_CACHE_CANDIDATE::FindRescues(), RESCUE_CASE_CANDIDATE::FindRescues(), and RESCUER::m_all_candidates.
|
inlineinherited |
Return the number of rescue candidates found.
Definition at line 289 of file project_rescue.h.
References m_all_candidates.
Referenced by RescueProject(), and SCH_EDITOR_CONTROL::rescueProject().
|
inlineinherited |
Get the number of rescue candidates chosen by the user.
Definition at line 294 of file project_rescue.h.
References m_chosen_candidates.
Referenced by RescueProject().
|
inlineinherited |
Return the #SCH_PROJECT object for access to the symbol libraries.
Definition at line 304 of file project_rescue.h.
References m_prj.
Referenced by RESCUE_CACHE_CANDIDATE::FindRescues(), RESCUE_CASE_CANDIDATE::FindRescues(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues().
|
inlineinherited |
Get the list of symbols that need rescued.
Definition at line 299 of file project_rescue.h.
References m_symbols.
Referenced by RESCUE_CACHE_CANDIDATE::FindRescues(), RESCUE_CASE_CANDIDATE::FindRescues(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues(), RESCUE_CACHE_CANDIDATE::PerformAction(), RESCUE_CASE_CANDIDATE::PerformAction(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::PerformAction().
|
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 626 of file project_rescue.cpp.
References InvokeDialogRescueEach(), RESCUER::m_currentSheet, RESCUER::m_galBackEndType, and RESCUER::RESCUER().
|
inherited |
Used by individual RESCUE_CANDIDATE objects to log a rescue for undoing.
Definition at line 507 of file project_rescue.cpp.
References m_rescue_log, RESCUE_LOG::new_name, RESCUE_LOG::old_name, and RESCUE_LOG::symbol.
Referenced by RESCUE_CACHE_CANDIDATE::PerformAction(), RESCUE_CASE_CANDIDATE::PerformAction(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::PerformAction().
|
overridevirtual |
Implements RESCUER.
Definition at line 633 of file project_rescue.cpp.
References SYMBOL_LIBS::FindLibrary(), GetRescueLibraryFileName(), SYMBOL_LIB::GetSymbols(), LT_EESCHEMA, RESCUER::m_prj, m_rescue_lib, RESCUER::m_schematic, and PROJECT_SCH::SchLibs().
|
inherited |
Filter out duplicately named rescue candidates.
Definition at line 588 of file project_rescue.cpp.
References m_all_candidates.
Referenced by RescueProject().
|
staticinherited |
Definition at line 542 of file project_rescue.cpp.
References _, DoRescues(), FindCandidates(), GetCandidateCount(), GetChosenCandidateCount(), InvokeDialog(), OpenRescueLibrary(), RemoveDuplicates(), RESCUER(), UndoRescues(), and WriteRescueLibrary().
Referenced by DIALOG_SYMBOL_REMAP::OnRemapSymbols(), and SCH_EDITOR_CONTROL::rescueProject().
|
inlineinherited |
Definition at line 306 of file project_rescue.h.
References m_schematic.
Referenced by RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues().
|
inherited |
Reverse the effects of all rescues on the project.
Definition at line 529 of file project_rescue.cpp.
References m_rescue_log, and LIB_ID::SetLibItemName().
Referenced by RescueProject().
|
overridevirtual |
Write the rescue library.
Called after successful PerformAction()s. If this fails, undo the actions.
Implements RESCUER.
Definition at line 663 of file project_rescue.cpp.
References _, DisplayError(), SYMBOL_LIBS::GetLibNamesAndPaths(), SYMBOL_LIBS::LoadAllLibraries(), RESCUER::m_prj, m_rescue_lib, RESCUER::m_schematic, PROJECT::SCH_SYMBOL_LIBS, SYMBOL_LIBS::SetLibNamesAndPaths(), and SCH_SCREENS::UpdateSymbolLinks().
|
protectedinherited |
Definition at line 336 of file project_rescue.h.
Referenced by LEGACY_RESCUER::FindCandidates(), SYMBOL_LIB_TABLE_RESCUER::FindCandidates(), GetCandidateCount(), and RemoveDuplicates().
|
protectedinherited |
Definition at line 337 of file project_rescue.h.
Referenced by DoRescues(), and GetChosenCandidateCount().
|
protectedinherited |
Definition at line 334 of file project_rescue.h.
Referenced by LEGACY_RESCUER::InvokeDialog(), SYMBOL_LIB_TABLE_RESCUER::InvokeDialog(), and RESCUER().
|
protectedinherited |
Definition at line 333 of file project_rescue.h.
Referenced by LEGACY_RESCUER::InvokeDialog(), SYMBOL_LIB_TABLE_RESCUER::InvokeDialog(), and RESCUER().
|
protectedinherited |
Definition at line 331 of file project_rescue.h.
Referenced by GetPrj(), LEGACY_RESCUER::OpenRescueLibrary(), SYMBOL_LIB_TABLE_RESCUER::OpenRescueLibrary(), RESCUER(), LEGACY_RESCUER::WriteRescueLibrary(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().
|
private |
Definition at line 365 of file project_rescue.h.
Referenced by AddSymbol(), OpenRescueLibrary(), and WriteRescueLibrary().
|
protectedinherited |
Definition at line 339 of file project_rescue.h.
Referenced by LogRescue(), and UndoRescues().
|
protectedinherited |
Definition at line 332 of file project_rescue.h.
Referenced by LEGACY_RESCUER::OpenRescueLibrary(), SYMBOL_LIB_TABLE_RESCUER::OpenRescueLibrary(), RESCUER(), Schematic(), LEGACY_RESCUER::WriteRescueLibrary(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().
|
protectedinherited |
Definition at line 330 of file project_rescue.h.
Referenced by GetSymbols(), and RESCUER().