|
KiCad PCB EDA Suite
|
Shows symbols that are not in any library table the way the symbol chooser does: a searchable library tree, symbol and footprint previews, and the details pane. More...
#include <db_lib_preview_panel.h>
Public Member Functions | |
| DB_LIB_PREVIEW_PANEL (wxWindow *aParent, EDA_BASE_FRAME *aFrame, KIWAY *aKiway, EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType) | |
| ~DB_LIB_PREVIEW_PANEL () override | |
| void | SetSymbols (const wxString &aLibNickname, std::vector< std::unique_ptr< LIB_SYMBOL > > aSymbols) |
| Replaces the previewed library, keeping the selected symbol when it still exists. | |
| void | SetStatus (const wxString &aText) |
| Shows a one-line status below the library tree. | |
| void | SelectSymbol (const wxString &aSymbolName) |
Private Member Functions | |
| void | onSymbolSelected (wxCommandEvent &aEvent) |
| void | onFootprintSelected (wxCommandEvent &aEvent) |
| void | showSymbol (const LIB_SYMBOL *aSymbol, int aUnit) |
| void | showFootprint (const wxString &aFootprint) |
| const LIB_SYMBOL * | findSymbol (const LIB_ID &aLibId) const |
Private Attributes | |
| APP_SETTINGS_BASE::LIB_TREE | m_treeSettings |
| wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > | m_adapter |
| LIB_TREE * | m_tree |
| SYMBOL_PREVIEW_WIDGET * | m_symbolPreview |
| wxChoice * | m_footprintChoice |
| FOOTPRINT_PREVIEW_WIDGET * | m_footprintPreview |
| wxStaticText * | m_status |
| KIWAY * | m_kiway |
| WX_DEBOUNCED_ACTION | m_footprintLoadRetry |
| Polls the footprint library load, which DisplayFootprint() needs finished. | |
| wxString | m_nickname |
| std::map< wxString, std::unique_ptr< LIB_SYMBOL > > | m_symbols |
Shows symbols that are not in any library table the way the symbol chooser does: a searchable library tree, symbol and footprint previews, and the details pane.
Used to preview a database library while its settings are being edited.
Definition at line 49 of file db_lib_preview_panel.h.
| DB_LIB_PREVIEW_PANEL::DB_LIB_PREVIEW_PANEL | ( | wxWindow * | aParent, |
| EDA_BASE_FRAME * | aFrame, | ||
| KIWAY * | aKiway, | ||
| EDA_DRAW_PANEL_GAL::GAL_TYPE | aCanvasType ) |
| aFrame | owns the tree's tool dispatcher; may be null |
| aKiway | enables the footprint preview; may be null |
Definition at line 79 of file db_lib_preview_panel.cpp.
References m_footprintChoice, m_footprintLoadRetry, m_footprintPreview, m_kiway, and showFootprint().
|
override |
Definition at line 148 of file db_lib_preview_panel.cpp.
References m_footprintChoice, m_footprintLoadRetry, onFootprintSelected(), and onSymbolSelected().
|
private |
Definition at line 225 of file db_lib_preview_panel.cpp.
References LIB_ID::GetLibItemName(), m_symbols, and UTF8::wx_str().
Referenced by onSymbolSelected().
|
private |
Definition at line 293 of file db_lib_preview_panel.cpp.
References m_footprintChoice, and showFootprint().
Referenced by ~DB_LIB_PREVIEW_PANEL().
|
private |
Definition at line 232 of file db_lib_preview_panel.cpp.
References findSymbol(), m_tree, and showSymbol().
Referenced by ~DB_LIB_PREVIEW_PANEL().
| void DB_LIB_PREVIEW_PANEL::SelectSymbol | ( | const wxString & | aSymbolName | ) |
Definition at line 213 of file db_lib_preview_panel.cpp.
References m_nickname, m_symbols, and m_tree.
| void DB_LIB_PREVIEW_PANEL::SetStatus | ( | const wxString & | aText | ) |
Shows a one-line status below the library tree.
Definition at line 203 of file db_lib_preview_panel.cpp.
References m_status.
| void DB_LIB_PREVIEW_PANEL::SetSymbols | ( | const wxString & | aLibNickname, |
| std::vector< std::unique_ptr< LIB_SYMBOL > > | aSymbols ) |
Replaces the previewed library, keeping the selected symbol when it still exists.
Every symbol's LIB_ID nickname is set to aLibNickname so tree lookups resolve.
Definition at line 156 of file db_lib_preview_panel.cpp.
References LIB_ID::GetLibItemName(), LIB_ID::IsValid(), m_adapter, m_nickname, m_symbols, m_tree, name, LIB_ID::SetLibNickname(), DB_LIB_PREVIEW_TREE_ADAPTER::SetLibrary(), and UTF8::wx_str().
|
private |
Definition at line 299 of file db_lib_preview_panel.cpp.
References _, GetFootprintLibrariesLoadProgress(), m_footprintLoadRetry, m_footprintPreview, and m_kiway.
Referenced by DB_LIB_PREVIEW_PANEL(), onFootprintSelected(), and showSymbol().
|
private |
Definition at line 241 of file db_lib_preview_panel.cpp.
References _, LIB_SYMBOL::Flatten(), LIB_SYMBOL::GetFPFilters(), LIB_SYMBOL::GetSourceLibId(), LIB_SYMBOL::IsDerived(), LIB_ID::IsValid(), m_footprintChoice, m_symbolPreview, and showFootprint().
Referenced by onSymbolSelected().
|
private |
Definition at line 82 of file db_lib_preview_panel.h.
Referenced by SetSymbols().
|
private |
Definition at line 85 of file db_lib_preview_panel.h.
Referenced by DB_LIB_PREVIEW_PANEL(), onFootprintSelected(), showSymbol(), and ~DB_LIB_PREVIEW_PANEL().
|
private |
Polls the footprint library load, which DisplayFootprint() needs finished.
Definition at line 91 of file db_lib_preview_panel.h.
Referenced by DB_LIB_PREVIEW_PANEL(), showFootprint(), and ~DB_LIB_PREVIEW_PANEL().
|
private |
Definition at line 86 of file db_lib_preview_panel.h.
Referenced by DB_LIB_PREVIEW_PANEL(), and showFootprint().
|
private |
Definition at line 88 of file db_lib_preview_panel.h.
Referenced by DB_LIB_PREVIEW_PANEL(), and showFootprint().
|
private |
Definition at line 93 of file db_lib_preview_panel.h.
Referenced by SelectSymbol(), and SetSymbols().
|
private |
Definition at line 87 of file db_lib_preview_panel.h.
Referenced by SetStatus().
|
private |
Definition at line 84 of file db_lib_preview_panel.h.
Referenced by showSymbol().
|
private |
Definition at line 94 of file db_lib_preview_panel.h.
Referenced by findSymbol(), SelectSymbol(), and SetSymbols().
|
private |
Definition at line 83 of file db_lib_preview_panel.h.
Referenced by onSymbolSelected(), SelectSymbol(), and SetSymbols().
|
private |
Definition at line 81 of file db_lib_preview_panel.h.