|
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 |
| bool | HasPreview (const wxDataViewItem &aItem) override |
| void | ShowPreview (wxWindow *aParent, const wxDataViewItem &aItem) override |
| void | ShutdownPreview (wxWindow *aParent) override |
| void | SaveSettings () |
| Save the column widths to the config file. | |
| void | SetFilter (std::function< bool(LIB_TREE_NODE &aNode)> *aFilter) |
| Set the filter. | |
| 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. | |
| LIB_TREE_NODE_LIBRARY & | 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 | RemoveGroup (bool aRecentlyUsedGroup, bool aAlreadyPlacedGroup) |
| Remove one of the system groups from the library. | |
| std::vector< wxString > | GetAvailableColumns () const |
| std::vector< wxString > | GetShownColumns () const |
| std::vector< wxString > | GetOpenLibs () const |
| void | OpenLibs (const std::vector< wxString > &aLibs) |
| void | RegisterLazyLoadHandler (std::function< void()> &&aHandler) |
| Registers a function to be called whenever new lazy-loaded library content is available. | |
| 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 () |
| void | createMissingColumns () |
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 |
| std::map< wxString, int > | m_libHashes |
| Hashes to decide whether a library needs an update. | |
| int | m_lastSyncHash |
| SYMBOL_LIBRARY_MANAGER hash value returned in the last synchronization. | |
| LIB_TREE_NODE_ROOT | m_tree |
| std::map< unsigned, wxString > | m_colIdxMap |
| std::vector< wxString > | m_availableColumns |
| wxDataViewCtrl * | m_widget |
| std::vector< wxString > | m_shownColumns |
| std::function< void()> | m_lazyLoadHandler |
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::LIB_TREE & | 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 |
Definition at line 36 of file symbol_tree_synchronizing_adapter.h.
|
inherited |
| Enumerator | |
|---|---|
| BEST_MATCH | |
| ALPHABETIC | |
Definition at line 132 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 125 of file lib_tree_model_adapter.h.
|
protected |
Definition at line 50 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), m_frame, m_lastSyncHash, and m_libMgr.
Referenced by Create().
|
protectedinherited |
Definition at line 456 of file lib_tree_model_adapter.cpp.
References m_availableColumns, and m_colNameMap.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries().
|
inlineinherited |
Sort the tree and assign ranks after adding libraries.
Definition at line 213 of file lib_tree_model_adapter.h.
References m_shownColumns, and 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 349 of file lib_tree_model_adapter.cpp.
References kDataViewIndent, m_widget, and recreateColumns().
|
static |
Definition at line 42 of file symbol_tree_synchronizing_adapter.cpp.
References SYMBOL_TREE_SYNCHRONIZING_ADAPTER().
Referenced by LIB_SYMBOL_LIBRARY_MANAGER::LIB_SYMBOL_LIBRARY_MANAGER().
|
protectedinherited |
Definition at line 372 of file lib_tree_model_adapter.cpp.
References doAddColumn(), m_colNameMap, and m_shownColumns.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), and recreateColumns().
|
protected |
Definition at line 216 of file symbol_tree_synchronizing_adapter.cpp.
References m_libHashes, LIB_TREE_NODE::m_Name, and LIB_TREE_MODEL_ADAPTER::m_tree.
Referenced by Sync().
|
privateinherited |
Definition at line 428 of file lib_tree_model_adapter.cpp.
References KIUI::GetTextSize(), m_colIdxMap, m_colNameMap, m_columns, m_colWidths, and m_widget.
Referenced by createMissingColumns(), and 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 240 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE_LIBRARY::AddItem(), LIB_TREE_NODE::AssignIntrinsicRanks(), DoAddLibraryNode(), and m_shownColumns.
Referenced by DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_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 228 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Pinned, and m_tree.
Referenced by DoAddLibrary(), and SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync().
|
inherited |
Returns tree item corresponding to part.
| aLibId | specifies the part and library name to be searched for. |
Definition at line 519 of file lib_tree_model_adapter.cpp.
References LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), m_tree, ToItem(), and UTF8::wx_str().
Referenced by FP_TREE_SYNCHRONIZING_ADAPTER::GetCurrentDataViewItem(), GetCurrentDataViewItem(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetCurrentDataViewItem(), and OpenLibs().
|
inherited |
A final-stage initialization to be called after the window hierarchy has been realized and the window sizes set.
Definition at line 573 of file lib_tree_model_adapter.cpp.
References m_colIdxMap, m_columns, m_colWidths, and m_widget.
|
inlineinherited |
Definition at line 318 of file lib_tree_model_adapter.h.
References m_freeze.
Referenced by resortTree(), and UpdateSearchString().
|
inlinevirtualinherited |
Reimplemented in DESIGN_BLOCK_TREE_MODEL_ADAPTER, FP_TREE_MODEL_ADAPTER, and SYMBOL_TREE_MODEL_ADAPTER.
Definition at line 276 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 481 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_LibId, and ToNode().
|
overrideprotected |
Definition at line 320 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_SYMBOL::GetLibId(), LIB_ID::GetLibNickname(), LIB_TREE_MODEL_ADAPTER::IsFrozen(), 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 191 of file lib_tree_model_adapter.h.
References m_availableColumns.
|
overrideinherited |
Populate a list of all the children of an item.
Definition at line 549 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Children, m_show_units, m_tree, LIB_TREE_NODE::m_Type, ToItem(), and ToNode().
Referenced by GetOpenLibs().
|
inlineoverrideprotectedinherited |
Definition at line 373 of file lib_tree_model_adapter.h.
References m_columns.
|
inlineoverrideprotectedinherited |
Return the type of data stored in the column as indicated by wxVariant::GetType()
Definition at line 378 of file lib_tree_model_adapter.h.
|
overridevirtual |
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 61 of file symbol_tree_synchronizing_adapter.cpp.
References m_frame.
|
overridevirtual |
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 224 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::FindItem(), and m_frame.
|
inlineinherited |
Return the active filter.
Definition at line 152 of file lib_tree_model_adapter.h.
References m_filter.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibrary().
|
inherited |
Return the number of symbols loaded in the tree.
Definition at line 508 of file lib_tree_model_adapter.cpp.
References m_tree.
|
overridevirtual |
Return the number of libraries loaded in the tree.
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 152 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::GetLibrariesCount(), m_libHashes, and m_libMgr.
Referenced by Sync().
|
inlineoverrideprotectedvirtual |
Implements LIB_TREE_MODEL_ADAPTER.
Definition at line 70 of file symbol_tree_synchronizing_adapter.h.
References PROJECT::SYMBOL_LIB.
|
inherited |
Definition at line 165 of file lib_tree_model_adapter.cpp.
References GetChildren(), m_widget, and ToNode().
Referenced by SaveSettings().
|
overrideprotectedinherited |
Get the parent of an item.
Definition at line 658 of file lib_tree_model_adapter.cpp.
References m_freeze, LIB_TREE_NODE::m_Parent, LIB_TREE_NODE::m_Type, ToItem(), and ToNode().
Referenced by UpdateSearchString().
|
inlinestaticinherited |
Definition at line 110 of file lib_tree_model_adapter.h.
Referenced by CVPCB_MAINFRAME::BuildLibrariesList(), WX_LISTBOX::FindString(), WX_LISTBOX::GetBaseString(), PCB_BASE_FRAME::GetLibraryItemsForListDialog(), SCH_BASE_FRAME::GetLibraryItemsForListDialog(), LIBRARY_LISTBOX::GetSelectedLibrary(), WX_LISTBOX::GetStringSelection(), EDA_LIST_DIALOG::GetTextSelection(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), GetValue(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), WX_LISTBOX::SetStringSelection(), and WX_LISTBOX::SetStringSelection().
|
inlineinherited |
Definition at line 193 of file lib_tree_model_adapter.h.
References m_shownColumns.
Referenced by SaveSettings().
|
inlineinherited |
Definition at line 155 of file lib_tree_model_adapter.h.
References m_sort_mode.
|
inlineinherited |
Definition at line 282 of file lib_tree_model_adapter.h.
References m_parent.
|
inherited |
Definition at line 502 of file lib_tree_model_adapter.cpp.
References ToNode().
|
inherited |
Return node type for the given item.
| aSelection | item from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection()) |
Definition at line 495 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Type, and ToNode().
|
inherited |
Return the unit for the given item.
| aSelection | item from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection()) |
Definition at line 488 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Unit, and ToNode().
|
overrideprotected |
Definition at line 233 of file symbol_tree_synchronizing_adapter.cpp.
References _, LIB_ID::GetLibNickname(), LIB_TREE_MODEL_ADAPTER::GetPinningSymbol(), LIBRARY_MANAGER_ADAPTER::GetRow(), LIB_TREE_MODEL_ADAPTER::IsFrozen(), 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, PROJECT_SCH::SymbolLibAdapter(), LIB_TREE_MODEL_ADAPTER::ToNode(), and UnescapeString().
|
overrideprotectedinherited |
Check whether a container has columns too.
Definition at line 645 of file lib_tree_model_adapter.cpp.
References IsContainer().
|
overridevirtual |
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 384 of file symbol_tree_synchronizing_adapter.cpp.
References m_frame, LIB_TREE_NODE::m_LibId, LIB_TREE_NODE::m_Type, and LIB_TREE_MODEL_ADAPTER::ToNode().
|
override |
Definition at line 67 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_TREE_NODE::m_Type, and LIB_TREE_MODEL_ADAPTER::ToNode().
|
inlineinherited |
Definition at line 320 of file lib_tree_model_adapter.h.
References m_freeze.
Referenced by FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), GetAttr(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), GetValue(), and SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue().
|
inherited |
Definition at line 183 of file lib_tree_model_adapter.cpp.
References FindItem(), and m_widget.
|
inherited |
Definition at line 394 of file lib_tree_model_adapter.cpp.
References LIB_ID::GetLibNickname(), getLibType(), LIB_TREE_NODE::m_LibId, m_parent, LIB_TREE_NODE::m_Pinned, m_widget, resortTree(), and ToItem().
|
protectedinherited |
Definition at line 358 of file lib_tree_model_adapter.cpp.
References createMissingColumns(), doAddColumn(), m_colIdxMap, m_colNameMap, m_columns, and m_widget.
Referenced by AttachTo(), SetShownColumns(), and ShowChangedLanguage().
|
inherited |
Definition at line 600 of file lib_tree_model_adapter.cpp.
References m_colNameMap, m_columns, and m_colWidths.
|
inlineinherited |
Registers a function to be called whenever new lazy-loaded library content is available.
Definition at line 199 of file lib_tree_model_adapter.h.
References m_lazyLoadHandler.
|
inherited |
Remove one of the system groups from the library.
Definition at line 256 of file lib_tree_model_adapter.cpp.
References m_tree.
|
protectedinherited |
Definition at line 382 of file lib_tree_model_adapter.cpp.
References BEST_MATCH, Freeze(), m_sort_mode, m_tree, and Thaw().
Referenced by PinLibrary(), and UnpinLibrary().
|
inherited |
Save the column widths to the config file.
This requires the tree view to still be valid.
Definition at line 197 of file lib_tree_model_adapter.cpp.
References GetOpenLibs(), GetShownColumns(), m_cfg, m_colNameMap, and m_widget.
|
inlineinherited |
Set the filter.
Must be set before adding libraries.
Definition at line 147 of file lib_tree_model_adapter.h.
References 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 221 of file lib_tree_model_adapter.cpp.
References m_preselect_lib_id, and 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 467 of file lib_tree_model_adapter.cpp.
References m_shownColumns, m_tree, m_widget, and recreateColumns().
|
inlineinherited |
Definition at line 154 of file lib_tree_model_adapter.h.
References m_sort_mode.
|
inlineoverrideprotectedinherited |
Set the value of an item.
Does nothing - this model doesn't support editing.
Definition at line 395 of file lib_tree_model_adapter.h.
|
inherited |
Definition at line 414 of file lib_tree_model_adapter.cpp.
References _, m_tree, and recreateColumns().
|
overridevirtual |
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 396 of file symbol_tree_synchronizing_adapter.cpp.
References KIGFX::COLOR4D::BLACK, c_previewName, SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), 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 764 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Children, LIB_TREE_NODE::m_LibId, LIB_TREE_NODE::m_Name, LIB_TREE_NODE::m_Parent, m_preselect_lib_id, m_preselect_unit, LIB_TREE_NODE::m_Score, m_tree, LIB_TREE_NODE::m_Type, LIB_TREE_NODE::m_Unit, m_widget, recursiveDescent(), and ToItem().
Referenced by 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 215 of file lib_tree_model_adapter.cpp.
References m_show_units.
|
overridevirtual |
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 431 of file symbol_tree_synchronizing_adapter.cpp.
References c_previewName.
| void SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync | ( | const wxString & | aForceRefresh, |
| std::function< void(int, int, const wxString &)> | aProgressCallback ) |
Definition at line 76 of file symbol_tree_synchronizing_adapter.cpp.
References alg::contains(), deleteLibrary(), LIB_TREE_MODEL_ADAPTER::DoAddLibraryNode(), PGM_BASE::GetCommonSettings(), GetLibrariesCount(), LIBRARY_MANAGER_ADAPTER::GetLibraryStatuses(), LIBRARY_MANAGER_ADAPTER::GetRow(), LIBRARY_MANAGER_ADAPTER::HasLibrary(), LOADED, m_frame, m_lastSyncHash, m_libHashes, m_libMgr, COMMON_SETTINGS::m_Session, LIB_TREE_MODEL_ADAPTER::m_shownColumns, LIB_TREE_MODEL_ADAPTER::m_tree, name, Pgm(), COMMON_SETTINGS::SESSION::pinned_symbol_libs, PROGRESS_INTERVAL_MILLIS, project, PROJECT_SCH::SymbolLibAdapter(), and updateLibrary().
Referenced by LIB_SYMBOL_LIBRARY_MANAGER::Sync().
|
inlineinherited |
Definition at line 319 of file lib_tree_model_adapter.h.
References m_freeze.
Referenced by resortTree(), and UpdateSearchString().
|
staticprotectedinherited |
Convert #SYM_TREE_NODE -> wxDataViewItem.
Definition at line 117 of file lib_tree_model_adapter.cpp.
Referenced by FindItem(), FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), GetChildren(), GetParent(), PinLibrary(), ShowResults(), and UpdateSearchString().
|
staticprotectedinherited |
Convert wxDataViewItem -> #SYM_TREE_NODE.
Definition at line 123 of file lib_tree_model_adapter.cpp.
Referenced by GetAliasFor(), FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), GetAttr(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), GetChildren(), GetOpenLibs(), GetParent(), GetTreeNodeFor(), GetTypeFor(), GetUnitFor(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), GetValue(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue(), FP_TREE_SYNCHRONIZING_ADAPTER::HasPreview(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::HasPreview(), FP_TREE_SYNCHRONIZING_ADAPTER::IsContainer(), IsContainer(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::IsContainer(), FP_TREE_SYNCHRONIZING_ADAPTER::ShowPreview(), and SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().
|
inherited |
Definition at line 404 of file lib_tree_model_adapter.cpp.
References LIB_ID::GetLibNickname(), getLibType(), LIB_TREE_NODE::m_LibId, m_parent, LIB_TREE_NODE::m_Pinned, and resortTree().
|
protected |
Definition at line 166 of file symbol_tree_synchronizing_adapter.cpp.
References LIB_TREE_NODE_LIBRARY::AddItem(), LIB_TREE_NODE::AssignIntrinsicRanks(), LIB_TREE_NODE::m_Children, m_libHashes, m_libMgr, LIB_TREE_NODE::m_Name, LIB_TREE_MODEL_ADAPTER::m_shownColumns, and LIB_TREE_NODE_ITEM::Update().
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 262 of file lib_tree_model_adapter.cpp.
References BEST_MATCH, CTX_LIBITEM, Freeze(), GetParent(), m_filter, m_sort_mode, m_tree, m_widget, ShowResults(), Thaw(), and ToItem().
|
protectedinherited |
Definition at line 431 of file lib_tree_model_adapter.h.
Referenced by addColumnIfNecessary(), GetAvailableColumns(), LIB_TREE_MODEL_ADAPTER(), and SYMBOL_TREE_MODEL_ADAPTER::SYMBOL_TREE_MODEL_ADAPTER().
|
privateinherited |
Definition at line 439 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER(), and SaveSettings().
|
protectedinherited |
Definition at line 430 of file lib_tree_model_adapter.h.
Referenced by doAddColumn(), FinishTreeInitialization(), GetValue(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue(), and recreateColumns().
|
privateinherited |
Definition at line 450 of file lib_tree_model_adapter.h.
Referenced by addColumnIfNecessary(), createMissingColumns(), doAddColumn(), recreateColumns(), RefreshTree(), and SaveSettings().
|
privateinherited |
Definition at line 449 of file lib_tree_model_adapter.h.
Referenced by doAddColumn(), FinishTreeInitialization(), GetColumnCount(), recreateColumns(), and RefreshTree().
|
privateinherited |
Definition at line 451 of file lib_tree_model_adapter.h.
Referenced by doAddColumn(), FinishTreeInitialization(), LIB_TREE_MODEL_ADAPTER(), and RefreshTree().
|
privateinherited |
Definition at line 447 of file lib_tree_model_adapter.h.
Referenced by GetFilter(), LIB_TREE_MODEL_ADAPTER(), SetFilter(), and UpdateSearchString().
|
protected |
Definition at line 73 of file symbol_tree_synchronizing_adapter.h.
Referenced by GetAttr(), GetContextMenuTool(), GetCurrentDataViewItem(), GetValue(), HasPreview(), ShowPreview(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER(), and Sync().
|
privateinherited |
Definition at line 445 of file lib_tree_model_adapter.h.
Referenced by Freeze(), GetParent(), IsFrozen(), LIB_TREE_MODEL_ADAPTER(), and Thaw().
|
protected |
SYMBOL_LIBRARY_MANAGER hash value returned in the last synchronization.
Definition at line 80 of file symbol_tree_synchronizing_adapter.h.
Referenced by SYMBOL_TREE_SYNCHRONIZING_ADAPTER(), and Sync().
|
protectedinherited |
Definition at line 435 of file lib_tree_model_adapter.h.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), LIB_TREE_MODEL_ADAPTER(), and RegisterLazyLoadHandler().
|
protected |
Hashes to decide whether a library needs an update.
Definition at line 77 of file symbol_tree_synchronizing_adapter.h.
Referenced by deleteLibrary(), GetLibrariesCount(), Sync(), and updateLibrary().
|
protected |
Definition at line 74 of file symbol_tree_synchronizing_adapter.h.
Referenced by GetAttr(), GetLibrariesCount(), GetValue(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER(), Sync(), and updateLibrary().
|
privateinherited |
Definition at line 438 of file lib_tree_model_adapter.h.
Referenced by GetToolDispatcher(), LIB_TREE_MODEL_ADAPTER(), PinLibrary(), and UnpinLibrary().
|
privateinherited |
Definition at line 443 of file lib_tree_model_adapter.h.
Referenced by GetCurrentDataViewItem(), SetPreselectNode(), and ShowResults().
|
privateinherited |
Definition at line 444 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER(), SetPreselectNode(), and ShowResults().
|
privateinherited |
Definition at line 442 of file lib_tree_model_adapter.h.
Referenced by GetChildren(), LIB_TREE_MODEL_ADAPTER(), and ShowUnits().
|
protectedinherited |
Definition at line 434 of file lib_tree_model_adapter.h.
Referenced by DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), AssignIntrinsicRanks(), createMissingColumns(), DoAddLibrary(), GetShownColumns(), LIB_TREE_MODEL_ADAPTER(), SetShownColumns(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FP_TREE_SYNCHRONIZING_ADAPTER::updateLibrary(), and SYMBOL_TREE_SYNCHRONIZING_ADAPTER::updateLibrary().
|
privateinherited |
Definition at line 441 of file lib_tree_model_adapter.h.
Referenced by GetSortMode(), LIB_TREE_MODEL_ADAPTER(), resortTree(), SetSortMode(), and UpdateSearchString().
|
protectedinherited |
Definition at line 429 of file lib_tree_model_adapter.h.
Referenced by DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), AssignIntrinsicRanks(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::ClearLibraries(), FP_TREE_SYNCHRONIZING_ADAPTER::deleteLibrary(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::deleteLibrary(), DoAddLibraryNode(), FindItem(), GetChildren(), GetItemCount(), GetLibrariesCount(), RemoveGroup(), resortTree(), SetShownColumns(), ShowChangedLanguage(), ShowResults(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), and UpdateSearchString().
|
protectedinherited |
Definition at line 433 of file lib_tree_model_adapter.h.
Referenced by AttachTo(), doAddColumn(), FinishTreeInitialization(), FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), GetOpenLibs(), LIB_TREE_MODEL_ADAPTER(), OpenLibs(), PinLibrary(), recreateColumns(), SaveSettings(), SetShownColumns(), ShowResults(), and UpdateSearchString().