|
KiCad PCB EDA Suite
|
#include <project_rescue.h>
Public Member Functions | |
| RESCUER (PROJECT &aProject, SCHEMATIC *aSchematic, SCH_SHEET_PATH *aCurrentSheet, EDA_DRAW_PANEL_GAL::GAL_TYPE aGalBackeEndType) | |
| virtual | ~RESCUER ()=default |
| virtual bool | WriteRescueLibrary (wxWindow *aParent)=0 |
| Write the rescue library. | |
| virtual void | OpenRescueLibrary ()=0 |
| virtual void | FindCandidates ()=0 |
| Populate the RESCUER with all possible candidates. | |
| virtual void | AddSymbol (LIB_SYMBOL *aNewSymbol)=0 |
| virtual void | InvokeDialog (wxWindow *aParent, bool aAskShowAgain)=0 |
| Display a dialog to allow the user to select rescues. | |
| 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 |
Friends | |
| class | DIALOG_RESCUE_EACH |
Definition at line 249 of file project_rescue.h.
| RESCUER::RESCUER | ( | PROJECT & | aProject, |
| SCHEMATIC * | aSchematic, | ||
| SCH_SHEET_PATH * | aCurrentSheet, | ||
| EDA_DRAW_PANEL_GAL::GAL_TYPE | aGalBackeEndType ) |
Definition at line 493 of file project_rescue.cpp.
References getSymbols(), SCH_SHEET_PATH::LastScreen(), m_currentSheet, m_galBackEndType, m_prj, m_schematic, m_symbols, and SCH_SCREEN::Schematic().
Referenced by LEGACY_RESCUER::InvokeDialog(), SYMBOL_LIB_TABLE_RESCUER::InvokeDialog(), LEGACY_RESCUER::LEGACY_RESCUER(), RescueProject(), and SYMBOL_LIB_TABLE_RESCUER::SYMBOL_LIB_TABLE_RESCUER().
|
virtualdefault |
|
pure virtual |
Implemented in LEGACY_RESCUER, and SYMBOL_LIB_TABLE_RESCUER.
Referenced by RESCUE_CACHE_CANDIDATE::PerformAction(), RESCUE_CASE_CANDIDATE::PerformAction(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::PerformAction().
| bool RESCUER::DoRescues | ( | ) |
Perform all chosen rescue actions, logging them to be undone if necessary.
Definition at line 519 of file project_rescue.cpp.
References m_chosen_candidates.
Referenced by RescueProject().
|
pure virtual |
Populate the RESCUER with all possible candidates.
Implemented in LEGACY_RESCUER, and SYMBOL_LIB_TABLE_RESCUER.
Referenced by RescueProject().
|
inline |
Return the number of rescue candidates found.
Definition at line 290 of file project_rescue.h.
References m_all_candidates.
Referenced by RescueProject(), and SCH_EDITOR_CONTROL::rescueProject().
|
inline |
Get the number of rescue candidates chosen by the user.
Definition at line 295 of file project_rescue.h.
References m_chosen_candidates.
Referenced by RescueProject().
|
inline |
Return the #SCH_PROJECT object for access to the symbol libraries.
Definition at line 305 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().
|
inline |
Get the list of symbols that need rescued.
Definition at line 300 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().
|
pure virtual |
Display a dialog to allow the user to select rescues.
| aAskShowAgain | - whether the "Never Show Again" button should be visible |
Implemented in LEGACY_RESCUER, and SYMBOL_LIB_TABLE_RESCUER.
Referenced by RescueProject().
| void RESCUER::LogRescue | ( | SCH_SYMBOL * | aSymbol, |
| const wxString & | aOldName, | ||
| const wxString & | aNewName ) |
Used by individual RESCUE_CANDIDATE objects to log a rescue for undoing.
Definition at line 509 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().
|
pure virtual |
Implemented in LEGACY_RESCUER, and SYMBOL_LIB_TABLE_RESCUER.
Referenced by RescueProject().
| void RESCUER::RemoveDuplicates | ( | ) |
Filter out duplicately named rescue candidates.
Definition at line 590 of file project_rescue.cpp.
References m_all_candidates.
Referenced by RescueProject().
|
static |
Definition at line 544 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().
|
inline |
Definition at line 307 of file project_rescue.h.
References m_schematic.
Referenced by RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues().
| void RESCUER::UndoRescues | ( | ) |
Reverse the effects of all rescues on the project.
Definition at line 531 of file project_rescue.cpp.
References m_rescue_log, and LIB_ID::SetLibItemName().
Referenced by RescueProject().
|
pure virtual |
Write the rescue library.
Called after successful PerformAction()s. If this fails, undo the actions.
Implemented in LEGACY_RESCUER, and SYMBOL_LIB_TABLE_RESCUER.
Referenced by RescueProject().
|
friend |
Definition at line 329 of file project_rescue.h.
References DIALOG_RESCUE_EACH.
Referenced by DIALOG_RESCUE_EACH.
|
protected |
Definition at line 337 of file project_rescue.h.
Referenced by LEGACY_RESCUER::FindCandidates(), SYMBOL_LIB_TABLE_RESCUER::FindCandidates(), GetCandidateCount(), and RemoveDuplicates().
|
protected |
Definition at line 338 of file project_rescue.h.
Referenced by DoRescues(), and GetChosenCandidateCount().
|
protected |
Definition at line 335 of file project_rescue.h.
Referenced by LEGACY_RESCUER::InvokeDialog(), SYMBOL_LIB_TABLE_RESCUER::InvokeDialog(), and RESCUER().
|
protected |
Definition at line 334 of file project_rescue.h.
Referenced by LEGACY_RESCUER::InvokeDialog(), SYMBOL_LIB_TABLE_RESCUER::InvokeDialog(), and RESCUER().
|
protected |
Definition at line 332 of file project_rescue.h.
Referenced by GetPrj(), LEGACY_RESCUER::OpenRescueLibrary(), SYMBOL_LIB_TABLE_RESCUER::OpenRescueLibrary(), RESCUER(), and LEGACY_RESCUER::WriteRescueLibrary().
|
protected |
Definition at line 340 of file project_rescue.h.
Referenced by LogRescue(), and UndoRescues().
|
protected |
Definition at line 333 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().
|
protected |
Definition at line 331 of file project_rescue.h.
Referenced by GetSymbols(), and RESCUER().