KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PANEL_SYM_LIB_TABLE Class Reference

Dialog to show and edit symbol library tables. More...

#include <panel_sym_lib_table.h>

Inheritance diagram for PANEL_SYM_LIB_TABLE:
PANEL_SYM_LIB_TABLE_BASE

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_GRIDm_global_grid
 
wxPanel * m_project_panel
 
WX_GRIDm_project_grid
 
STD_BITMAP_BUTTONm_append_button
 
STD_BITMAP_BUTTONm_browse_button
 
STD_BITMAP_BUTTONm_move_up_button
 
STD_BITMAP_BUTTONm_move_down_button
 
STD_BITMAP_BUTTONm_delete_button
 
wxButton * m_resetGlobal
 
wxButton * m_convertLegacy
 
WX_GRIDm_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_GRIDglobal_model () const
 
SYMBOL_LIB_TABLE_GRIDproject_model () const
 
SYMBOL_LIB_TABLE_GRIDcur_model () const
 
bool allowAutomaticPluginTypeSelection (wxString &aLibraryPath)
 

Private Attributes

SYMBOL_LIB_TABLEm_globalTable
 
SYMBOL_LIB_TABLEm_projectTable
 
PROJECTm_project
 
DIALOG_EDIT_LIBRARY_TABLESm_parent
 
wxArrayString m_pluginChoices
 
WX_GRIDm_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.
 

Detailed Description

Dialog to show and edit symbol library tables.

Definition at line 35 of file panel_sym_lib_table.h.

Constructor & Destructor Documentation

◆ PANEL_SYM_LIB_TABLE()

◆ ~PANEL_SYM_LIB_TABLE()

Member Function Documentation

◆ adjustPathSubsGridColumns()

void PANEL_SYM_LIB_TABLE::adjustPathSubsGridColumns ( int  aWidth)
private

◆ allowAutomaticPluginTypeSelection()

bool PANEL_SYM_LIB_TABLE::allowAutomaticPluginTypeSelection ( wxString &  aLibraryPath)
private
Returns
true if the plugin type can be selected from the library path only (i.e. only from its extension) if the type needs an access to the file itself, return false because the file can be not (at least temporary) available

Definition at line 410 of file panel_sym_lib_table.cpp.

References FILEEXT::LegacySymbolLibFileExtension.

Referenced by verifyTables().

◆ appendRowHandler()

void PANEL_SYM_LIB_TABLE::appendRowHandler ( wxCommandEvent &  event)
overrideprivatevirtual

◆ browseLibrariesHandler()

◆ cur_model()

SYMBOL_LIB_TABLE_GRID * PANEL_SYM_LIB_TABLE::cur_model ( ) const
private

◆ deleteRowHandler()

void PANEL_SYM_LIB_TABLE::deleteRowHandler ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_SYM_LIB_TABLE_BASE.

Definition at line 734 of file panel_sym_lib_table.cpp.

References WX_GRID::CommitPendingChanges(), and m_cur_grid.

◆ global_model()

SYMBOL_LIB_TABLE_GRID * PANEL_SYM_LIB_TABLE::global_model ( ) const
private

◆ moveDownHandler()

void PANEL_SYM_LIB_TABLE::moveDownHandler ( wxCommandEvent &  event)
overrideprivatevirtual

◆ moveUpHandler()

void PANEL_SYM_LIB_TABLE::moveUpHandler ( wxCommandEvent &  event)
overrideprivatevirtual

◆ onConvertLegacyLibraries()

◆ onGridCellLeftClickHandler()

void PANEL_SYM_LIB_TABLE::onGridCellLeftClickHandler ( wxGridEvent &  event)
private

Definition at line 1139 of file panel_sym_lib_table.cpp.

References grid.

Referenced by PANEL_SYM_LIB_TABLE(), and ~PANEL_SYM_LIB_TABLE().

◆ onPageChange() [1/2]

void PANEL_SYM_LIB_TABLE::onPageChange ( wxBookCtrlEvent &  event)
overrideprivate

◆ onPageChange() [2/2]

virtual void PANEL_SYM_LIB_TABLE_BASE::onPageChange ( wxNotebookEvent &  event)
inlineprotectedvirtualinherited

◆ onReset()

◆ onSizeGrid()

void PANEL_SYM_LIB_TABLE::onSizeGrid ( wxSizeEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_SYM_LIB_TABLE_BASE.

Definition at line 1113 of file panel_sym_lib_table.cpp.

References adjustPathSubsGridColumns().

◆ OnUpdateUI()

void PANEL_SYM_LIB_TABLE::OnUpdateUI ( wxUpdateUIEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_SYM_LIB_TABLE_BASE.

Definition at line 597 of file panel_sym_lib_table.cpp.

◆ populateEnvironReadOnlyTable()

void PANEL_SYM_LIB_TABLE::populateEnvironReadOnlyTable ( )
private

Populate the readonly environment variable table with names and values by examining all the full_uri columns.

Definition at line 1038 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().

◆ project_model()

SYMBOL_LIB_TABLE_GRID * PANEL_SYM_LIB_TABLE::project_model ( ) const
private

◆ setupGrid()

◆ TransferDataFromWindow()

◆ verifyTables()

Member Data Documentation

◆ m_append_button

STD_BITMAP_BUTTON* PANEL_SYM_LIB_TABLE_BASE::m_append_button
protectedinherited

◆ m_browse_button

STD_BITMAP_BUTTON* PANEL_SYM_LIB_TABLE_BASE::m_browse_button
protectedinherited

◆ m_convertLegacy

wxButton* PANEL_SYM_LIB_TABLE_BASE::m_convertLegacy
protectedinherited

◆ m_cur_grid

◆ m_delete_button

STD_BITMAP_BUTTON* PANEL_SYM_LIB_TABLE_BASE::m_delete_button
protectedinherited

◆ m_global_grid

◆ m_global_panel

wxPanel* PANEL_SYM_LIB_TABLE_BASE::m_global_panel
protectedinherited

◆ m_globalTable

SYMBOL_LIB_TABLE* PANEL_SYM_LIB_TABLE::m_globalTable
private

Definition at line 90 of file panel_sym_lib_table.h.

Referenced by onReset(), PANEL_SYM_LIB_TABLE(), and TransferDataFromWindow().

◆ m_lastProjectLibDir

wxString PANEL_SYM_LIB_TABLE::m_lastProjectLibDir
private

Definition at line 99 of file panel_sym_lib_table.h.

Referenced by browseLibrariesHandler(), and PANEL_SYM_LIB_TABLE().

◆ m_move_down_button

STD_BITMAP_BUTTON* PANEL_SYM_LIB_TABLE_BASE::m_move_down_button
protectedinherited

◆ m_move_up_button

STD_BITMAP_BUTTON* PANEL_SYM_LIB_TABLE_BASE::m_move_up_button
protectedinherited

◆ m_notebook

wxNotebook* PANEL_SYM_LIB_TABLE_BASE::m_notebook
protectedinherited

◆ m_pageNdx

size_t PANEL_SYM_LIB_TABLE::m_pageNdx = 0
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().

◆ m_parent

◆ m_path_subs_grid

◆ m_pluginChoices

wxArrayString PANEL_SYM_LIB_TABLE::m_pluginChoices
private

Definition at line 95 of file panel_sym_lib_table.h.

Referenced by PANEL_SYM_LIB_TABLE().

◆ m_project

PROJECT* PANEL_SYM_LIB_TABLE::m_project
private

◆ m_project_grid

WX_GRID* PANEL_SYM_LIB_TABLE_BASE::m_project_grid
protectedinherited

◆ m_project_panel

wxPanel* PANEL_SYM_LIB_TABLE_BASE::m_project_panel
protectedinherited

◆ m_projectTable

SYMBOL_LIB_TABLE* PANEL_SYM_LIB_TABLE::m_projectTable
private

Definition at line 91 of file panel_sym_lib_table.h.

Referenced by PANEL_SYM_LIB_TABLE(), and TransferDataFromWindow().

◆ m_resetGlobal

wxButton* PANEL_SYM_LIB_TABLE_BASE::m_resetGlobal
protectedinherited

The documentation for this class was generated from the following files: