KiCad PCB EDA Suite
|
#include <symbol_tree_synchronizing_adapter.h>
Public Types | |
enum | TREE_COLS { NAME_COL = 0 , DESC_COL , NUM_COLS } |
This enum defines the order of the default columns in the tree view. More... | |
enum | SORT_MODE { BEST_MATCH = 0 , ALPHABETIC } |
Public Member Functions | |
bool | IsContainer (const wxDataViewItem &aItem) const override |
void | Sync (const wxString &aForceRefresh, std::function< void(int, int, const wxString &)> aProgressCallback) |
int | GetLibrariesCount () const override |
Return the number of libraries loaded in the tree. | |
TOOL_INTERACTIVE * | GetContextMenuTool () override |
wxDataViewItem | GetCurrentDataViewItem () override |
virtual bool | HasPreview (const wxDataViewItem &aItem) override |
virtual void | ShowPreview (wxWindow *aParent, const wxDataViewItem &aItem) override |
void | SaveSettings () |
Save the column widths to the config file. | |
void | SetFilter (std::function< bool(LIB_TREE_NODE &aNode)> *aFilter) |
Set the symbol filter type. | |
std::function< bool(LIB_TREE_NODE &aNode)> * | GetFilter () const |
Return the active filter. | |
void | SetSortMode (SORT_MODE aMode) |
SORT_MODE | GetSortMode () const |
void | ShowUnits (bool aShow) |
Whether or not to show units. | |
void | SetPreselectNode (const LIB_ID &aLibId, int aUnit) |
Set the symbol name to be selected if there are no search results. | |
void | DoAddLibrary (const wxString &aNodeName, const wxString &aDesc, const std::vector< LIB_TREE_ITEM * > &aItemList, bool pinned, bool presorted) |
Add the given list of symbols by alias. | |
void | DoRemoveLibrary (const wxString &aNodeName) |
Remove the library by name. | |
std::vector< wxString > | GetAvailableColumns () const |
std::vector< wxString > | GetShownColumns () const |
std::vector< wxString > | GetOpenLibs () const |
void | OpenLibs (const std::vector< wxString > &aLibs) |
void | SetShownColumns (const std::vector< wxString > &aColumnNames) |
Sets which columns are shown in the widget. | |
void | AssignIntrinsicRanks () |
Sort the tree and assign ranks after adding libraries. | |
void | UpdateSearchString (const wxString &aSearch, bool aState) |
Set the search string provided by the user. | |
void | AttachTo (wxDataViewCtrl *aDataViewCtrl) |
Attach to a wxDataViewCtrl and initialize it. | |
void | FinishTreeInitialization () |
A final-stage initialization to be called after the window hierarchy has been realized and the window sizes set. | |
LIB_ID | GetAliasFor (const wxDataViewItem &aSelection) const |
Return the alias for the given item. | |
int | GetUnitFor (const wxDataViewItem &aSelection) const |
Return the unit for the given item. | |
LIB_TREE_NODE::TYPE | GetTypeFor (const wxDataViewItem &aSelection) const |
Return node type for the given item. | |
LIB_TREE_NODE * | GetTreeNodeFor (const wxDataViewItem &aSelection) const |
virtual wxString | GenerateInfo (const LIB_ID &aLibId, int aUnit) |
TOOL_DISPATCHER * | GetToolDispatcher () const |
int | GetItemCount () const |
Return the number of symbols loaded in the tree. | |
wxDataViewItem | FindItem (const LIB_ID &aLibId) |
Returns tree item corresponding to part. | |
unsigned int | GetChildren (const wxDataViewItem &aItem, wxDataViewItemArray &aChildren) const override |
Populate a list of all the children of an item. | |
void | Freeze () |
void | Thaw () |
bool | IsFrozen () const |
void | RefreshTree () |
void | PinLibrary (LIB_TREE_NODE *aTreeNode) |
void | UnpinLibrary (LIB_TREE_NODE *aTreeNode) |
void | ShowChangedLanguage () |
Static Public Member Functions | |
static wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > | Create (SYMBOL_EDIT_FRAME *aParent, SYMBOL_LIBRARY_MANAGER *aLibs) |
static const wxString | GetPinningSymbol () |
Protected Member Functions | |
void | updateLibrary (LIB_TREE_NODE_LIBRARY &aLibNode) |
LIB_TREE_NODE::PTR_VECTOR::iterator | deleteLibrary (LIB_TREE_NODE::PTR_VECTOR::iterator &aLibNodeIt) |
void | GetValue (wxVariant &aVariant, wxDataViewItem const &aItem, unsigned int aCol) const override |
bool | GetAttr (wxDataViewItem const &aItem, unsigned int aCol, wxDataViewItemAttr &aAttr) const override |
SYMBOL_TREE_SYNCHRONIZING_ADAPTER (SYMBOL_EDIT_FRAME *aParent, SYMBOL_LIBRARY_MANAGER *aLibMgr) | |
PROJECT::LIB_TYPE_T | getLibType () override |
LIB_TREE_NODE_LIBRARY & | DoAddLibraryNode (const wxString &aNodeName, const wxString &aDesc, bool pinned) |
bool | HasContainerColumns (const wxDataViewItem &aItem) const override |
Check whether a container has columns too. | |
wxDataViewItem | GetParent (const wxDataViewItem &aItem) const override |
Get the parent of an item. | |
unsigned int | GetColumnCount () const override |
wxString | GetColumnType (unsigned int aCol) const override |
Return the type of data stored in the column as indicated by wxVariant::GetType() | |
bool | SetValue (const wxVariant &aVariant, const wxDataViewItem &aItem, unsigned int aCol) override |
Set the value of an item. | |
void | resortTree () |
void | addColumnIfNecessary (const wxString &aHeader) |
void | recreateColumns () |
Static Protected Member Functions | |
static wxDataViewItem | ToItem (const LIB_TREE_NODE *aNode) |
Convert #SYM_TREE_NODE -> wxDataViewItem. | |
static LIB_TREE_NODE * | ToNode (wxDataViewItem aItem) |
Convert wxDataViewItem -> #SYM_TREE_NODE. | |
Protected Attributes | |
SYMBOL_EDIT_FRAME * | m_frame |
SYMBOL_LIBRARY_MANAGER * | m_libMgr |
Hashes to decide whether a library needs an update. | |
std::map< wxString, int > | m_libHashes |
SYMBOL_LIBRARY_MANAGER hash value returned in the last synchronization. | |
int | m_lastSyncHash |
LIB_TREE_NODE_ROOT | m_tree |
std::map< unsigned, wxString > | m_colIdxMap |
std::vector< wxString > | m_availableColumns |
wxDataViewCtrl * | m_widget |
Private Member Functions | |
const LIB_TREE_NODE * | ShowResults () |
Find and expand successful search results. | |
wxDataViewColumn * | doAddColumn (const wxString &aHeader, bool aTranslate=true) |
Private Attributes | |
EDA_BASE_FRAME * | m_parent |
APP_SETTINGS_BASE * | m_cfg |
SORT_MODE | m_sort_mode |
bool | m_show_units |
LIB_ID | m_preselect_lib_id |
int | m_preselect_unit |
int | m_freeze |
std::function< bool(LIB_TREE_NODE &aNode)> * | m_filter |
std::vector< wxDataViewColumn * > | m_columns |
std::map< wxString, wxDataViewColumn * > | m_colNameMap |
std::map< wxString, int > | m_colWidths |
std::vector< wxString > | m_shownColumns |
Definition at line 36 of file symbol_tree_synchronizing_adapter.h.
|
inherited |
Enumerator | |
---|---|
BEST_MATCH | |
ALPHABETIC |
Definition at line 131 of file lib_tree_model_adapter.h.
|
inherited |
This enum defines the order of the default columns in the tree view.
Enumerator | |
---|---|
NAME_COL | Library or library item name column. |
DESC_COL | Library or library description column. |
NUM_COLS | The number of default tree columns. |
Definition at line 124 of file lib_tree_model_adapter.h.
|
protected |
Definition at line 47 of file symbol_tree_synchronizing_adapter.cpp.
|
protectedinherited |
Definition at line 436 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::m_availableColumns, and LIB_TREE_MODEL_ADAPTER::m_colNameMap.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries().
|
inlineinherited |
Sort the tree and assign ranks after adding libraries.
Definition at line 210 of file lib_tree_model_adapter.h.
References LIB_TREE_NODE::AssignIntrinsicRanks(), and LIB_TREE_MODEL_ADAPTER::m_tree.
Referenced by PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER().
|
inherited |
Attach to a wxDataViewCtrl and initialize it.
This will set up columns and associate the model via the adapter.
aDataViewCtrl | the view symbol in the dialog |
Definition at line 348 of file lib_tree_model_adapter.cpp.
References kDataViewIndent, LIB_TREE_MODEL_ADAPTER::m_widget, and LIB_TREE_MODEL_ADAPTER::recreateColumns().
|
static |
Definition at line 39 of file symbol_tree_synchronizing_adapter.cpp.
Referenced by LIB_SYMBOL_LIBRARY_MANAGER::LIB_SYMBOL_LIBRARY_MANAGER().
|
protected |
Definition at line 206 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_TREE_NODE::m_Children, m_libHashes, LIB_TREE_NODE::m_Name, and LIB_TREE_MODEL_ADAPTER::m_tree.
Referenced by Sync().
|
privateinherited |
Definition at line 408 of file lib_tree_model_adapter.cpp.
References KIUI::GetTextSize(), LIB_TREE_MODEL_ADAPTER::m_colIdxMap, LIB_TREE_MODEL_ADAPTER::m_colNameMap, LIB_TREE_MODEL_ADAPTER::m_columns, LIB_TREE_MODEL_ADAPTER::m_colWidths, and LIB_TREE_MODEL_ADAPTER::m_widget.
Referenced by LIB_TREE_MODEL_ADAPTER::recreateColumns().
|
inherited |
Add the given list of symbols by alias.
To be called in the setup phase.
aNodeName | the parent node the symbols will appear under |
aDesc | the description field of the parent node |
aItemList | list of symbols |
Definition at line 235 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE_LIBRARY::AddItem(), LIB_TREE_NODE::AssignIntrinsicRanks(), and LIB_TREE_MODEL_ADAPTER::DoAddLibraryNode().
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_TREE_MODEL_ADAPTER::AddLibrary(), PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER(), PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER(), and FP_TREE_SYNCHRONIZING_ADAPTER::Sync().
|
protectedinherited |
Definition at line 223 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE_ROOT::AddLib(), LIB_TREE_NODE::m_Pinned, and LIB_TREE_MODEL_ADAPTER::m_tree.
Referenced by LIB_TREE_MODEL_ADAPTER::DoAddLibrary(), and Sync().
|
inherited |
Remove the library by name.
aNodeName | the name of the library to remove |
Definition at line 248 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::m_tree, and LIB_TREE_NODE_ROOT::RemoveLib().
|
inherited |
Returns tree item corresponding to part.
aLibId | specifies the part and library name to be searched for. |
Definition at line 496 of file lib_tree_model_adapter.cpp.
References LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), LIB_TREE_NODE::m_Children, LIB_TREE_MODEL_ADAPTER::m_tree, LIB_TREE_MODEL_ADAPTER::ToItem(), and UTF8::wx_str().
Referenced by LIB_TREE_MODEL_ADAPTER::GetCurrentDataViewItem(), GetCurrentDataViewItem(), FP_TREE_SYNCHRONIZING_ADAPTER::GetCurrentDataViewItem(), and LIB_TREE_MODEL_ADAPTER::OpenLibs().
|
inherited |
A final-stage initialization to be called after the window hierarchy has been realized and the window sizes set.
Definition at line 550 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::m_colIdxMap, LIB_TREE_MODEL_ADAPTER::m_columns, LIB_TREE_MODEL_ADAPTER::m_colWidths, and LIB_TREE_MODEL_ADAPTER::m_widget.
|
inlineinherited |
Definition at line 308 of file lib_tree_model_adapter.h.
References LIB_TREE_MODEL_ADAPTER::m_freeze.
Referenced by LIB_TREE_MODEL_ADAPTER::resortTree(), and LIB_TREE_MODEL_ADAPTER::UpdateSearchString().
|
inlinevirtualinherited |
Reimplemented in DESIGN_BLOCK_TREE_MODEL_ADAPTER, SYMBOL_TREE_MODEL_ADAPTER, and FP_TREE_MODEL_ADAPTER.
Definition at line 267 of file lib_tree_model_adapter.h.
|
inherited |
Return the alias for the given item.
aSelection | item from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection()) |
Definition at line 458 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_LibId, and LIB_TREE_MODEL_ADAPTER::ToNode().
|
overrideprotected |
Definition at line 310 of file symbol_tree_synchronizing_adapter.cpp.
References SYMBOL_EDIT_FRAME::GetCurSymbol(), LIB_SYMBOL::GetLibId(), LIB_ID::GetLibNickname(), LIB_TREE_MODEL_ADAPTER::IsFrozen(), SYMBOL_LIBRARY_MANAGER::IsLibraryLoaded(), SYMBOL_LIBRARY_MANAGER::IsLibraryModified(), SYMBOL_LIBRARY_MANAGER::IsSymbolModified(), m_frame, LIB_TREE_NODE::m_IsRoot, LIB_TREE_NODE::m_LibId, m_libMgr, LIB_TREE_NODE::m_Name, LIB_TREE_NODE::m_Parent, LIB_TREE_NODE::m_Type, LIB_TREE_MODEL_ADAPTER::m_widget, LIB_TREE_MODEL_ADAPTER::NAME_COL, LIB_TREE_MODEL_ADAPTER::ToItem(), and LIB_TREE_MODEL_ADAPTER::ToNode().
|
inlineinherited |
Definition at line 194 of file lib_tree_model_adapter.h.
References LIB_TREE_MODEL_ADAPTER::m_availableColumns.
|
overrideinherited |
Populate a list of all the children of an item.
Definition at line 526 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Children, LIB_TREE_MODEL_ADAPTER::m_show_units, LIB_TREE_MODEL_ADAPTER::m_tree, LIB_TREE_NODE::m_Type, LIB_TREE_MODEL_ADAPTER::ToItem(), and LIB_TREE_MODEL_ADAPTER::ToNode().
Referenced by LIB_TREE_MODEL_ADAPTER::GetOpenLibs().
|
inlineoverrideprotectedinherited |
Definition at line 366 of file lib_tree_model_adapter.h.
References LIB_TREE_MODEL_ADAPTER::m_columns.
|
inlineoverrideprotectedinherited |
Return the type of data stored in the column as indicated by wxVariant::GetType()
Definition at line 371 of file lib_tree_model_adapter.h.
|
overridevirtual |
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 57 of file symbol_tree_synchronizing_adapter.cpp.
References TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), and m_frame.
|
overridevirtual |
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 214 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::FindItem(), SYMBOL_EDIT_FRAME::GetCurSymbol(), LIB_SYMBOL::GetLibId(), and m_frame.
|
inlineinherited |
Return the active filter.
Definition at line 153 of file lib_tree_model_adapter.h.
References LIB_TREE_MODEL_ADAPTER::m_filter.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), and SYMBOL_TREE_MODEL_ADAPTER::AddLibrary().
|
inherited |
Return the number of symbols loaded in the tree.
Definition at line 485 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Children, and LIB_TREE_MODEL_ADAPTER::m_tree.
|
overridevirtual |
Return the number of libraries loaded in the tree.
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 142 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::GetLibrariesCount(), SYMBOL_LIBRARY_MANAGER::GetLibraryNames(), m_libHashes, and m_libMgr.
Referenced by Sync().
|
inlineoverrideprotectedvirtual |
Implements LIB_TREE_MODEL_ADAPTER.
Definition at line 69 of file symbol_tree_synchronizing_adapter.h.
References PROJECT::SYMBOL_LIB.
|
inherited |
Definition at line 163 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::GetChildren(), LIB_TREE_MODEL_ADAPTER::m_widget, and LIB_TREE_MODEL_ADAPTER::ToNode().
Referenced by LIB_TREE_MODEL_ADAPTER::SaveSettings().
|
overrideprotectedinherited |
Get the parent of an item.
Definition at line 635 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::m_freeze, LIB_TREE_NODE::m_Parent, LIB_TREE_NODE::m_Type, LIB_TREE_MODEL_ADAPTER::ToItem(), and LIB_TREE_MODEL_ADAPTER::ToNode().
Referenced by LIB_TREE_MODEL_ADAPTER::UpdateSearchString().
|
inlinestaticinherited |
Definition at line 109 of file lib_tree_model_adapter.h.
Referenced by CVPCB_MAINFRAME::BuildLibrariesList(), WX_LISTBOX::FindString(), WX_LISTBOX::GetBaseString(), LIBRARY_LISTBOX::GetSelectedLibrary(), WX_LISTBOX::GetStringSelection(), EDA_LIST_DIALOG::GetTextSelection(), LIB_TREE_MODEL_ADAPTER::GetValue(), GetValue(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SAVE_AS_DIALOG::SAVE_AS_DIALOG(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), and WX_LISTBOX::SetStringSelection().
|
inlineinherited |
Definition at line 196 of file lib_tree_model_adapter.h.
References LIB_TREE_MODEL_ADAPTER::m_shownColumns.
Referenced by LIB_TREE_MODEL_ADAPTER::SaveSettings().
|
inlineinherited |
Definition at line 156 of file lib_tree_model_adapter.h.
References LIB_TREE_MODEL_ADAPTER::m_sort_mode.
|
inlineinherited |
Definition at line 272 of file lib_tree_model_adapter.h.
References TOOLS_HOLDER::GetToolDispatcher(), and LIB_TREE_MODEL_ADAPTER::m_parent.
|
inherited |
Definition at line 479 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::ToNode().
|
inherited |
Return node type for the given item.
aSelection | item from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection()) |
Definition at line 472 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Type, and LIB_TREE_MODEL_ADAPTER::ToNode().
|
inherited |
Return the unit for the given item.
aSelection | item from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection()) |
Definition at line 465 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Unit, and LIB_TREE_MODEL_ADAPTER::ToNode().
|
overrideprotected |
Definition at line 223 of file symbol_tree_synchronizing_adapter.cpp.
References _, SYMBOL_EDIT_FRAME::GetCurSymbol(), LIB_TABLE_ROW::GetDescr(), LIB_SYMBOL::GetDescription(), LIB_SYMBOL::GetLibId(), SYMBOL_EDIT_FRAME::GetLibManager(), LIB_ID::GetLibNickname(), SYMBOL_LIBRARY_MANAGER::GetLibrary(), LIB_TREE_MODEL_ADAPTER::GetPinningSymbol(), LIB_ID::GetUniStringLibItemName(), LIB_TREE_MODEL_ADAPTER::IsFrozen(), SYMBOL_LIBRARY_MANAGER::IsLibraryLoaded(), SYMBOL_LIBRARY_MANAGER::IsLibraryModified(), SYMBOL_LIBRARY_MANAGER::IsLibraryReadOnly(), SYMBOL_LIBRARY_MANAGER::IsSymbolModified(), LIB_TREE_MODEL_ADAPTER::m_colIdxMap, LIB_TREE_NODE::m_Desc, LIB_TREE_NODE::m_Fields, m_frame, LIB_TREE_NODE::m_LibId, m_libMgr, LIB_TREE_NODE::m_Name, LIB_TREE_NODE::m_Parent, LIB_TREE_NODE::m_Pinned, LIB_TREE_NODE::m_Type, LIB_TREE_MODEL_ADAPTER::NAME_COL, LIB_TREE_MODEL_ADAPTER::ToNode(), and UnescapeString().
|
overrideprotectedinherited |
Check whether a container has columns too.
Definition at line 622 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::IsContainer().
|
overridevirtual |
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 372 of file symbol_tree_synchronizing_adapter.cpp.
References SYMBOL_EDIT_FRAME::GetTargetLibId(), m_frame, LIB_TREE_NODE::m_LibId, LIB_TREE_NODE::m_Type, and LIB_TREE_MODEL_ADAPTER::ToNode().
|
override |
Definition at line 63 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_TREE_NODE::m_Type, and LIB_TREE_MODEL_ADAPTER::ToNode().
|
inlineinherited |
Definition at line 310 of file lib_tree_model_adapter.h.
References LIB_TREE_MODEL_ADAPTER::m_freeze.
Referenced by LIB_TREE_MODEL_ADAPTER::GetAttr(), GetAttr(), FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), LIB_TREE_MODEL_ADAPTER::GetValue(), GetValue(), and FP_TREE_SYNCHRONIZING_ADAPTER::GetValue().
|
inherited |
Definition at line 181 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::FindItem(), and LIB_TREE_MODEL_ADAPTER::m_widget.
|
inherited |
Definition at line 388 of file lib_tree_model_adapter.cpp.
References LIB_ID::GetLibNickname(), LIB_TREE_MODEL_ADAPTER::getLibType(), LIB_TREE_NODE::m_LibId, LIB_TREE_MODEL_ADAPTER::m_parent, LIB_TREE_NODE::m_Pinned, LIB_TREE_MODEL_ADAPTER::m_widget, PROJECT::PinLibrary(), KIWAY_HOLDER::Prj(), LIB_TREE_MODEL_ADAPTER::resortTree(), and LIB_TREE_MODEL_ADAPTER::ToItem().
|
protectedinherited |
Definition at line 357 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::doAddColumn(), LIB_TREE_MODEL_ADAPTER::m_colIdxMap, LIB_TREE_MODEL_ADAPTER::m_colNameMap, LIB_TREE_MODEL_ADAPTER::m_columns, LIB_TREE_MODEL_ADAPTER::m_shownColumns, and LIB_TREE_MODEL_ADAPTER::m_widget.
Referenced by LIB_TREE_MODEL_ADAPTER::AttachTo(), LIB_TREE_MODEL_ADAPTER::SetShownColumns(), and LIB_TREE_MODEL_ADAPTER::ShowChangedLanguage().
|
inherited |
Definition at line 577 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::m_colNameMap, LIB_TREE_MODEL_ADAPTER::m_columns, and LIB_TREE_MODEL_ADAPTER::m_colWidths.
|
protectedinherited |
Definition at line 376 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::BEST_MATCH, LIB_TREE_MODEL_ADAPTER::Freeze(), LIB_TREE_MODEL_ADAPTER::m_sort_mode, LIB_TREE_MODEL_ADAPTER::m_tree, LIB_TREE_NODE::SortNodes(), and LIB_TREE_MODEL_ADAPTER::Thaw().
Referenced by LIB_TREE_MODEL_ADAPTER::PinLibrary(), and LIB_TREE_MODEL_ADAPTER::UnpinLibrary().
|
inherited |
Save the column widths to the config file.
This requires the tree view to still be valid.
Definition at line 195 of file lib_tree_model_adapter.cpp.
References APP_SETTINGS_BASE::LIB_TREE::column_widths, APP_SETTINGS_BASE::LIB_TREE::columns, LIB_TREE_MODEL_ADAPTER::GetOpenLibs(), LIB_TREE_MODEL_ADAPTER::GetShownColumns(), LIB_TREE_MODEL_ADAPTER::m_cfg, LIB_TREE_MODEL_ADAPTER::m_colNameMap, APP_SETTINGS_BASE::m_LibTree, LIB_TREE_MODEL_ADAPTER::m_widget, and APP_SETTINGS_BASE::LIB_TREE::open_libs.
|
inlineinherited |
Set the symbol filter type.
Must be set before adding libraries
aFilter | if SYM_FILTER_POWER, only power parts are loaded |
Definition at line 148 of file lib_tree_model_adapter.h.
References LIB_TREE_MODEL_ADAPTER::m_filter.
Referenced by PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER(), and PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER().
|
inherited |
Set the symbol name to be selected if there are no search results.
May be set at any time; updates at the next UpdateSearchString().
aLibId | symbol LIB_ID to be selected |
aUnit | unit to be selected, if > 0 (0 selects the alias itself) |
Definition at line 216 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::m_preselect_lib_id, and LIB_TREE_MODEL_ADAPTER::m_preselect_unit.
Referenced by PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER(), PANEL_SYMBOL_CHOOSER::PANEL_SYMBOL_CHOOSER(), and PANEL_DESIGN_BLOCK_CHOOSER::RefreshLibs().
|
inherited |
Sets which columns are shown in the widget.
Invalid column names are discarded.
aColumnNames | is an ordered list of column names to show |
Definition at line 447 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::m_shownColumns, LIB_TREE_MODEL_ADAPTER::m_widget, and LIB_TREE_MODEL_ADAPTER::recreateColumns().
|
inlineinherited |
Definition at line 155 of file lib_tree_model_adapter.h.
References LIB_TREE_MODEL_ADAPTER::m_sort_mode.
|
inlineoverrideprotectedinherited |
Set the value of an item.
Does nothing - this model doesn't support editing.
Definition at line 388 of file lib_tree_model_adapter.h.
|
inlineinherited |
Definition at line 320 of file lib_tree_model_adapter.h.
References LIB_TREE_MODEL_ADAPTER::recreateColumns().
|
overridevirtual |
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 381 of file symbol_tree_synchronizing_adapter.cpp.
References KIGFX::COLOR4D::BLACK, SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), EDA_DRAW_PANEL_GAL::GetBackend(), SCH_BASE_FRAME::GetCanvas(), KIWAY_HOLDER::Kiway(), m_frame, LIB_TREE_NODE::m_LibId, LIB_TREE_NODE::m_Unit, WX_PANEL::SetBorderColor(), WX_PANEL::SetBorders(), and LIB_TREE_MODEL_ADAPTER::ToNode().
|
privateinherited |
Find and expand successful search results.
Return the best match (if any).
Definition at line 738 of file lib_tree_model_adapter.cpp.
References LIB_ID::IsValid(), LIB_TREE_NODE::m_Children, LIB_TREE_NODE::m_LibId, LIB_TREE_NODE::m_Name, LIB_TREE_NODE::m_Parent, LIB_TREE_MODEL_ADAPTER::m_preselect_lib_id, LIB_TREE_MODEL_ADAPTER::m_preselect_unit, LIB_TREE_NODE::m_Score, LIB_TREE_MODEL_ADAPTER::m_tree, LIB_TREE_NODE::m_Type, LIB_TREE_NODE::m_Unit, and recursiveDescent().
Referenced by LIB_TREE_MODEL_ADAPTER::UpdateSearchString().
|
inherited |
Whether or not to show units.
May be set at any time; updates at the next UpdateSearchString()
aShow | if true, units are displayed |
Definition at line 210 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::m_show_units.
void SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync | ( | const wxString & | aForceRefresh, |
std::function< void(int, int, const wxString &)> | aProgressCallback | ||
) |
Definition at line 72 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_TREE_NODE::AssignIntrinsicRanks(), alg::contains(), deleteLibrary(), LIB_TREE_MODEL_ADAPTER::DoAddLibraryNode(), SYMBOL_LIB_TABLE::FindRow(), PGM_BASE::GetCommonSettings(), SYMBOL_LIBRARY_MANAGER::GetHash(), GetLibrariesCount(), SYMBOL_LIBRARY_MANAGER::GetLibrary(), SYMBOL_LIBRARY_MANAGER::GetLibraryNames(), PROJECT::GetProjectFile(), LIB_TABLE::HasLibrary(), library, SYMBOL_LIBRARY_MANAGER::LibraryExists(), LIB_TREE_NODE::m_Children, m_frame, m_lastSyncHash, m_libHashes, m_libMgr, COMMON_SETTINGS::m_Session, LIB_TREE_MODEL_ADAPTER::m_tree, name, Pgm(), COMMON_SETTINGS::SESSION::pinned_symbol_libs, KIWAY_HOLDER::Prj(), PROGRESS_INTERVAL_MILLIS, project, PROJECT_SCH::SchSymbolLibTable(), and updateLibrary().
Referenced by LIB_SYMBOL_LIBRARY_MANAGER::Sync().
|
inlineinherited |
Definition at line 309 of file lib_tree_model_adapter.h.
References LIB_TREE_MODEL_ADAPTER::m_freeze.
Referenced by LIB_TREE_MODEL_ADAPTER::resortTree(), and LIB_TREE_MODEL_ADAPTER::UpdateSearchString().
|
staticprotectedinherited |
Convert #SYM_TREE_NODE -> wxDataViewItem.
Definition at line 116 of file lib_tree_model_adapter.cpp.
Referenced by LIB_TREE_MODEL_ADAPTER::FindItem(), GetAttr(), FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), LIB_TREE_MODEL_ADAPTER::GetChildren(), LIB_TREE_MODEL_ADAPTER::GetParent(), LIB_TREE_MODEL_ADAPTER::PinLibrary(), and LIB_TREE_MODEL_ADAPTER::UpdateSearchString().
|
staticprotectedinherited |
Convert wxDataViewItem -> #SYM_TREE_NODE.
Definition at line 122 of file lib_tree_model_adapter.cpp.
Referenced by LIB_TREE_MODEL_ADAPTER::GetAliasFor(), LIB_TREE_MODEL_ADAPTER::GetAttr(), GetAttr(), FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), LIB_TREE_MODEL_ADAPTER::GetChildren(), LIB_TREE_MODEL_ADAPTER::GetOpenLibs(), LIB_TREE_MODEL_ADAPTER::GetParent(), LIB_TREE_MODEL_ADAPTER::GetTreeNodeFor(), LIB_TREE_MODEL_ADAPTER::GetTypeFor(), LIB_TREE_MODEL_ADAPTER::GetUnitFor(), LIB_TREE_MODEL_ADAPTER::GetValue(), GetValue(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), HasPreview(), FP_TREE_SYNCHRONIZING_ADAPTER::HasPreview(), IsContainer(), LIB_TREE_MODEL_ADAPTER::IsContainer(), FP_TREE_SYNCHRONIZING_ADAPTER::IsContainer(), ShowPreview(), and FP_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().
|
inherited |
Definition at line 398 of file lib_tree_model_adapter.cpp.
References LIB_ID::GetLibNickname(), LIB_TREE_MODEL_ADAPTER::getLibType(), LIB_TREE_NODE::m_LibId, LIB_TREE_MODEL_ADAPTER::m_parent, LIB_TREE_NODE::m_Pinned, KIWAY_HOLDER::Prj(), LIB_TREE_MODEL_ADAPTER::resortTree(), and PROJECT::UnpinLibrary().
|
protected |
Definition at line 156 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_TREE_NODE_LIBRARY::AddItem(), LIB_TREE_NODE::AssignIntrinsicRanks(), SYMBOL_LIBRARY_MANAGER::GetAliases(), SYMBOL_LIBRARY_MANAGER::GetLibraryHash(), LIB_TREE_NODE::m_Children, m_libHashes, m_libMgr, and LIB_TREE_NODE::m_Name.
Referenced by Sync().
|
inherited |
Set the search string provided by the user.
aSearch | full, unprocessed search text |
aState | if true, we are keeping the state and so we shouldn't collapse the tree |
Definition at line 254 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::BEST_MATCH, CTX_LIBITEM, LIB_TREE_MODEL_ADAPTER::Freeze(), LIB_TREE_MODEL_ADAPTER::GetParent(), LIB_TREE_NODE::m_Children, LIB_TREE_MODEL_ADAPTER::m_filter, LIB_TREE_MODEL_ADAPTER::m_sort_mode, LIB_TREE_MODEL_ADAPTER::m_tree, LIB_TREE_MODEL_ADAPTER::m_widget, LIB_TREE_NODE::ResetScore(), LIB_TREE_MODEL_ADAPTER::ShowResults(), LIB_TREE_NODE::SortNodes(), LIB_TREE_MODEL_ADAPTER::Thaw(), LIB_TREE_MODEL_ADAPTER::ToItem(), and LIB_TREE_NODE_ROOT::UpdateScore().
|
protectedinherited |
Definition at line 423 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::addColumnIfNecessary(), LIB_TREE_MODEL_ADAPTER::GetAvailableColumns(), LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), and SYMBOL_TREE_MODEL_ADAPTER::SYMBOL_TREE_MODEL_ADAPTER().
|
privateinherited |
Definition at line 429 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), and LIB_TREE_MODEL_ADAPTER::SaveSettings().
|
protectedinherited |
Definition at line 422 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::doAddColumn(), LIB_TREE_MODEL_ADAPTER::FinishTreeInitialization(), LIB_TREE_MODEL_ADAPTER::GetValue(), GetValue(), and LIB_TREE_MODEL_ADAPTER::recreateColumns().
|
privateinherited |
Definition at line 440 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::addColumnIfNecessary(), LIB_TREE_MODEL_ADAPTER::doAddColumn(), LIB_TREE_MODEL_ADAPTER::recreateColumns(), LIB_TREE_MODEL_ADAPTER::RefreshTree(), and LIB_TREE_MODEL_ADAPTER::SaveSettings().
|
privateinherited |
|
privateinherited |
Definition at line 441 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::doAddColumn(), LIB_TREE_MODEL_ADAPTER::FinishTreeInitialization(), LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), and LIB_TREE_MODEL_ADAPTER::RefreshTree().
|
privateinherited |
Definition at line 437 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::GetFilter(), LIB_TREE_MODEL_ADAPTER::SetFilter(), and LIB_TREE_MODEL_ADAPTER::UpdateSearchString().
|
protected |
Definition at line 72 of file symbol_tree_synchronizing_adapter.h.
Referenced by GetAttr(), GetContextMenuTool(), GetCurrentDataViewItem(), GetValue(), HasPreview(), ShowPreview(), and Sync().
|
privateinherited |
Definition at line 435 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::Freeze(), LIB_TREE_MODEL_ADAPTER::GetParent(), LIB_TREE_MODEL_ADAPTER::IsFrozen(), and LIB_TREE_MODEL_ADAPTER::Thaw().
|
protected |
Definition at line 79 of file symbol_tree_synchronizing_adapter.h.
Referenced by Sync().
|
protected |
SYMBOL_LIBRARY_MANAGER hash value returned in the last synchronization.
Definition at line 76 of file symbol_tree_synchronizing_adapter.h.
Referenced by deleteLibrary(), GetLibrariesCount(), Sync(), and updateLibrary().
|
protected |
Hashes to decide whether a library needs an update.
Definition at line 73 of file symbol_tree_synchronizing_adapter.h.
Referenced by GetAttr(), GetLibrariesCount(), GetValue(), Sync(), and updateLibrary().
|
privateinherited |
Definition at line 428 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::GetToolDispatcher(), LIB_TREE_MODEL_ADAPTER::PinLibrary(), and LIB_TREE_MODEL_ADAPTER::UnpinLibrary().
|
privateinherited |
Definition at line 433 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::GetCurrentDataViewItem(), LIB_TREE_MODEL_ADAPTER::SetPreselectNode(), and LIB_TREE_MODEL_ADAPTER::ShowResults().
|
privateinherited |
Definition at line 434 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::SetPreselectNode(), and LIB_TREE_MODEL_ADAPTER::ShowResults().
|
privateinherited |
Definition at line 432 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::GetChildren(), and LIB_TREE_MODEL_ADAPTER::ShowUnits().
|
privateinherited |
Definition at line 442 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::GetShownColumns(), LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), LIB_TREE_MODEL_ADAPTER::recreateColumns(), and LIB_TREE_MODEL_ADAPTER::SetShownColumns().
|
privateinherited |
Definition at line 431 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::GetSortMode(), LIB_TREE_MODEL_ADAPTER::resortTree(), LIB_TREE_MODEL_ADAPTER::SetSortMode(), and LIB_TREE_MODEL_ADAPTER::UpdateSearchString().
|
protectedinherited |
Definition at line 421 of file lib_tree_model_adapter.h.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), LIB_TREE_MODEL_ADAPTER::AssignIntrinsicRanks(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::ClearLibraries(), deleteLibrary(), FP_TREE_SYNCHRONIZING_ADAPTER::deleteLibrary(), LIB_TREE_MODEL_ADAPTER::DoAddLibraryNode(), LIB_TREE_MODEL_ADAPTER::DoRemoveLibrary(), LIB_TREE_MODEL_ADAPTER::FindItem(), LIB_TREE_MODEL_ADAPTER::GetChildren(), LIB_TREE_MODEL_ADAPTER::GetItemCount(), LIB_TREE_MODEL_ADAPTER::GetLibrariesCount(), LIB_TREE_MODEL_ADAPTER::resortTree(), LIB_TREE_MODEL_ADAPTER::ShowResults(), Sync(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), and LIB_TREE_MODEL_ADAPTER::UpdateSearchString().
|
protectedinherited |
Definition at line 425 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::AttachTo(), LIB_TREE_MODEL_ADAPTER::doAddColumn(), LIB_TREE_MODEL_ADAPTER::FinishTreeInitialization(), GetAttr(), FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), LIB_TREE_MODEL_ADAPTER::GetOpenLibs(), LIB_TREE_MODEL_ADAPTER::OpenLibs(), LIB_TREE_MODEL_ADAPTER::PinLibrary(), LIB_TREE_MODEL_ADAPTER::recreateColumns(), LIB_TREE_MODEL_ADAPTER::SaveSettings(), LIB_TREE_MODEL_ADAPTER::SetShownColumns(), and LIB_TREE_MODEL_ADAPTER::UpdateSearchString().