|
KiCad PCB EDA Suite
|
#include <headless_symbol_editor_context.h>
Public Member Functions | |
| HEADLESS_SYMBOL_EDITOR_CONTEXT (std::unique_ptr< LIB_SYMBOL > aSymbol, const LIB_ID &aLibId, PROJECT *aProject, APP_SETTINGS_BASE *aSettings, KIWAY *aKiway=nullptr) | |
| ~HEADLESS_SYMBOL_EDITOR_CONTEXT () override | |
| LIB_SYMBOL * | GetCurSymbol () const override |
| SCH_SCREEN * | GetScreen () const override |
| LIB_ID | GetLoadedLibId () const override |
| bool | IsContentModified () const override |
| void | SetContentModified (bool aModified=true) override |
| PROJECT & | Prj () const override |
| TOOL_MANAGER * | GetToolManager () const override |
| KIWAY * | GetKiway () const override |
| bool | CanAcceptApiCommands () const override |
| bool | SaveSymbol () override |
| Save the current symbol to its library, without any user interaction. | |
| bool | SaveSymbolCopy (const wxString &aFileName, bool aOverwrite) override |
| Save a copy of the current symbol to the given library file, without user interaction. | |
| bool | RevertSymbol () override |
| Reload the current symbol from its library, discarding unsaved changes. | |
| bool | LoadSymbol (const LIB_ID &aLibId) override |
| Load a symbol into the editor (activating it for editing); false if not found. | |
Private Attributes | |
| std::unique_ptr< LIB_SYMBOL > | m_symbol |
| std::unique_ptr< SCH_SCREEN > | m_screen |
| LIB_ID | m_libId |
| PROJECT * | m_project |
| KIWAY * | m_kiway |
| bool | m_contentModified = false |
| std::unique_ptr< TOOL_MANAGER > | m_toolManager |
Definition at line 36 of file headless_symbol_editor_context.h.
| HEADLESS_SYMBOL_EDITOR_CONTEXT::HEADLESS_SYMBOL_EDITOR_CONTEXT | ( | std::unique_ptr< LIB_SYMBOL > | aSymbol, |
| const LIB_ID & | aLibId, | ||
| PROJECT * | aProject, | ||
| APP_SETTINGS_BASE * | aSettings, | ||
| KIWAY * | aKiway = nullptr ) |
Definition at line 33 of file headless_symbol_editor_context.cpp.
References m_kiway, m_libId, m_project, m_screen, m_symbol, m_toolManager, and move.
|
overridedefault |
|
inlineoverridevirtual |
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 61 of file headless_symbol_editor_context.h.
|
inlineoverridevirtual |
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 45 of file headless_symbol_editor_context.h.
References m_symbol.
|
inlineoverridevirtual |
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 59 of file headless_symbol_editor_context.h.
References m_kiway.
|
inlineoverridevirtual |
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 49 of file headless_symbol_editor_context.h.
References m_libId.
|
inlineoverridevirtual |
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 47 of file headless_symbol_editor_context.h.
References m_screen.
|
overridevirtual |
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 64 of file headless_symbol_editor_context.cpp.
References m_toolManager.
|
inlineoverridevirtual |
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 51 of file headless_symbol_editor_context.h.
References m_contentModified.
|
overridevirtual |
Load a symbol into the editor (activating it for editing); false if not found.
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 132 of file headless_symbol_editor_context.cpp.
References SYMBOL_LIBRARY_ADAPTER::LoadSymbol(), m_contentModified, m_libId, m_project, m_symbol, and PROJECT_SCH::SymbolLibAdapter().
|
overridevirtual |
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 57 of file headless_symbol_editor_context.cpp.
References m_project.
|
overridevirtual |
Reload the current symbol from its library, discarding unsaved changes.
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 111 of file headless_symbol_editor_context.cpp.
References SYMBOL_LIBRARY_ADAPTER::LoadSymbol(), m_contentModified, m_libId, m_project, m_symbol, and PROJECT_SCH::SymbolLibAdapter().
|
overridevirtual |
Save the current symbol to its library, without any user interaction.
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 70 of file headless_symbol_editor_context.cpp.
References copy, SYMBOL_LIBRARY_ADAPTER::IsSymbolLibWritable(), m_contentModified, m_libId, m_project, m_symbol, SYMBOL_LIBRARY_ADAPTER::SAVE_OK, SYMBOL_LIBRARY_ADAPTER::SaveSymbol(), and PROJECT_SCH::SymbolLibAdapter().
|
overridevirtual |
Save a copy of the current symbol to the given library file, without user interaction.
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 103 of file headless_symbol_editor_context.cpp.
References m_symbol, and SaveSymbolCopyToFile().
|
inlineoverridevirtual |
Implements SYMBOL_EDITOR_CONTEXT.
Definition at line 53 of file headless_symbol_editor_context.h.
References m_contentModified.
|
private |
Definition at line 77 of file headless_symbol_editor_context.h.
Referenced by IsContentModified(), LoadSymbol(), RevertSymbol(), SaveSymbol(), and SetContentModified().
|
private |
Definition at line 76 of file headless_symbol_editor_context.h.
Referenced by GetKiway(), and HEADLESS_SYMBOL_EDITOR_CONTEXT().
|
private |
Definition at line 74 of file headless_symbol_editor_context.h.
Referenced by GetLoadedLibId(), HEADLESS_SYMBOL_EDITOR_CONTEXT(), LoadSymbol(), RevertSymbol(), and SaveSymbol().
|
private |
Definition at line 75 of file headless_symbol_editor_context.h.
Referenced by HEADLESS_SYMBOL_EDITOR_CONTEXT(), LoadSymbol(), Prj(), RevertSymbol(), and SaveSymbol().
|
private |
Definition at line 73 of file headless_symbol_editor_context.h.
Referenced by GetScreen(), and HEADLESS_SYMBOL_EDITOR_CONTEXT().
|
private |
Definition at line 72 of file headless_symbol_editor_context.h.
Referenced by GetCurSymbol(), HEADLESS_SYMBOL_EDITOR_CONTEXT(), LoadSymbol(), RevertSymbol(), SaveSymbol(), and SaveSymbolCopy().
|
private |
Definition at line 78 of file headless_symbol_editor_context.h.
Referenced by GetToolManager(), and HEADLESS_SYMBOL_EDITOR_CONTEXT().