KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SYMBOL_LIB_TABLE_RESCUER Class Reference

#include <project_rescue.h>

Inheritance diagram for SYMBOL_LIB_TABLE_RESCUER:
RESCUER

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.
 
PROJECTGetPrj ()
 Return the #SCH_PROJECT object for access to the symbol libraries.
 
SCHEMATICSchematic ()
 
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
 
PROJECTm_prj
 
SCHEMATICm_schematic
 
EDA_DRAW_PANEL_GAL::GAL_TYPE m_galBackEndType
 
SCH_SHEET_PATHm_currentSheet
 
boost::ptr_vector< RESCUE_CANDIDATEm_all_candidates
 
std::vector< RESCUE_CANDIDATE * > m_chosen_candidates
 
std::vector< RESCUE_LOGm_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.
 

Detailed Description

Definition at line 357 of file project_rescue.h.

Constructor & Destructor Documentation

◆ SYMBOL_LIB_TABLE_RESCUER()

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.

◆ ~SYMBOL_LIB_TABLE_RESCUER()

virtual SYMBOL_LIB_TABLE_RESCUER::~SYMBOL_LIB_TABLE_RESCUER ( )
inlinevirtual

Definition at line 364 of file project_rescue.h.

Member Function Documentation

◆ AddSymbol()

void SYMBOL_LIB_TABLE_RESCUER::AddSymbol ( LIB_SYMBOL aNewSymbol)
overridevirtual

Implements RESCUER.

Definition at line 917 of file project_rescue.cpp.

References m_rescueLibSymbols.

◆ DoRescues()

bool RESCUER::DoRescues ( )
inherited

Perform all chosen rescue actions, logging them to be undone if necessary.

Returns
True on success

Definition at line 565 of file project_rescue.cpp.

References RESCUER::m_chosen_candidates.

Referenced by RESCUER::RescueProject().

◆ FindCandidates()

void SYMBOL_LIB_TABLE_RESCUER::FindCandidates ( )
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.

◆ GetCandidateCount()

size_t RESCUER::GetCandidateCount ( )
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().

◆ GetChosenCandidateCount()

size_t RESCUER::GetChosenCandidateCount ( )
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().

◆ GetPrj()

PROJECT * RESCUER::GetPrj ( )
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().

◆ GetSymbols()

◆ InvokeDialog()

void SYMBOL_LIB_TABLE_RESCUER::InvokeDialog ( wxWindow *  aParent,
bool  aAskShowAgain 
)
overridevirtual

Display a dialog to allow the user to select rescues.

Parameters
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.

◆ LogRescue()

void RESCUER::LogRescue ( SCH_SYMBOL aSymbol,
const wxString &  aOldName,
const wxString &  aNewName 
)
inherited

◆ OpenRescueLibrary()

◆ RemoveDuplicates()

void RESCUER::RemoveDuplicates ( )
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().

◆ RescueProject()

◆ Schematic()

SCHEMATIC * RESCUER::Schematic ( )
inlineinherited

Definition at line 292 of file project_rescue.h.

References RESCUER::m_schematic.

Referenced by RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues().

◆ UndoRescues()

void RESCUER::UndoRescues ( )
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().

◆ WriteRescueLibrary()

Member Data Documentation

◆ m_all_candidates

◆ m_chosen_candidates

◆ m_currentSheet

SCH_SHEET_PATH* RESCUER::m_currentSheet
protectedinherited

Definition at line 320 of file project_rescue.h.

Referenced by LEGACY_RESCUER::InvokeDialog(), InvokeDialog(), and RESCUER::RESCUER().

◆ m_galBackEndType

EDA_DRAW_PANEL_GAL::GAL_TYPE RESCUER::m_galBackEndType
protectedinherited

Definition at line 319 of file project_rescue.h.

Referenced by LEGACY_RESCUER::InvokeDialog(), InvokeDialog(), and RESCUER::RESCUER().

◆ m_prj

◆ m_properties

std::unique_ptr<std::map<std::string, UTF8> > SYMBOL_LIB_TABLE_RESCUER::m_properties
private

Library plugin properties.

Definition at line 381 of file project_rescue.h.

Referenced by SYMBOL_LIB_TABLE_RESCUER(), and WriteRescueLibrary().

◆ m_rescue_log

std::vector<RESCUE_LOG> RESCUER::m_rescue_log
protectedinherited

Definition at line 325 of file project_rescue.h.

Referenced by RESCUER::LogRescue(), and RESCUER::UndoRescues().

◆ m_rescueLibSymbols

std::vector<std::unique_ptr<LIB_SYMBOL> > SYMBOL_LIB_TABLE_RESCUER::m_rescueLibSymbols
private

Definition at line 379 of file project_rescue.h.

Referenced by AddSymbol(), OpenRescueLibrary(), and WriteRescueLibrary().

◆ m_schematic

◆ m_symbols

std::vector<SCH_SYMBOL*> RESCUER::m_symbols
protectedinherited

Definition at line 316 of file project_rescue.h.

Referenced by RESCUER::GetSymbols(), and RESCUER::RESCUER().


The documentation for this class was generated from the following files: