KiCad PCB EDA Suite
|
#include <project_rescue.h>
Public Member Functions | |
RESCUE_SYMBOL_LIB_TABLE_CANDIDATE (const LIB_ID &aRequestedId, const LIB_ID &aNewId, LIB_SYMBOL *aCacheCandidate, LIB_SYMBOL *aLibCandidate, int aUnit=0, int aConvert=0) | |
Create RESCUE_CANDIDATE. | |
RESCUE_SYMBOL_LIB_TABLE_CANDIDATE () | |
virtual LIB_SYMBOL * | GetCacheCandidate () const override |
Get the part that can be loaded from the project cache, if possible, or else NULL. | |
virtual wxString | GetActionDescription () const override |
Get a description of the action proposed, for displaying in the UI. | |
virtual bool | PerformAction (RESCUER *aRescuer) override |
Perform the actual rescue action. | |
virtual wxString | GetRequestedName () const |
Get the name that was originally requested in the schematic. | |
virtual wxString | GetNewName () const |
Get the name we're proposing changing it to. | |
virtual LIB_SYMBOL * | GetLibCandidate () const |
Get the part the would be loaded from the libraries, if possible, or else NULL. | |
int | GetUnit () const |
int | GetConvert () const |
Static Public Member Functions | |
static void | FindRescues (RESCUER &aRescuer, boost::ptr_vector< RESCUE_CANDIDATE > &aCandidates) |
Grab all possible RESCUE_SYMBOL_LIB_TABLE_CANDIDATE objects into a vector. | |
Protected Attributes | |
wxString | m_requested_name |
wxString | m_new_name |
LIB_SYMBOL * | m_lib_candidate |
int | m_unit |
int | m_convert |
Private Attributes | |
LIB_ID | m_requested_id |
LIB_ID | m_new_id |
LIB_SYMBOL * | m_cache_candidate |
Definition at line 183 of file project_rescue.h.
RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::RESCUE_SYMBOL_LIB_TABLE_CANDIDATE | ( | const LIB_ID & | aRequestedId, |
const LIB_ID & | aNewId, | ||
LIB_SYMBOL * | aCacheCandidate, | ||
LIB_SYMBOL * | aLibCandidate, | ||
int | aUnit = 0 , |
||
int | aConvert = 0 |
||
) |
Create RESCUE_CANDIDATE.
aRequestedName | is the name the schematic asks for. |
aNewName | is the name we want to change it to. |
aCacheCandidate | is the part from the cache. |
aLibCandidate | is the part that would be loaded from the library. |
aUnit | is the unit of the rescued symbol. |
aConvert | is the body style of the rescued symbol. |
Definition at line 361 of file project_rescue.cpp.
References LIB_ID::Format(), m_cache_candidate, RESCUE_CANDIDATE::m_convert, RESCUE_CANDIDATE::m_lib_candidate, m_new_id, m_requested_id, RESCUE_CANDIDATE::m_requested_name, RESCUE_CANDIDATE::m_unit, and UTF8::wx_str().
RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::RESCUE_SYMBOL_LIB_TABLE_CANDIDATE | ( | ) |
Definition at line 379 of file project_rescue.cpp.
References m_cache_candidate, and RESCUE_CANDIDATE::m_lib_candidate.
Referenced by FindRescues().
|
static |
Grab all possible RESCUE_SYMBOL_LIB_TABLE_CANDIDATE objects into a vector.
aRescuer | is the working RESCUER instance. |
aCandidates | is the vector the will hold the candidates. |
Definition at line 386 of file project_rescue.cpp.
References CTX_LIBID, EscapeString(), findSymbol(), LIB_ID::Format(), LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), RESCUER::GetPrj(), GetRescueLibraryFileName(), LIB_SYMBOL::GetRootSymbol(), RESCUER::GetSymbols(), SCH_ITEM::GetUnit(), LIB_ID::HasIllegalChars(), LIB_SYMBOL::IsAlias(), LIB_SYMBOL::PinsConflictWith(), RESCUE_SYMBOL_LIB_TABLE_CANDIDATE(), RESCUER::Schematic(), SchGetLibSymbol(), PROJECT_SCH::SchLibs(), PROJECT_SCH::SchSymbolLibTable(), and UTF8::wx_str().
Referenced by SYMBOL_LIB_TABLE_RESCUER::FindCandidates().
|
overridevirtual |
Get a description of the action proposed, for displaying in the UI.
Implements RESCUE_CANDIDATE.
Definition at line 486 of file project_rescue.cpp.
References _, LIB_ID::Format(), LIB_ID::GetLibItemName(), m_cache_candidate, RESCUE_CANDIDATE::m_lib_candidate, m_new_id, m_requested_id, UnescapeString(), and UTF8::wx_str().
|
inlineoverridevirtual |
Get the part that can be loaded from the project cache, if possible, or else NULL.
Reimplemented from RESCUE_CANDIDATE.
Definition at line 210 of file project_rescue.h.
References m_cache_candidate.
|
inlineinherited |
Definition at line 92 of file project_rescue.h.
References RESCUE_CANDIDATE::m_convert.
Referenced by DIALOG_RESCUE_EACH::displayItemsInConflict().
|
inlinevirtualinherited |
Get the part the would be loaded from the libraries, if possible, or else NULL.
Definition at line 88 of file project_rescue.h.
References RESCUE_CANDIDATE::m_lib_candidate.
Referenced by DIALOG_RESCUE_EACH::displayItemsInConflict().
|
inlinevirtualinherited |
Get the name we're proposing changing it to.
Definition at line 76 of file project_rescue.h.
References RESCUE_CANDIDATE::m_new_name.
|
inlinevirtualinherited |
Get the name that was originally requested in the schematic.
Definition at line 71 of file project_rescue.h.
References RESCUE_CANDIDATE::m_requested_name.
Referenced by DIALOG_RESCUE_EACH::PopulateConflictList(), and DIALOG_RESCUE_EACH::PopulateInstanceList().
|
inlineinherited |
Definition at line 90 of file project_rescue.h.
References RESCUE_CANDIDATE::m_unit.
Referenced by DIALOG_RESCUE_EACH::displayItemsInConflict().
|
overridevirtual |
Perform the actual rescue action.
If successful, this must log the rescue using RESCUER::LogRescue to allow it to be reversed.
Implements RESCUE_CANDIDATE.
Definition at line 513 of file project_rescue.cpp.
References RESCUER::AddSymbol(), LIB_SYMBOL::Flatten(), LIB_ID::Format(), LIB_ID::GetLibItemName(), RESCUER::GetSymbols(), RESCUER::LogRescue(), m_cache_candidate, RESCUE_CANDIDATE::m_lib_candidate, m_new_id, and m_requested_id.
|
private |
Definition at line 219 of file project_rescue.h.
Referenced by GetActionDescription(), GetCacheCandidate(), PerformAction(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE().
|
protectedinherited |
Definition at line 111 of file project_rescue.h.
Referenced by RESCUE_CANDIDATE::GetConvert(), RESCUE_CACHE_CANDIDATE::RESCUE_CACHE_CANDIDATE(), RESCUE_CASE_CANDIDATE::RESCUE_CASE_CANDIDATE(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE().
|
protectedinherited |
Definition at line 109 of file project_rescue.h.
Referenced by RESCUE_CACHE_CANDIDATE::GetActionDescription(), GetActionDescription(), RESCUE_CANDIDATE::GetLibCandidate(), RESCUE_CASE_CANDIDATE::PerformAction(), RESCUE_CACHE_CANDIDATE::PerformAction(), PerformAction(), RESCUE_CACHE_CANDIDATE::RESCUE_CACHE_CANDIDATE(), RESCUE_CASE_CANDIDATE::RESCUE_CASE_CANDIDATE(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE().
|
private |
Definition at line 218 of file project_rescue.h.
Referenced by GetActionDescription(), PerformAction(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE().
|
protectedinherited |
Definition at line 108 of file project_rescue.h.
Referenced by RESCUE_CASE_CANDIDATE::GetActionDescription(), RESCUE_CACHE_CANDIDATE::GetActionDescription(), RESCUE_CANDIDATE::GetNewName(), RESCUE_CASE_CANDIDATE::PerformAction(), RESCUE_CACHE_CANDIDATE::PerformAction(), RESCUE_CACHE_CANDIDATE::RESCUE_CACHE_CANDIDATE(), and RESCUE_CASE_CANDIDATE::RESCUE_CASE_CANDIDATE().
|
private |
Definition at line 217 of file project_rescue.h.
Referenced by GetActionDescription(), PerformAction(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE().
|
protectedinherited |
Definition at line 107 of file project_rescue.h.
Referenced by RESCUE_CASE_CANDIDATE::GetActionDescription(), RESCUE_CACHE_CANDIDATE::GetActionDescription(), RESCUE_CANDIDATE::GetRequestedName(), RESCUE_CASE_CANDIDATE::PerformAction(), RESCUE_CACHE_CANDIDATE::PerformAction(), RESCUE_CACHE_CANDIDATE::RESCUE_CACHE_CANDIDATE(), RESCUE_CASE_CANDIDATE::RESCUE_CASE_CANDIDATE(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE().
|
protectedinherited |
Definition at line 110 of file project_rescue.h.
Referenced by RESCUE_CANDIDATE::GetUnit(), RESCUE_CACHE_CANDIDATE::RESCUE_CACHE_CANDIDATE(), RESCUE_CASE_CANDIDATE::RESCUE_CASE_CANDIDATE(), and RESCUE_SYMBOL_LIB_TABLE_CANDIDATE().