KiCad PCB EDA Suite
|
#include <fp_tree_model_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 | |
void | AddLibraries (EDA_BASE_FRAME *aParent) |
wxString | GenerateInfo (LIB_ID const &aLibId, int aUnit) 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 bool | HasPreview (const wxDataViewItem &aItem) |
virtual void | ShowPreview (wxWindow *aParent, const wxDataViewItem &aItem) |
TOOL_DISPATCHER * | GetToolDispatcher () const |
int | GetItemCount () const |
Return the number of symbols loaded in the tree. | |
virtual int | GetLibrariesCount () const |
Return the number of libraries loaded in the tree. | |
wxDataViewItem | FindItem (const LIB_ID &aLibId) |
Returns tree item corresponding to part. | |
virtual wxDataViewItem | GetCurrentDataViewItem () |
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 () |
virtual TOOL_INTERACTIVE * | GetContextMenuTool () |
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 (EDA_BASE_FRAME *aParent, LIB_TABLE *aLibs) |
Factory function: create a model adapter in a reference-counting container. | |
static const wxString | GetPinningSymbol () |
Protected Member Functions | |
FP_TREE_MODEL_ADAPTER (EDA_BASE_FRAME *aParent, LIB_TABLE *aLibs) | |
Constructor; takes a set of libraries to be included in the search. | |
std::vector< LIB_TREE_ITEM * > | getFootprints (const wxString &aLibName) |
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. | |
bool | IsContainer (const wxDataViewItem &aItem) const override |
Check whether an item can have children. | |
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() | |
void | GetValue (wxVariant &aVariant, const wxDataViewItem &aItem, unsigned int aCol) const override |
Get the value of an item. | |
bool | SetValue (const wxVariant &aVariant, const wxDataViewItem &aItem, unsigned int aCol) override |
Set the value of an item. | |
bool | GetAttr (const wxDataViewItem &aItem, unsigned int aCol, wxDataViewItemAttr &aAttr) const override |
Get any formatting for 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 | |
FP_LIB_TABLE * | m_libs |
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 |
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 31 of file fp_tree_model_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 |
Constructor; takes a set of libraries to be included in the search.
Definition at line 44 of file fp_tree_model_adapter.cpp.
|
protectedinherited |
Definition at line 438 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().
void FP_TREE_MODEL_ADAPTER::AddLibraries | ( | EDA_BASE_FRAME * | aParent | ) |
Definition at line 50 of file fp_tree_model_adapter.cpp.
References LIB_TREE_NODE::AssignIntrinsicRanks(), alg::contains(), LIB_TREE_MODEL_ADAPTER::DoAddLibrary(), FP_LIB_TABLE::FindRow(), PGM_BASE::GetCommonSettings(), getFootprints(), LIB_TABLE::GetLogicalLibs(), PROJECT::GetProjectFile(), library, m_libs, COMMON_SETTINGS::m_Session, LIB_TREE_MODEL_ADAPTER::m_tree, Pgm(), COMMON_SETTINGS::SESSION::pinned_fp_libs, KIWAY_HOLDER::Prj(), and project.
Referenced by FOOTPRINT_EDIT_FRAME::initLibraryTree(), and PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER().
|
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 350 of file lib_tree_model_adapter.cpp.
References kDataViewIndent, LIB_TREE_MODEL_ADAPTER::m_widget, and LIB_TREE_MODEL_ADAPTER::recreateColumns().
|
static |
Factory function: create a model adapter in a reference-counting container.
aLibs | library set from which parts will be loaded |
Definition at line 37 of file fp_tree_model_adapter.cpp.
Referenced by PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER().
|
privateinherited |
Definition at line 410 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 237 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(), 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 225 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 SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync().
|
inherited |
Remove the library by name.
aNodeName | the name of the library to remove |
Definition at line 250 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 498 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(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::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 552 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().
|
overridevirtual |
Reimplemented from LIB_TREE_MODEL_ADAPTER.
Definition at line 101 of file fp_tree_model_adapter.cpp.
References GenerateFootprintInfo(), and m_libs.
|
inherited |
Return the alias for the given item.
aSelection | item from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection()) |
Definition at line 460 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_LibId, and LIB_TREE_MODEL_ADAPTER::ToNode().
|
overrideprotectedinherited |
Get any formatting for an item.
aItem | item to get formatting for |
aCol | column number of interest |
aAttr | receiver for attributes |
Definition at line 700 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::IsFrozen(), LIB_TREE_NODE::m_IsRoot, LIB_TREE_NODE::m_Type, 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 528 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 364 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 369 of file lib_tree_model_adapter.h.
|
inlinevirtualinherited |
Reimplemented in DESIGN_BLOCK_TREE_MODEL_ADAPTER, SYMBOL_TREE_SYNCHRONIZING_ADAPTER, and FP_TREE_SYNCHRONIZING_ADAPTER.
Definition at line 315 of file lib_tree_model_adapter.h.
|
virtualinherited |
Reimplemented in SYMBOL_TREE_SYNCHRONIZING_ADAPTER, and FP_TREE_SYNCHRONIZING_ADAPTER.
Definition at line 522 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::FindItem(), and LIB_TREE_MODEL_ADAPTER::m_preselect_lib_id.
|
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().
|
protected |
Definition at line 78 of file fp_tree_model_adapter.cpp.
References dummy, FOOTPRINT_LIST::GetList(), GFootprintList, and StrNumCmp().
Referenced by AddLibraries(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), and FP_TREE_SYNCHRONIZING_ADAPTER::updateLibrary().
|
inherited |
Return the number of symbols loaded in the tree.
Definition at line 487 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Children, and LIB_TREE_MODEL_ADAPTER::m_tree.
|
inlinevirtualinherited |
Return the number of libraries loaded in the tree.
Reimplemented in SYMBOL_TREE_SYNCHRONIZING_ADAPTER, and FP_TREE_SYNCHRONIZING_ADAPTER.
Definition at line 282 of file lib_tree_model_adapter.h.
References LIB_TREE_NODE::m_Children, and LIB_TREE_MODEL_ADAPTER::m_tree.
Referenced by SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetLibrariesCount().
|
inlineoverrideprotectedvirtual |
Implements LIB_TREE_MODEL_ADAPTER.
Definition at line 54 of file fp_tree_model_adapter.h.
References PROJECT::FOOTPRINT_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 637 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(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::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 481 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 474 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 467 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Unit, and LIB_TREE_MODEL_ADAPTER::ToNode().
|
overrideprotectedinherited |
Get the value of an item.
aVariant | wxVariant to receive the data |
aItem | item whose data will be placed into aVariant |
aCol | column number of the data |
Definition at line 654 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::GetPinningSymbol(), LIB_TREE_MODEL_ADAPTER::IsFrozen(), LIB_TREE_MODEL_ADAPTER::m_colIdxMap, LIB_TREE_NODE::m_Desc, LIB_TREE_NODE::m_Fields, LIB_TREE_NODE::m_Name, LIB_TREE_NODE::m_Pinned, LIB_TREE_MODEL_ADAPTER::NAME_COL, LIB_TREE_MODEL_ADAPTER::ToNode(), and UnescapeString().
|
overrideprotectedinherited |
Check whether a container has columns too.
Definition at line 624 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::IsContainer().
|
inlinevirtualinherited |
Reimplemented in SYMBOL_TREE_SYNCHRONIZING_ADAPTER, and FP_TREE_SYNCHRONIZING_ADAPTER.
Definition at line 269 of file lib_tree_model_adapter.h.
|
overrideprotectedinherited |
Check whether an item can have children.
Definition at line 630 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Children, and LIB_TREE_MODEL_ADAPTER::ToNode().
Referenced by LIB_TREE_MODEL_ADAPTER::HasContainerColumns().
|
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(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), LIB_TREE_MODEL_ADAPTER::GetValue(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::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 390 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 359 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 579 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 378 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(), Kiface(), KIFACE_BASE::KifaceSettings(), 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 218 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 449 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 386 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().
|
inlinevirtualinherited |
Reimplemented in SYMBOL_TREE_SYNCHRONIZING_ADAPTER, and FP_TREE_SYNCHRONIZING_ADAPTER.
Definition at line 270 of file lib_tree_model_adapter.h.
|
privateinherited |
Find and expand successful search results.
Return the best match (if any).
Definition at line 740 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 212 of file lib_tree_model_adapter.cpp.
References LIB_TREE_MODEL_ADAPTER::m_show_units.
|
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(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::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(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::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(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::HasPreview(), FP_TREE_SYNCHRONIZING_ADAPTER::HasPreview(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::IsContainer(), LIB_TREE_MODEL_ADAPTER::IsContainer(), FP_TREE_SYNCHRONIZING_ADAPTER::IsContainer(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview(), and FP_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().
|
inherited |
Definition at line 400 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().
|
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 256 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 421 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().
|
protectedinherited |
|
privateinherited |
Definition at line 437 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 438 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 434 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().
|
privateinherited |
Definition at line 432 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 57 of file fp_tree_model_adapter.h.
Referenced by AddLibraries(), GenerateInfo(), and FP_TREE_SYNCHRONIZING_ADAPTER::Sync().
|
privateinherited |
Definition at line 426 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 430 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 431 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::SetPreselectNode(), and LIB_TREE_MODEL_ADAPTER::ShowResults().
|
privateinherited |
Definition at line 429 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::GetChildren(), and LIB_TREE_MODEL_ADAPTER::ShowUnits().
|
privateinherited |
Definition at line 439 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 428 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 419 of file lib_tree_model_adapter.h.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries(), AddLibraries(), LIB_TREE_MODEL_ADAPTER::AssignIntrinsicRanks(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::ClearLibraries(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::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(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), and LIB_TREE_MODEL_ADAPTER::UpdateSearchString().
|
protectedinherited |
Definition at line 423 of file lib_tree_model_adapter.h.
Referenced by LIB_TREE_MODEL_ADAPTER::AttachTo(), LIB_TREE_MODEL_ADAPTER::doAddColumn(), LIB_TREE_MODEL_ADAPTER::FinishTreeInitialization(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::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().