KiCad PCB EDA Suite
|
Dialog to show and edit symbol library tables. More...
#include <panel_sym_lib_table.h>
Public Member Functions | |
PANEL_SYM_LIB_TABLE (DIALOG_EDIT_LIBRARY_TABLES *aParent, PROJECT *m_project, SYMBOL_LIB_TABLE *aGlobal, const wxString &aGlobalTablePath, SYMBOL_LIB_TABLE *aProject, const wxString &aProjectTablePath) | |
virtual | ~PANEL_SYM_LIB_TABLE () |
Protected Member Functions | |
virtual void | onPageChange (wxNotebookEvent &event) |
Protected Attributes | |
wxNotebook * | m_notebook |
wxPanel * | m_global_panel |
WX_GRID * | m_global_grid |
wxPanel * | m_project_panel |
WX_GRID * | m_project_grid |
STD_BITMAP_BUTTON * | m_append_button |
STD_BITMAP_BUTTON * | m_browse_button |
STD_BITMAP_BUTTON * | m_move_up_button |
STD_BITMAP_BUTTON * | m_move_down_button |
STD_BITMAP_BUTTON * | m_delete_button |
wxButton * | m_resetGlobal |
wxButton * | m_convertLegacy |
WX_GRID * | m_path_subs_grid |
Private Member Functions | |
bool | verifyTables () |
Trim important fields, removes blank row entries, and checks for duplicates. | |
void | OnUpdateUI (wxUpdateUIEvent &event) override |
void | browseLibrariesHandler (wxCommandEvent &event) override |
void | appendRowHandler (wxCommandEvent &event) override |
void | deleteRowHandler (wxCommandEvent &event) override |
void | moveUpHandler (wxCommandEvent &event) override |
void | moveDownHandler (wxCommandEvent &event) override |
void | onSizeGrid (wxSizeEvent &event) override |
void | adjustPathSubsGridColumns (int aWidth) |
void | onConvertLegacyLibraries (wxCommandEvent &event) override |
void | onGridCellLeftClickHandler (wxGridEvent &event) |
void | onPageChange (wxBookCtrlEvent &event) override |
void | onReset (wxCommandEvent &event) override |
void | setupGrid (WX_GRID *aGrid) |
bool | TransferDataFromWindow () override |
void | populateEnvironReadOnlyTable () |
Populate the readonly environment variable table with names and values by examining all the full_uri columns. | |
SYMBOL_LIB_TABLE_GRID * | global_model () const |
SYMBOL_LIB_TABLE_GRID * | project_model () const |
SYMBOL_LIB_TABLE_GRID * | cur_model () const |
bool | allowAutomaticPluginTypeSelection (wxString &aLibraryPath) |
Private Attributes | |
SYMBOL_LIB_TABLE * | m_globalTable |
SYMBOL_LIB_TABLE * | m_projectTable |
PROJECT * | m_project |
DIALOG_EDIT_LIBRARY_TABLES * | m_parent |
wxArrayString | m_pluginChoices |
WX_GRID * | m_cur_grid |
changed based on tab choice | |
wxString | m_lastProjectLibDir |
Static Private Attributes | |
static size_t | m_pageNdx = 0 |
Remember the last notebook page selected. | |
Dialog to show and edit symbol library tables.
Definition at line 35 of file panel_sym_lib_table.h.
PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE | ( | DIALOG_EDIT_LIBRARY_TABLES * | aParent, |
PROJECT * | m_project, | ||
SYMBOL_LIB_TABLE * | aGlobal, | ||
const wxString & | aGlobalTablePath, | ||
SYMBOL_LIB_TABLE * | aProject, | ||
const wxString & | aProjectTablePath | ||
) |
Definition at line 320 of file panel_sym_lib_table.cpp.
References _, SETTINGS_MANAGER::GetAppSettings(), PATHS::GetDefaultUserSymbolsPath(), PROJECT::GetProjectPath(), PGM_BASE::GetSettingsManager(), KiBitmapBundle(), PANEL_SYM_LIB_TABLE_BASE::m_append_button, PANEL_SYM_LIB_TABLE_BASE::m_browse_button, m_cur_grid, PANEL_SYM_LIB_TABLE_BASE::m_delete_button, PANEL_SYM_LIB_TABLE_BASE::m_global_grid, m_globalTable, m_lastProjectLibDir, EESCHEMA_SETTINGS::m_lastSymbolLibDir, PANEL_SYM_LIB_TABLE_BASE::m_move_down_button, PANEL_SYM_LIB_TABLE_BASE::m_move_up_button, PANEL_SYM_LIB_TABLE_BASE::m_notebook, m_pageNdx, m_parent, PANEL_SYM_LIB_TABLE_BASE::m_path_subs_grid, m_pluginChoices, m_project, PANEL_SYM_LIB_TABLE_BASE::m_project_grid, m_projectTable, onGridCellLeftClickHandler(), Pgm(), populateEnvironReadOnlyTable(), STD_BITMAP_BUTTON::SetBitmap(), DIALOG_SHIM::SetInitialFocus(), WX_GRID::SetTable(), setupGrid(), and SCH_IO_MGR::ShowType().
|
virtual |
Definition at line 395 of file panel_sym_lib_table.cpp.
References PANEL_SYM_LIB_TABLE_BASE::m_global_grid, PANEL_SYM_LIB_TABLE_BASE::m_path_subs_grid, PANEL_SYM_LIB_TABLE_BASE::m_project_grid, and onGridCellLeftClickHandler().
|
private |
Definition at line 1105 of file panel_sym_lib_table.cpp.
References PANEL_SYM_LIB_TABLE_BASE::m_path_subs_grid.
Referenced by onSizeGrid(), and populateEnvironReadOnlyTable().
|
private |
Definition at line 412 of file panel_sym_lib_table.cpp.
References FILEEXT::LegacySymbolLibFileExtension.
Referenced by verifyTables().
|
overrideprivatevirtual |
Reimplemented from PANEL_SYM_LIB_TABLE_BASE.
Definition at line 719 of file panel_sym_lib_table.cpp.
References COL_ENABLED, COL_NICKNAME, WX_GRID::CommitPendingChanges(), and m_cur_grid.
|
overrideprivatevirtual |
Reimplemented from PANEL_SYM_LIB_TABLE_BASE.
Definition at line 604 of file panel_sym_lib_table.cpp.
References _, COL_ENABLED, COL_NICKNAME, COL_TYPE, COL_URI, cur_model(), IO_BASE::IO_FILE_DESC::FileFilter(), fileType(), LIB_ID::FixIllegalChars(), formatWildcardExt(), SETTINGS_MANAGER::GetAppSettings(), PGM_BASE::GetLocalEnvVariables(), PROJECT::GetProjectPath(), PGM_BASE::GetSettingsManager(), SCH_IO_MGR::GuessPluginTypeFromLibPath(), m_cur_grid, IO_BASE::IO_FILE_DESC::m_FileExtensions, PANEL_SYM_LIB_TABLE_BASE::m_global_grid, m_lastProjectLibDir, EESCHEMA_SETTINGS::m_lastSymbolLibDir, m_pageNdx, m_project, PANEL_SYM_LIB_TABLE_BASE::m_project_grid, NormalizePath(), OKOrCancelDialog(), path, Pgm(), and SCH_IO_MGR::ShowType().
|
private |
Definition at line 1136 of file panel_sym_lib_table.cpp.
References m_cur_grid.
Referenced by browseLibrariesHandler(), moveDownHandler(), moveUpHandler(), and verifyTables().
|
overrideprivatevirtual |
Reimplemented from PANEL_SYM_LIB_TABLE_BASE.
Definition at line 737 of file panel_sym_lib_table.cpp.
References WX_GRID::CommitPendingChanges(), and m_cur_grid.
|
private |
Definition at line 1124 of file panel_sym_lib_table.cpp.
References PANEL_SYM_LIB_TABLE_BASE::m_global_grid.
Referenced by populateEnvironReadOnlyTable(), TransferDataFromWindow(), and verifyTables().
|
overrideprivatevirtual |
Reimplemented from PANEL_SYM_LIB_TABLE_BASE.
Definition at line 829 of file panel_sym_lib_table.cpp.
References LIB_TABLE::ChangeRowOrder(), WX_GRID::CommitPendingChanges(), cur_model(), m_cur_grid, and LIB_TABLE::m_rows.
|
overrideprivatevirtual |
Reimplemented from PANEL_SYM_LIB_TABLE_BASE.
Definition at line 803 of file panel_sym_lib_table.cpp.
References LIB_TABLE::ChangeRowOrder(), WX_GRID::CommitPendingChanges(), cur_model(), and m_cur_grid.
|
overrideprivatevirtual |
Reimplemented from PANEL_SYM_LIB_TABLE_BASE.
Definition at line 905 of file panel_sym_lib_table.cpp.
References _, COL_NICKNAME, COL_OPTIONS, COL_TYPE, COL_URI, WX_GRID::CommitPendingChanges(), SCH_IO_MGR::ConvertLibrary(), DisplayErrorMessage(), ExpandEnvVarSubstitutions(), IsOK(), m_cur_grid, PANEL_SYM_LIB_TABLE_BASE::m_global_grid, m_parent, m_project, NormalizePath(), LIB_TABLE::ParseOptions(), Pgm(), and SCH_IO_MGR::ShowType().
|
private |
Definition at line 1142 of file panel_sym_lib_table.cpp.
References grid.
Referenced by PANEL_SYM_LIB_TABLE(), and ~PANEL_SYM_LIB_TABLE().
|
overrideprivate |
Definition at line 888 of file panel_sym_lib_table.cpp.
References m_cur_grid, PANEL_SYM_LIB_TABLE_BASE::m_global_grid, PANEL_SYM_LIB_TABLE_BASE::m_notebook, m_pageNdx, PANEL_SYM_LIB_TABLE_BASE::m_project_grid, and PANEL_SYM_LIB_TABLE_BASE::m_resetGlobal.
|
inlineprotectedvirtualinherited |
Definition at line 59 of file panel_sym_lib_table_base.h.
Referenced by PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), and PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE().
|
overrideprivatevirtual |
Reimplemented from PANEL_SYM_LIB_TABLE_BASE.
Definition at line 855 of file panel_sym_lib_table.cpp.
References _, WX_GRID::CommitPendingChanges(), WX_GRID::DestroyTable(), IsOK(), m_cur_grid, PANEL_SYM_LIB_TABLE_BASE::m_global_grid, m_globalTable, DIALOG_EDIT_LIBRARY_TABLES::m_GlobalTableChanged, m_parent, WX_GRID::SetTable(), setupGrid(), and DIALOG_SHIM::ShowModal().
|
overrideprivatevirtual |
Reimplemented from PANEL_SYM_LIB_TABLE_BASE.
Definition at line 1116 of file panel_sym_lib_table.cpp.
References adjustPathSubsGridColumns().
|
overrideprivatevirtual |
Reimplemented from PANEL_SYM_LIB_TABLE_BASE.
Definition at line 599 of file panel_sym_lib_table.cpp.
|
private |
Populate the readonly environment variable table with names and values by examining all the full_uri columns.
Definition at line 1041 of file panel_sym_lib_table.cpp.
References adjustPathSubsGridColumns(), WX_GRID::ClearRows(), COL_URI, global_model(), SYMBOL_LIB_TABLE::GlobalPathEnvVariableName(), PANEL_SYM_LIB_TABLE_BASE::m_path_subs_grid, project_model(), and PROJECT_VAR_NAME.
Referenced by PANEL_SYM_LIB_TABLE().
|
private |
Definition at line 1130 of file panel_sym_lib_table.cpp.
References PANEL_SYM_LIB_TABLE_BASE::m_project_grid.
Referenced by populateEnvironReadOnlyTable(), TransferDataFromWindow(), and verifyTables().
|
private |
Definition at line 239 of file panel_sym_lib_table.cpp.
References SETTINGS_MANAGER::GetAppSettings(), PROJECT::GetProjectPath(), PGM_BASE::GetSettingsManager(), grid, EESCHEMA_SETTINGS::m_lastSymbolLibDir, m_parent, m_project, and Pgm().
Referenced by onReset(), and PANEL_SYM_LIB_TABLE().
|
overrideprivate |
Definition at line 1017 of file panel_sym_lib_table.cpp.
References WX_GRID::CommitPendingChanges(), global_model(), m_cur_grid, m_globalTable, DIALOG_EDIT_LIBRARY_TABLES::m_GlobalTableChanged, m_parent, m_projectTable, DIALOG_EDIT_LIBRARY_TABLES::m_ProjectTableChanged, project_model(), LIB_TABLE::TransferRows(), and verifyTables().
|
private |
Trim important fields, removes blank row entries, and checks for duplicates.
Definition at line 429 of file panel_sym_lib_table.cpp.
References _, allowAutomaticPluginTypeSelection(), COL_NICKNAME, COL_TYPE, COL_URI, cur_model(), LIB_ID::FindIllegalLibraryNameChar(), LIB_TABLE_ROW::GetIsEnabled(), LIB_TABLE_ROW::GetNickName(), global_model(), m_cur_grid, DIALOG_EDIT_LIBRARY_TABLES::m_GlobalTableChanged, PANEL_SYM_LIB_TABLE_BASE::m_notebook, m_parent, DIALOG_EDIT_LIBRARY_TABLES::m_ProjectTableChanged, project_model(), SYMBOL_LIB_TABLE_ROW::Refresh(), LIB_TABLE_ROW::SetParent(), and IO_ERROR::What().
Referenced by TransferDataFromWindow().
|
protectedinherited |
Definition at line 48 of file panel_sym_lib_table_base.h.
Referenced by PANEL_SYM_LIB_TABLE(), PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), and PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE().
|
protectedinherited |
Definition at line 49 of file panel_sym_lib_table_base.h.
Referenced by PANEL_SYM_LIB_TABLE(), PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), and PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE().
|
protectedinherited |
Definition at line 54 of file panel_sym_lib_table_base.h.
Referenced by PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), and PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE().
|
private |
changed based on tab choice
Definition at line 97 of file panel_sym_lib_table.h.
Referenced by appendRowHandler(), browseLibrariesHandler(), cur_model(), deleteRowHandler(), moveDownHandler(), moveUpHandler(), onConvertLegacyLibraries(), onPageChange(), onReset(), PANEL_SYM_LIB_TABLE(), TransferDataFromWindow(), and verifyTables().
|
protectedinherited |
Definition at line 52 of file panel_sym_lib_table_base.h.
Referenced by PANEL_SYM_LIB_TABLE(), PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), and PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE().
|
protectedinherited |
Definition at line 45 of file panel_sym_lib_table_base.h.
Referenced by browseLibrariesHandler(), global_model(), onConvertLegacyLibraries(), onPageChange(), onReset(), PANEL_SYM_LIB_TABLE(), PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), and ~PANEL_SYM_LIB_TABLE().
|
protectedinherited |
Definition at line 44 of file panel_sym_lib_table_base.h.
Referenced by PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE().
|
private |
Definition at line 90 of file panel_sym_lib_table.h.
Referenced by onReset(), PANEL_SYM_LIB_TABLE(), and TransferDataFromWindow().
|
private |
Definition at line 99 of file panel_sym_lib_table.h.
Referenced by browseLibrariesHandler(), and PANEL_SYM_LIB_TABLE().
|
protectedinherited |
Definition at line 51 of file panel_sym_lib_table_base.h.
Referenced by PANEL_SYM_LIB_TABLE(), PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), and PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE().
|
protectedinherited |
Definition at line 50 of file panel_sym_lib_table_base.h.
Referenced by PANEL_SYM_LIB_TABLE(), PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), and PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE().
|
protectedinherited |
Definition at line 43 of file panel_sym_lib_table_base.h.
Referenced by onPageChange(), PANEL_SYM_LIB_TABLE(), PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), verifyTables(), and PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE().
|
staticprivate |
Remember the last notebook page selected.
Definition at line 98 of file panel_sym_lib_table.h.
Referenced by browseLibrariesHandler(), onPageChange(), and PANEL_SYM_LIB_TABLE().
|
private |
Definition at line 94 of file panel_sym_lib_table.h.
Referenced by onConvertLegacyLibraries(), onReset(), PANEL_SYM_LIB_TABLE(), setupGrid(), TransferDataFromWindow(), and verifyTables().
|
protectedinherited |
Definition at line 55 of file panel_sym_lib_table_base.h.
Referenced by adjustPathSubsGridColumns(), PANEL_SYM_LIB_TABLE(), PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), populateEnvironReadOnlyTable(), ~PANEL_SYM_LIB_TABLE(), and PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE().
|
private |
Definition at line 95 of file panel_sym_lib_table.h.
Referenced by PANEL_SYM_LIB_TABLE().
|
private |
Definition at line 92 of file panel_sym_lib_table.h.
Referenced by browseLibrariesHandler(), onConvertLegacyLibraries(), PANEL_SYM_LIB_TABLE(), and setupGrid().
|
protectedinherited |
Definition at line 47 of file panel_sym_lib_table_base.h.
Referenced by browseLibrariesHandler(), onPageChange(), PANEL_SYM_LIB_TABLE(), PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), project_model(), and ~PANEL_SYM_LIB_TABLE().
|
protectedinherited |
Definition at line 46 of file panel_sym_lib_table_base.h.
Referenced by PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE().
|
private |
Definition at line 91 of file panel_sym_lib_table.h.
Referenced by PANEL_SYM_LIB_TABLE(), and TransferDataFromWindow().
|
protectedinherited |
Definition at line 53 of file panel_sym_lib_table_base.h.
Referenced by onPageChange(), PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE(), and PANEL_SYM_LIB_TABLE_BASE::~PANEL_SYM_LIB_TABLE_BASE().