|
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, bool aFlattenSymbol) |
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 621 of file symbol_editor.cpp.
|
strong |
| Enumerator | |
|---|---|
| OVERWRITE | |
| RENAME | |
Definition at line 624 of file symbol_editor.cpp.
|
inline |
Definition at line 635 of file symbol_editor.cpp.
References m_libMgr, m_strategy, and m_valueFollowsName.
|
inline |
Definition at line 642 of file symbol_editor.cpp.
References LIB_SYMBOL::Flatten(), 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(), and UTF8::wx_str().
Referenced by SYMBOL_EDIT_FRAME::ExportSymbol(), and SYMBOL_EDIT_FRAME::saveSymbolCopyAs().
|
inlineprivate |
Definition at line 719 of file symbol_editor.cpp.
References m_libMgr, m_strategy, OVERWRITE, and RENAME.
Referenced by DoSave().
|
private |
Definition at line 751 of file symbol_editor.cpp.
Referenced by DoSave(), resolveConflict(), and SYMBOL_SAVE_AS_HANDLER().
|
private |
Definition at line 752 of file symbol_editor.cpp.
Referenced by resolveConflict(), and SYMBOL_SAVE_AS_HANDLER().
|
private |
Definition at line 753 of file symbol_editor.cpp.
Referenced by DoSave(), and SYMBOL_SAVE_AS_HANDLER().