KiCad PCB EDA Suite
|
This is a class that handles state involved in saving a symbol copy as a new symbol. More...
Public Types | |
enum class | CONFLICT_STRATEGY { OVERWRITE , RENAME } |
Public Member Functions | |
SYMBOL_SAVE_AS_HANDLER (LIB_SYMBOL_LIBRARY_MANAGER &aLibMgr, CONFLICT_STRATEGY aStrategy, bool aValueFollowsName) | |
bool | DoSave (LIB_SYMBOL &symbol, const wxString &aNewSymName, const wxString &aNewLibName) |
Private Member Functions | |
wxString | resolveConflict (const wxString &proposed, const wxString &aNewLibName) const |
Private Attributes | |
LIB_SYMBOL_LIBRARY_MANAGER & | m_libMgr |
CONFLICT_STRATEGY | m_strategy |
bool | m_valueFollowsName |
This is a class that handles state involved in saving a symbol copy as a new symbol.
This isn't as simple as it sounds, because you also have to copy all the parent symbols (which is a chain affair).
Definition at line 681 of file symbol_editor.cpp.
|
strong |
Enumerator | |
---|---|
OVERWRITE | |
RENAME |
Definition at line 684 of file symbol_editor.cpp.
|
inline |
Definition at line 695 of file symbol_editor.cpp.
|
inline |
Definition at line 701 of file symbol_editor.cpp.
References SYMBOL_LIBRARY_MANAGER::GetAlias(), LIB_SYMBOL::GetLibId(), LIB_ID::GetLibNickname(), GetParentChain(), LIB_SYMBOL::GetValueField(), m_libMgr, m_valueFollowsName, resolveConflict(), LIB_SYMBOL::SetName(), LIB_SYMBOL::SetParent(), SCH_FIELD::SetText(), LIB_SYMBOL::SharedPtr(), SYMBOL_LIBRARY_MANAGER::UpdateSymbol(), and UTF8::wx_str().
Referenced by SYMBOL_EDIT_FRAME::saveSymbolCopyAs().
|
inlineprivate |
Definition at line 761 of file symbol_editor.cpp.
References m_libMgr, m_strategy, OVERWRITE, RENAME, and SYMBOL_LIBRARY_MANAGER::SymbolExists().
Referenced by DoSave().
|
private |
Definition at line 793 of file symbol_editor.cpp.
Referenced by DoSave(), and resolveConflict().
|
private |
Definition at line 794 of file symbol_editor.cpp.
Referenced by resolveConflict().
|
private |
Definition at line 795 of file symbol_editor.cpp.
Referenced by DoSave().