KiCad PCB EDA Suite
|
Dialog to show and edit symbol library tables. More...
#include <panel_fp_lib_table.h>
Public Member Functions | |
PANEL_FP_LIB_TABLE (DIALOG_EDIT_LIBRARY_TABLES *aParent, PROJECT *aProject, FP_LIB_TABLE *aGlobalTable, const wxString &aGlobalTblPath, FP_LIB_TABLE *aProjectTable, const wxString &aProjectTblPath, const wxString &aProjectBasePath) | |
~PANEL_FP_LIB_TABLE () override | |
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 |
SPLIT_BUTTON * | m_browseButton |
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_migrate_libs_button |
WX_GRID * | m_path_subs_grid |
Private Member Functions | |
bool | TransferDataFromWindow () override |
bool | verifyTables () |
Trim important fields, removes blank row entries, and checks for duplicates. | |
void | OnUpdateUI (wxUpdateUIEvent &event) override |
void | appendRowHandler (wxCommandEvent &event) override |
void | browseLibrariesHandler (wxCommandEvent &event) |
void | deleteRowHandler (wxCommandEvent &event) override |
void | moveUpHandler (wxCommandEvent &event) override |
void | moveDownHandler (wxCommandEvent &event) override |
void | onMigrateLibraries (wxCommandEvent &event) override |
void | onSizeGrid (wxSizeEvent &event) override |
void | onGridCellLeftClickHandler (wxGridEvent &event) |
void | onPageChange (wxBookCtrlEvent &event) override |
void | onReset (wxCommandEvent &event) override |
void | setupGrid (WX_GRID *aGrid) |
void | adjustPathSubsGridColumns (int aWidth) |
void | populateEnvironReadOnlyTable () |
Populate the readonly environment variable table with names and values by examining all the full_uri columns. | |
void | populatePluginList () |
FP_LIB_TABLE_GRID * | global_model () const |
FP_LIB_TABLE_GRID * | project_model () const |
FP_LIB_TABLE_GRID * | cur_model () const |
Private Attributes | |
FP_LIB_TABLE * | m_globalTable |
FP_LIB_TABLE * | m_projectTable |
PROJECT * | m_project |
wxString | m_projectBasePath |
DIALOG_EDIT_LIBRARY_TABLES * | m_parent |
wxArrayString | m_pluginChoices |
WX_GRID * | m_cur_grid |
wxString | m_lastProjectLibDir |
std::map< PCB_IO_MGR::PCB_FILE_T, IO_BASE::IO_FILE_DESC > | m_supportedFpFiles |
Static Private Attributes | |
static size_t | m_pageNdx = 0 |
Dialog to show and edit symbol library tables.
Definition at line 35 of file panel_fp_lib_table.h.
PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE | ( | DIALOG_EDIT_LIBRARY_TABLES * | aParent, |
PROJECT * | aProject, | ||
FP_LIB_TABLE * | aGlobalTable, | ||
const wxString & | aGlobalTblPath, | ||
FP_LIB_TABLE * | aProjectTable, | ||
const wxString & | aProjectTblPath, | ||
const wxString & | aProjectBasePath | ||
) |
Definition at line 389 of file panel_fp_lib_table.cpp.
References _, browseLibrariesHandler(), fileType(), SETTINGS_MANAGER::GetAppSettings(), PATHS::GetDefaultUserFootprintsPath(), PGM_BASE::GetSettingsManager(), SPLIT_BUTTON::GetSplitButtonMenu(), KiBitmapBundle(), PANEL_FP_LIB_TABLE_BASE::m_append_button, PANEL_FP_LIB_TABLE_BASE::m_browseButton, m_cur_grid, PANEL_FP_LIB_TABLE_BASE::m_delete_button, PANEL_FP_LIB_TABLE_BASE::m_global_grid, PCBNEW_SETTINGS::m_lastFootprintLibDir, m_lastProjectLibDir, PANEL_FP_LIB_TABLE_BASE::m_move_down_button, PANEL_FP_LIB_TABLE_BASE::m_move_up_button, PANEL_FP_LIB_TABLE_BASE::m_notebook, m_pageNdx, m_parent, PANEL_FP_LIB_TABLE_BASE::m_path_subs_grid, m_pluginChoices, PANEL_FP_LIB_TABLE_BASE::m_project_grid, m_projectBasePath, m_supportedFpFiles, onGridCellLeftClickHandler(), Pgm(), populateEnvironReadOnlyTable(), populatePluginList(), SPLIT_BUTTON::SetBitmap(), STD_BITMAP_BUTTON::SetBitmap(), DIALOG_SHIM::SetInitialFocus(), SPLIT_BUTTON::SetMinSize(), WX_GRID::SetTable(), setupGrid(), SPLIT_BUTTON::SetWidthPadding(), and PCB_IO_MGR::ShowType().
|
override |
Definition at line 509 of file panel_fp_lib_table.cpp.
References browseLibrariesHandler(), SPLIT_BUTTON::GetSplitButtonMenu(), PANEL_FP_LIB_TABLE_BASE::m_browseButton, PANEL_FP_LIB_TABLE_BASE::m_global_grid, PANEL_FP_LIB_TABLE_BASE::m_path_subs_grid, PANEL_FP_LIB_TABLE_BASE::m_project_grid, m_supportedFpFiles, and onGridCellLeftClickHandler().
|
private |
Definition at line 1071 of file panel_fp_lib_table.cpp.
References PANEL_FP_LIB_TABLE_BASE::m_path_subs_grid.
Referenced by onSizeGrid(), and populateEnvironReadOnlyTable().
|
overrideprivatevirtual |
Reimplemented from PANEL_FP_LIB_TABLE_BASE.
Definition at line 671 of file panel_fp_lib_table.cpp.
References COL_ENABLED, COL_NICKNAME, WX_GRID::CommitPendingChanges(), and m_cur_grid.
|
private |
Definition at line 927 of file panel_fp_lib_table.cpp.
References _, COL_NICKNAME, COL_TYPE, COL_URI, WX_GRID::CommitPendingChanges(), cur_model(), PCB_IO_MGR::FILE_TYPE_NONE, IO_BASE::IO_FILE_DESC::FileFilter(), fileType(), LIB_ID::FixIllegalChars(), SETTINGS_MANAGER::GetAppSettings(), PGM_BASE::GetLocalEnvVariables(), PGM_BASE::GetSettingsManager(), PCB_IO_MGR::KICAD_SEXP, FILEEXT::KiCadFootprintLibPathExtension, m_cur_grid, PANEL_FP_LIB_TABLE_BASE::m_global_grid, IO_BASE::IO_FILE_DESC::m_IsFile, PCBNEW_SETTINGS::m_lastFootprintLibDir, m_lastProjectLibDir, m_pageNdx, PANEL_FP_LIB_TABLE_BASE::m_project_grid, m_projectBasePath, m_supportedFpFiles, NormalizePath(), OKOrCancelDialog(), path, Pgm(), PCB_IO_MGR::ShowType(), and UTF8::wx_str().
Referenced by PANEL_FP_LIB_TABLE(), and ~PANEL_FP_LIB_TABLE().
|
inlineprivate |
Definition at line 87 of file panel_fp_lib_table.h.
References m_cur_grid.
Referenced by browseLibrariesHandler(), moveDownHandler(), moveUpHandler(), and verifyTables().
|
overrideprivatevirtual |
Reimplemented from PANEL_FP_LIB_TABLE_BASE.
Definition at line 689 of file panel_fp_lib_table.cpp.
References WX_GRID::CommitPendingChanges(), and m_cur_grid.
|
inlineprivate |
Definition at line 77 of file panel_fp_lib_table.h.
References PANEL_FP_LIB_TABLE_BASE::m_global_grid.
Referenced by populateEnvironReadOnlyTable(), TransferDataFromWindow(), and verifyTables().
|
overrideprivatevirtual |
Reimplemented from PANEL_FP_LIB_TABLE_BASE.
Definition at line 785 of file panel_fp_lib_table.cpp.
References WX_GRID::CommitPendingChanges(), cur_model(), m_cur_grid, and LIB_TABLE::m_rows.
|
overrideprivatevirtual |
Reimplemented from PANEL_FP_LIB_TABLE_BASE.
Definition at line 755 of file panel_fp_lib_table.cpp.
References WX_GRID::CommitPendingChanges(), cur_model(), m_cur_grid, and LIB_TABLE::m_rows.
|
private |
Definition at line 1234 of file panel_fp_lib_table.cpp.
References grid.
Referenced by PANEL_FP_LIB_TABLE(), and ~PANEL_FP_LIB_TABLE().
|
overrideprivatevirtual |
Reimplemented from PANEL_FP_LIB_TABLE_BASE.
Definition at line 816 of file panel_fp_lib_table.cpp.
References _, COL_NICKNAME, COL_OPTIONS, COL_TYPE, COL_URI, WX_GRID::CommitPendingChanges(), PCB_IO_MGR::ConvertLibrary(), DisplayErrorMessage(), ExpandEnvVarSubstitutions(), WX_HTML_REPORT_BOX::Flush(), WX_HTML_REPORT_BOX::HasMessage(), IsOK(), PCB_IO_MGR::KICAD_SEXP, FILEEXT::KiCadFootprintLibPathExtension, m_cur_grid, PANEL_FP_LIB_TABLE_BASE::m_global_grid, m_parent, m_project, DIALOG_HTML_REPORTER::m_Reporter, NormalizePath(), LIB_TABLE::ParseOptions(), Pgm(), DIALOG_SHIM::ShowModal(), and PCB_IO_MGR::ShowType().
|
overrideprivate |
Definition at line 1122 of file panel_fp_lib_table.cpp.
References m_cur_grid, PANEL_FP_LIB_TABLE_BASE::m_global_grid, PANEL_FP_LIB_TABLE_BASE::m_notebook, m_pageNdx, PANEL_FP_LIB_TABLE_BASE::m_project_grid, and PANEL_FP_LIB_TABLE_BASE::m_resetGlobal.
|
inlineprotectedvirtualinherited |
Definition at line 60 of file panel_fp_lib_table_base.h.
Referenced by PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), and PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE().
|
overrideprivatevirtual |
Reimplemented from PANEL_FP_LIB_TABLE_BASE.
Definition at line 1090 of file panel_fp_lib_table.cpp.
References _, WX_GRID::CommitPendingChanges(), WX_GRID::DestroyTable(), IsOK(), m_cur_grid, PANEL_FP_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_FP_LIB_TABLE_BASE.
Definition at line 1082 of file panel_fp_lib_table.cpp.
References adjustPathSubsGridColumns().
|
overrideprivatevirtual |
Reimplemented from PANEL_FP_LIB_TABLE_BASE.
Definition at line 666 of file panel_fp_lib_table.cpp.
|
private |
Populate the readonly environment variable table with names and values by examining all the full_uri columns.
Definition at line 1167 of file panel_fp_lib_table.cpp.
References adjustPathSubsGridColumns(), WX_GRID::ClearRows(), COL_URI, ENV_VAR::GetVersionedEnvVarName(), global_model(), FP_LIB_TABLE::GlobalPathEnvVariableName(), PANEL_FP_LIB_TABLE_BASE::m_path_subs_grid, project_model(), and PROJECT_VAR_NAME.
Referenced by PANEL_FP_LIB_TABLE().
|
private |
Definition at line 534 of file panel_fp_lib_table.cpp.
References PCB_IO_MGR::PLUGIN_REGISTRY::Instance(), and m_supportedFpFiles.
Referenced by PANEL_FP_LIB_TABLE().
|
inlineprivate |
Definition at line 82 of file panel_fp_lib_table.h.
References PANEL_FP_LIB_TABLE_BASE::m_project_grid.
Referenced by populateEnvironReadOnlyTable(), TransferDataFromWindow(), and verifyTables().
|
private |
Definition at line 318 of file panel_fp_lib_table.cpp.
References COL_DESCR, COL_ENABLED, COL_NICKNAME, COL_TYPE, COL_URI, COL_VISIBLE, IO_BASE::IO_FILE_DESC::FileFilter(), fileType(), SETTINGS_MANAGER::GetAppSettings(), PGM_BASE::GetSettingsManager(), grid, IO_BASE::IO_FILE_DESC::m_IsFile, PCBNEW_SETTINGS::m_lastFootprintLibDir, m_parent, m_pluginChoices, m_projectBasePath, m_supportedFpFiles, and Pgm().
Referenced by onReset(), and PANEL_FP_LIB_TABLE().
|
overrideprivate |
Definition at line 1139 of file panel_fp_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 549 of file panel_fp_lib_table.cpp.
References _, COL_NICKNAME, COL_URI, COL_VISIBLE, cur_model(), LIB_ID::FindIllegalLibraryNameChar(), global_model(), m_cur_grid, PANEL_FP_LIB_TABLE_BASE::m_notebook, and project_model().
Referenced by TransferDataFromWindow().
|
protectedinherited |
Definition at line 49 of file panel_fp_lib_table_base.h.
Referenced by PANEL_FP_LIB_TABLE(), PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), and PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE().
|
protectedinherited |
Definition at line 50 of file panel_fp_lib_table_base.h.
Referenced by PANEL_FP_LIB_TABLE(), PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), and ~PANEL_FP_LIB_TABLE().
|
private |
Definition at line 101 of file panel_fp_lib_table.h.
Referenced by appendRowHandler(), browseLibrariesHandler(), cur_model(), deleteRowHandler(), moveDownHandler(), moveUpHandler(), onMigrateLibraries(), onPageChange(), onReset(), PANEL_FP_LIB_TABLE(), TransferDataFromWindow(), and verifyTables().
|
protectedinherited |
Definition at line 53 of file panel_fp_lib_table_base.h.
Referenced by PANEL_FP_LIB_TABLE(), PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), and PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE().
|
protectedinherited |
Definition at line 46 of file panel_fp_lib_table_base.h.
Referenced by browseLibrariesHandler(), global_model(), onMigrateLibraries(), onPageChange(), onReset(), PANEL_FP_LIB_TABLE(), PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), and ~PANEL_FP_LIB_TABLE().
|
protectedinherited |
Definition at line 45 of file panel_fp_lib_table_base.h.
Referenced by PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE().
|
private |
Definition at line 93 of file panel_fp_lib_table.h.
Referenced by onReset(), and TransferDataFromWindow().
|
private |
Definition at line 105 of file panel_fp_lib_table.h.
Referenced by browseLibrariesHandler(), and PANEL_FP_LIB_TABLE().
|
protectedinherited |
Definition at line 55 of file panel_fp_lib_table_base.h.
Referenced by PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), and PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE().
|
protectedinherited |
Definition at line 52 of file panel_fp_lib_table_base.h.
Referenced by PANEL_FP_LIB_TABLE(), PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), and PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE().
|
protectedinherited |
Definition at line 51 of file panel_fp_lib_table_base.h.
Referenced by PANEL_FP_LIB_TABLE(), PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), and PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE().
|
protectedinherited |
Definition at line 44 of file panel_fp_lib_table_base.h.
Referenced by onPageChange(), PANEL_FP_LIB_TABLE(), PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), verifyTables(), and PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE().
|
staticprivate |
Definition at line 102 of file panel_fp_lib_table.h.
Referenced by browseLibrariesHandler(), onPageChange(), and PANEL_FP_LIB_TABLE().
|
private |
Definition at line 98 of file panel_fp_lib_table.h.
Referenced by onMigrateLibraries(), onReset(), PANEL_FP_LIB_TABLE(), setupGrid(), and TransferDataFromWindow().
|
protectedinherited |
Definition at line 56 of file panel_fp_lib_table_base.h.
Referenced by adjustPathSubsGridColumns(), PANEL_FP_LIB_TABLE(), PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), populateEnvironReadOnlyTable(), ~PANEL_FP_LIB_TABLE(), and PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE().
|
private |
Definition at line 99 of file panel_fp_lib_table.h.
Referenced by PANEL_FP_LIB_TABLE(), and setupGrid().
|
private |
Definition at line 95 of file panel_fp_lib_table.h.
Referenced by onMigrateLibraries().
|
protectedinherited |
Definition at line 48 of file panel_fp_lib_table_base.h.
Referenced by browseLibrariesHandler(), onPageChange(), PANEL_FP_LIB_TABLE(), PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), project_model(), and ~PANEL_FP_LIB_TABLE().
|
protectedinherited |
Definition at line 47 of file panel_fp_lib_table_base.h.
Referenced by PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE().
|
private |
Definition at line 96 of file panel_fp_lib_table.h.
Referenced by browseLibrariesHandler(), PANEL_FP_LIB_TABLE(), and setupGrid().
|
private |
Definition at line 94 of file panel_fp_lib_table.h.
Referenced by TransferDataFromWindow().
|
protectedinherited |
Definition at line 54 of file panel_fp_lib_table_base.h.
Referenced by onPageChange(), PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE(), and PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE().
|
private |
Definition at line 107 of file panel_fp_lib_table.h.
Referenced by browseLibrariesHandler(), PANEL_FP_LIB_TABLE(), populatePluginList(), setupGrid(), and ~PANEL_FP_LIB_TABLE().