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)
 
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 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

PROJECTm_project
 
DIALOG_EDIT_LIBRARY_TABLESm_parent
 
wxArrayString m_pluginChoices
 
WX_GRIDm_cur_grid
 changed based on tab choice
 
wxString m_lastProjectLibDir
 Transient (unsaved) last browsed folder when adding a project level library.
 

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 34 of file panel_sym_lib_table.h.

Constructor & Destructor Documentation

◆ PANEL_SYM_LIB_TABLE()

◆ ~PANEL_SYM_LIB_TABLE()

PANEL_SYM_LIB_TABLE::~PANEL_SYM_LIB_TABLE ( )
virtual

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 502 of file panel_sym_lib_table.cpp.

References FILEEXT::LegacySymbolLibFileExtension.

Referenced by verifyTables().

◆ appendRowHandler()

void PANEL_SYM_LIB_TABLE::appendRowHandler ( wxCommandEvent & event)
overrideprivatevirtual

Reimplemented from PANEL_SYM_LIB_TABLE_BASE.

Definition at line 770 of file panel_sym_lib_table.cpp.

References COL_NICKNAME, and m_cur_grid.

◆ 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 781 of file panel_sym_lib_table.cpp.

References 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()

◆ 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 1167 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 653 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 1096 of file panel_sym_lib_table.cpp.

References adjustPathSubsGridColumns(), COL_URI, ENV_VAR::GetVersionedEnvVarName(), global_model(), 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()

bool PANEL_SYM_LIB_TABLE::TransferDataFromWindow ( )
overrideprivate

◆ verifyTables()

bool PANEL_SYM_LIB_TABLE::verifyTables ( )
private

Trim important fields, removes blank row entries, and checks for duplicates.

Returns
bool - true if tables are OK, else false.

Definition at line 519 of file panel_sym_lib_table.cpp.

References _, allowAutomaticPluginTypeSelection(), COL_NICKNAME, COL_TYPE, COL_URI, cur_model(), LIB_ID::FindIllegalLibraryNameChar(), global_model(), m_cur_grid, PANEL_SYM_LIB_TABLE_BASE::m_notebook, and project_model().

Referenced by TransferDataFromWindow().

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

Definition at line 43 of file panel_sym_lib_table_base.h.

Referenced by PANEL_SYM_LIB_TABLE_BASE().

◆ m_lastProjectLibDir

wxString PANEL_SYM_LIB_TABLE::m_lastProjectLibDir
private

Transient (unsaved) last browsed folder when adding a project level library.

Definition at line 93 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

◆ m_pageNdx

size_t PANEL_SYM_LIB_TABLE::m_pageNdx = 0
staticprivate

Remember the last notebook page selected.

Definition at line 90 of file panel_sym_lib_table.h.

Referenced by browseLibrariesHandler(), onPageChange(), and PANEL_SYM_LIB_TABLE().

◆ m_parent

DIALOG_EDIT_LIBRARY_TABLES* PANEL_SYM_LIB_TABLE::m_parent
private

◆ m_path_subs_grid

◆ m_pluginChoices

wxArrayString PANEL_SYM_LIB_TABLE::m_pluginChoices
private

Definition at line 87 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

◆ m_project_panel

wxPanel* PANEL_SYM_LIB_TABLE_BASE::m_project_panel
protectedinherited

Definition at line 45 of file panel_sym_lib_table_base.h.

Referenced by PANEL_SYM_LIB_TABLE_BASE().

◆ m_resetGlobal

wxButton* PANEL_SYM_LIB_TABLE_BASE::m_resetGlobal
protectedinherited

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