KiCad PCB EDA Suite
|
#include <lib_tree_model_adapter.h>
Public Types | |
enum | SYM_FILTER_TYPE { SYM_FILTER_NONE , SYM_FILTER_POWER } |
This enum allows a selective filtering of symbols to list. More... | |
enum | TREE_COLS { NAME_COL = 0 , DESC_COL , NUM_COLS } |
This enum defines the order of the default columns in the tree view. More... | |
Public Member Functions | |
~LIB_TREE_MODEL_ADAPTER () | |
Destructor. More... | |
void | SaveSettings () |
Save the column widths to the config file. More... | |
void | SetFilter (SYM_FILTER_TYPE aFilter) |
Set the symbol filter type. More... | |
SYM_FILTER_TYPE | GetFilter () const |
Return the active filter. More... | |
void | ShowUnits (bool aShow) |
Whether or not to show units. More... | |
void | SetPreselectNode (const LIB_ID &aLibId, int aUnit) |
Set the symbol name to be selected if there are no search results. More... | |
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. More... | |
void | AddColumn (const wxString &aHeader) |
std::vector< wxString > | GetAvailableColumns () const |
std::vector< wxString > | GetShownColumns () const |
void | SetShownColumns (const std::vector< wxString > &aColumnNames) |
Sets which columns are shown in the widget. More... | |
void | AssignIntrinsicRanks () |
Sort the tree and assign ranks after adding libraries. More... | |
void | UpdateSearchString (const wxString &aSearch, bool aState) |
Set the search string provided by the user. More... | |
void | AttachTo (wxDataViewCtrl *aDataViewCtrl) |
Attach to a wxDataViewCtrl and initialize it. More... | |
void | FinishTreeInitialization () |
A final-stage initialization to be called after the window hierarchy has been realized and the window sizes set. More... | |
void | OnSize (wxSizeEvent &aEvent) |
LIB_ID | GetAliasFor (const wxDataViewItem &aSelection) const |
Return the alias for the given item. More... | |
int | GetUnitFor (const wxDataViewItem &aSelection) const |
Return the unit for the given item. More... | |
LIB_TREE_NODE::TYPE | GetTypeFor (const wxDataViewItem &aSelection) const |
Return node type for the given item. More... | |
LIB_TREE_NODE * | GetTreeNodeFor (const wxDataViewItem &aSelection) const |
virtual wxString | GenerateInfo (const LIB_ID &aLibId, int aUnit) |
int | GetItemCount () const |
Return the number of symbols loaded in the tree. More... | |
virtual int | GetLibrariesCount () const |
Return the number of libraries loaded in the tree. More... | |
wxDataViewItem | FindItem (const LIB_ID &aLibId) |
Returns tree item corresponding to part. More... | |
unsigned int | GetChildren (const wxDataViewItem &aItem, wxDataViewItemArray &aChildren) const override |
Populate a list of all the children of an item. More... | |
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) |
Static Public Member Functions | |
static const wxString | GetPinningSymbol () |
Protected Member Functions | |
LIB_TREE_MODEL_ADAPTER (EDA_BASE_FRAME *aParent, const wxString &aPinnedKey) | |
Create the adapter. More... | |
LIB_TREE_NODE_LIB & | DoAddLibraryNode (const wxString &aNodeName, const wxString &aDesc, bool pinned) |
bool | HasContainerColumns (const wxDataViewItem &aItem) const override |
Check whether a container has columns too. More... | |
bool | IsContainer (const wxDataViewItem &aItem) const override |
Check whether an item can have children. More... | |
wxDataViewItem | GetParent (const wxDataViewItem &aItem) const override |
Get the parent of an item. More... | |
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() More... | |
void | GetValue (wxVariant &aVariant, const wxDataViewItem &aItem, unsigned int aCol) const override |
Get the value of an item. More... | |
bool | SetValue (const wxVariant &aVariant, const wxDataViewItem &aItem, unsigned int aCol) override |
Set the value of an item. More... | |
bool | GetAttr (const wxDataViewItem &aItem, unsigned int aCol, wxDataViewItemAttr &aAttr) const override |
Get any formatting for an item. More... | |
virtual bool | isSymbolModel ()=0 |
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. More... | |
static LIB_TREE_NODE * | ToNode (wxDataViewItem aItem) |
Convert wxDataViewItem -> #SYM_TREE_NODE. More... | |
static unsigned int | IntoArray (const LIB_TREE_NODE &aNode, wxDataViewItemArray &aChildren) |
Convert SYM_TREE_NODE's children to wxDataViewItemArray. More... | |
Protected Attributes | |
LIB_TREE_NODE_ROOT | m_tree |
std::map< unsigned, wxString > | m_colIdxMap |
std::vector< wxString > | m_availableColumns |
Private Member Functions | |
void | Find (LIB_TREE_NODE &aNode, std::function< bool(const LIB_TREE_NODE *)> aFunc, LIB_TREE_NODE **aHighScore) |
Find any results worth highlighting and expand them, according to given criteria The highest-scoring node is written to aHighScore. More... | |
LIB_TREE_NODE * | ShowResults () |
Find and expand successful search results. More... | |
LIB_TREE_NODE * | ShowPreselect () |
Find and expand preselected node. More... | |
LIB_TREE_NODE * | ShowSingleLibrary () |
Find and expand a library if there is only one. More... | |
wxDataViewColumn * | doAddColumn (const wxString &aHeader, bool aTranslate=true) |
Private Attributes | |
EDA_BASE_FRAME * | m_parent |
SYM_FILTER_TYPE | m_filter |
bool | m_show_units |
LIB_ID | m_preselect_lib_id |
int | m_preselect_unit |
int | m_freeze |
wxDataViewCtrl * | m_widget |
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 98 of file lib_tree_model_adapter.h.
This enum allows a selective filtering of symbols to list.
Enumerator | |
---|---|
SYM_FILTER_NONE | no filtering |
SYM_FILTER_POWER | list symbols flagged PWR |
Definition at line 120 of file lib_tree_model_adapter.h.
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 129 of file lib_tree_model_adapter.h.
LIB_TREE_MODEL_ADAPTER::~LIB_TREE_MODEL_ADAPTER | ( | ) |
Destructor.
Do NOT delete this class manually; it is reference-counted by wxObject.
Definition at line 97 of file lib_tree_model_adapter.cpp.
|
protected |
Create the adapter.
aParent | is the parent frame |
aPinnedKey | is the key to load the pinned libraries list from the project file |
Definition at line 67 of file lib_tree_model_adapter.cpp.
References APP_SETTINGS_BASE::LIB_TREE::column_widths, APP_SETTINGS_BASE::LIB_TREE::columns, Kiface(), KIFACE_BASE::KifaceSettings(), m_availableColumns, m_colWidths, APP_SETTINGS_BASE::m_LibTree, and m_shownColumns.
|
inline |
Definition at line 184 of file lib_tree_model_adapter.h.
References doAddColumn().
|
protected |
Definition at line 335 of file lib_tree_model_adapter.cpp.
References m_availableColumns, and m_colNameMap.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries().
|
inline |
Sort the tree and assign ranks after adding libraries.
Definition at line 202 of file lib_tree_model_adapter.h.
References LIB_TREE_NODE::AssignIntrinsicRanks(), and m_tree.
Referenced by SCH_BASE_FRAME::PickSymbolFromLibTree().
void LIB_TREE_MODEL_ADAPTER::AttachTo | ( | wxDataViewCtrl * | aDataViewCtrl | ) |
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 249 of file lib_tree_model_adapter.cpp.
References kDataViewIndent, m_widget, and recreateColumns().
|
private |
Definition at line 309 of file lib_tree_model_adapter.cpp.
References KIUI::GetTextSize(), m_colIdxMap, m_colNameMap, m_columns, m_colWidths, and m_widget.
Referenced by AddColumn(), and recreateColumns().
void LIB_TREE_MODEL_ADAPTER::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.
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 146 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE_LIB::AddItem(), LIB_TREE_NODE::AssignIntrinsicRanks(), and DoAddLibraryNode().
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_TREE_MODEL_ADAPTER::AddLibrary(), SCH_BASE_FRAME::PickSymbolFromLibTree(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), and FP_TREE_SYNCHRONIZING_ADAPTER::Sync().
|
protected |
Definition at line 135 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE_ROOT::AddLib(), LIB_TREE_NODE::m_Pinned, and m_tree.
Referenced by DoAddLibrary(), and SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync().
|
private |
Find any results worth highlighting and expand them, according to given criteria The highest-scoring node is written to aHighScore.
Definition at line 622 of file lib_tree_model_adapter.cpp.
References Find(), and LIB_TREE_NODE::m_Children.
Referenced by Find(), ShowPreselect(), ShowResults(), and ShowSingleLibrary().
wxDataViewItem LIB_TREE_MODEL_ADAPTER::FindItem | ( | const LIB_ID & | aLibId | ) |
Returns tree item corresponding to part.
aLibId | specifies the part and library name to be searched for. |
Definition at line 401 of file lib_tree_model_adapter.cpp.
References LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), LIB_TREE_NODE::m_Children, m_tree, and ToItem().
void LIB_TREE_MODEL_ADAPTER::FinishTreeInitialization | ( | ) |
A final-stage initialization to be called after the window hierarchy has been realized and the window sizes set.
Definition at line 444 of file lib_tree_model_adapter.cpp.
References m_colIdxMap, m_columns, m_colWidths, and m_widget.
|
inline |
Definition at line 294 of file lib_tree_model_adapter.h.
References m_freeze.
Referenced by resortTree(), and UpdateSearchString().
|
inlinevirtual |
Reimplemented in SYMBOL_TREE_MODEL_ADAPTER, and FP_TREE_MODEL_ADAPTER.
Definition at line 260 of file lib_tree_model_adapter.h.
LIB_ID LIB_TREE_MODEL_ADAPTER::GetAliasFor | ( | const wxDataViewItem & | aSelection | ) | const |
Return the alias for the given item.
aSelection | item from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection()) |
Definition at line 357 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_LibId, and ToNode().
|
overrideprotected |
Get any formatting for an item.
aItem | item to get formatting for |
aCol | column number of interest |
aAttr | receiver for attributes |
Definition at line 593 of file lib_tree_model_adapter.cpp.
References IsFrozen(), LIB_TREE_NODE::LIBID, LIB_TREE_NODE::m_IsRoot, LIB_TREE_NODE::m_Type, and ToNode().
|
inline |
|
override |
Populate a list of all the children of an item.
Definition at line 425 of file lib_tree_model_adapter.cpp.
References IntoArray(), LIB_TREE_NODE::LIB, m_show_units, m_tree, LIB_TREE_NODE::m_Type, and ToNode().
|
inlineoverrideprotected |
|
inlineoverrideprotected |
Return the type of data stored in the column as indicated by wxVariant::GetType()
Definition at line 355 of file lib_tree_model_adapter.h.
|
inlinevirtual |
Reimplemented in SYMBOL_TREE_SYNCHRONIZING_ADAPTER, and FP_TREE_SYNCHRONIZING_ADAPTER.
Definition at line 301 of file lib_tree_model_adapter.h.
|
inline |
Return the active filter.
Definition at line 153 of file lib_tree_model_adapter.h.
References m_filter.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_TREE_MODEL_ADAPTER::AddLibrary(), and SCH_BASE_FRAME::PickSymbolFromLibTree().
int LIB_TREE_MODEL_ADAPTER::GetItemCount | ( | ) | const |
Return the number of symbols loaded in the tree.
Definition at line 390 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Children, and m_tree.
Referenced by SYMBOL_VIEWER_FRAME::OnSelectSymbol(), and PCB_BASE_FRAME::SelectFootprintFromLibTree().
|
inlinevirtual |
Return the number of libraries loaded in the tree.
Reimplemented in SYMBOL_TREE_SYNCHRONIZING_ADAPTER, and FP_TREE_SYNCHRONIZING_ADAPTER.
Definition at line 270 of file lib_tree_model_adapter.h.
References LIB_TREE_NODE::m_Children, and m_tree.
Referenced by SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetLibrariesCount().
|
overrideprotected |
Get the parent of an item.
Definition at line 535 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().
|
inlinestatic |
Definition at line 105 of file lib_tree_model_adapter.h.
Referenced by CVPCB_MAINFRAME::BuildLibrariesListBox(), FOOTPRINT_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::buildSaveAsDialog(), WX_LISTBOX::FindString(), WX_LISTBOX::GetBaseString(), LIBRARY_LISTBOX::GetSelectedLibrary(), WX_LISTBOX::GetStringSelection(), EDA_LIST_DIALOG::GetTextSelection(), GetValue(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), and WX_LISTBOX::SetStringSelection().
|
inline |
Definition at line 191 of file lib_tree_model_adapter.h.
References m_shownColumns.
Referenced by SaveSettings().
LIB_TREE_NODE * LIB_TREE_MODEL_ADAPTER::GetTreeNodeFor | ( | const wxDataViewItem & | aSelection | ) | const |
Definition at line 384 of file lib_tree_model_adapter.cpp.
References ToNode().
LIB_TREE_NODE::TYPE LIB_TREE_MODEL_ADAPTER::GetTypeFor | ( | const wxDataViewItem & | aSelection | ) | const |
Return node type for the given item.
aSelection | item from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection()) |
Definition at line 377 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::INVALID, LIB_TREE_NODE::m_Type, and ToNode().
int LIB_TREE_MODEL_ADAPTER::GetUnitFor | ( | const wxDataViewItem & | aSelection | ) | const |
Return the unit for the given item.
aSelection | item from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection()) |
Definition at line 370 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Unit, and ToNode().
|
overrideprotected |
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 552 of file lib_tree_model_adapter.cpp.
References GetPinningSymbol(), IsFrozen(), m_colIdxMap, LIB_TREE_NODE::m_Desc, LIB_TREE_NODE::m_Fields, LIB_TREE_NODE::m_Name, LIB_TREE_NODE::m_Pinned, NAME_COL, ToNode(), and UnescapeString().
|
overrideprotected |
Check whether a container has columns too.
Definition at line 522 of file lib_tree_model_adapter.cpp.
References IsContainer().
|
staticprotected |
Convert SYM_TREE_NODE's children to wxDataViewItemArray.
Definition at line 49 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Children, and ToItem().
Referenced by GetChildren().
|
overrideprotected |
Check whether an item can have children.
Definition at line 528 of file lib_tree_model_adapter.cpp.
References LIB_TREE_NODE::m_Children, and ToNode().
Referenced by HasContainerColumns().
|
inline |
Definition at line 296 of file lib_tree_model_adapter.h.
References m_freeze.
Referenced by GetAttr(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), GetValue(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue(), and FP_TREE_SYNCHRONIZING_ADAPTER::GetValue().
|
protectedpure virtual |
Implemented in SYMBOL_TREE_MODEL_ADAPTER, SYMBOL_TREE_SYNCHRONIZING_ADAPTER, and FP_TREE_MODEL_ADAPTER.
Referenced by PinLibrary(), and UnpinLibrary().
void LIB_TREE_MODEL_ADAPTER::OnSize | ( | wxSizeEvent & | aEvent | ) |
Definition at line 471 of file lib_tree_model_adapter.cpp.
void LIB_TREE_MODEL_ADAPTER::PinLibrary | ( | LIB_TREE_NODE * | aTreeNode | ) |
Definition at line 289 of file lib_tree_model_adapter.cpp.
References LIB_ID::GetLibNickname(), isSymbolModel(), LIB_TREE_NODE::m_LibId, m_parent, LIB_TREE_NODE::m_Pinned, m_widget, PROJECT::PinLibrary(), KIWAY_HOLDER::Prj(), resortTree(), and ToItem().
|
protected |
Definition at line 258 of file lib_tree_model_adapter.cpp.
References doAddColumn(), m_colIdxMap, m_colNameMap, m_columns, m_shownColumns, and m_widget.
Referenced by AttachTo(), and SetShownColumns().
void LIB_TREE_MODEL_ADAPTER::RefreshTree | ( | ) |
Definition at line 477 of file lib_tree_model_adapter.cpp.
References m_colNameMap, m_columns, and m_colWidths.
|
protected |
Definition at line 277 of file lib_tree_model_adapter.cpp.
References Freeze(), m_tree, LIB_TREE_NODE::SortNodes(), and Thaw().
Referenced by PinLibrary(), and UnpinLibrary().
void LIB_TREE_MODEL_ADAPTER::SaveSettings | ( | ) |
Save the column widths to the config file.
This requires the tree view to still be valid.
Definition at line 101 of file lib_tree_model_adapter.cpp.
References APP_SETTINGS_BASE::LIB_TREE::column_widths, APP_SETTINGS_BASE::LIB_TREE::columns, GetShownColumns(), Kiface(), KIFACE_BASE::KifaceSettings(), m_colNameMap, APP_SETTINGS_BASE::m_LibTree, and m_widget.
Referenced by SYMBOL_VIEWER_FRAME::OnSelectSymbol(), SCH_BASE_FRAME::PickSymbolFromLibTree(), and PCB_BASE_FRAME::SelectFootprintFromLibTree().
void LIB_TREE_MODEL_ADAPTER::SetFilter | ( | SYM_FILTER_TYPE | aFilter | ) |
Set the symbol filter type.
Must be set before adding libraries
aFilter | if SYM_FILTER_POWER, only power parts are loaded |
Definition at line 116 of file lib_tree_model_adapter.cpp.
References m_filter.
Referenced by SCH_BASE_FRAME::PickSymbolFromLibTree().
void LIB_TREE_MODEL_ADAPTER::SetPreselectNode | ( | const LIB_ID & | aLibId, |
int | aUnit | ||
) |
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 128 of file lib_tree_model_adapter.cpp.
References m_preselect_lib_id, and m_preselect_unit.
Referenced by SYMBOL_VIEWER_FRAME::OnSelectSymbol(), SCH_BASE_FRAME::PickSymbolFromLibTree(), and PCB_BASE_FRAME::SelectFootprintFromLibTree().
void LIB_TREE_MODEL_ADAPTER::SetShownColumns | ( | const std::vector< wxString > & | aColumnNames | ) |
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 346 of file lib_tree_model_adapter.cpp.
References m_shownColumns, m_widget, and recreateColumns().
|
inlineoverrideprotected |
Set the value of an item.
Does nothing - this model doesn't support editing.
Definition at line 372 of file lib_tree_model_adapter.h.
|
private |
Find and expand preselected node.
Return the best match (if any).
Definition at line 661 of file lib_tree_model_adapter.cpp.
References Find(), LIB_ID::IsValid(), LIB_TREE_NODE::LIBID, LIB_TREE_NODE::m_Children, LIB_TREE_NODE::m_LibId, LIB_TREE_NODE::m_Parent, m_preselect_lib_id, m_preselect_unit, m_tree, LIB_TREE_NODE::m_Type, LIB_TREE_NODE::m_Unit, m_widget, and LIB_TREE_NODE::UNIT.
Referenced by UpdateSearchString().
|
private |
Find and expand successful search results.
Return the best match (if any).
Definition at line 639 of file lib_tree_model_adapter.cpp.
References Find(), LIB_TREE_NODE::m_Score, m_tree, LIB_TREE_NODE::m_Type, and m_widget.
Referenced by UpdateSearchString().
|
private |
Find and expand a library if there is only one.
Return the best match (if any).
Definition at line 692 of file lib_tree_model_adapter.cpp.
References Find(), LIB_TREE_NODE::m_Children, LIB_TREE_NODE::m_Parent, m_tree, LIB_TREE_NODE::m_Type, and m_widget.
Referenced by UpdateSearchString().
void LIB_TREE_MODEL_ADAPTER::ShowUnits | ( | bool | aShow | ) |
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 122 of file lib_tree_model_adapter.cpp.
References m_show_units.
|
inline |
Definition at line 295 of file lib_tree_model_adapter.h.
References m_freeze.
Referenced by resortTree(), and UpdateSearchString().
|
staticprotected |
Convert #SYM_TREE_NODE -> wxDataViewItem.
Definition at line 37 of file lib_tree_model_adapter.cpp.
Referenced by FindItem(), GetParent(), IntoArray(), and PinLibrary().
|
staticprotected |
Convert wxDataViewItem -> #SYM_TREE_NODE.
Definition at line 43 of file lib_tree_model_adapter.cpp.
Referenced by GetAliasFor(), GetAttr(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr(), GetChildren(), GetParent(), GetTreeNodeFor(), GetTypeFor(), GetUnitFor(), GetValue(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::IsContainer(), IsContainer(), and FP_TREE_SYNCHRONIZING_ADAPTER::IsContainer().
void LIB_TREE_MODEL_ADAPTER::UnpinLibrary | ( | LIB_TREE_NODE * | aTreeNode | ) |
Definition at line 299 of file lib_tree_model_adapter.cpp.
References LIB_ID::GetLibNickname(), isSymbolModel(), LIB_TREE_NODE::m_LibId, m_parent, LIB_TREE_NODE::m_Pinned, KIWAY_HOLDER::Prj(), resortTree(), and PROJECT::UnpinLibrary().
void LIB_TREE_MODEL_ADAPTER::UpdateSearchString | ( | const wxString & | aSearch, |
bool | aState | ||
) |
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 159 of file lib_tree_model_adapter.cpp.
References CTX_LIBITEM, Freeze(), GetParent(), LIB_TREE_NODE::m_Children, m_tree, m_widget, LIB_TREE_NODE::ResetScore(), ShowPreselect(), ShowResults(), ShowSingleLibrary(), LIB_TREE_NODE::SortNodes(), Thaw(), and LIB_TREE_NODE_ROOT::UpdateScore().
|
protected |
Definition at line 424 of file lib_tree_model_adapter.h.
Referenced by addColumnIfNecessary(), GetAvailableColumns(), LIB_TREE_MODEL_ADAPTER(), and SYMBOL_TREE_MODEL_ADAPTER::SYMBOL_TREE_MODEL_ADAPTER().
|
protected |
Definition at line 423 of file lib_tree_model_adapter.h.
Referenced by doAddColumn(), FinishTreeInitialization(), GetValue(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue(), and recreateColumns().
|
private |
Definition at line 438 of file lib_tree_model_adapter.h.
Referenced by addColumnIfNecessary(), doAddColumn(), recreateColumns(), RefreshTree(), and SaveSettings().
|
private |
Definition at line 437 of file lib_tree_model_adapter.h.
Referenced by doAddColumn(), FinishTreeInitialization(), GetColumnCount(), recreateColumns(), and RefreshTree().
|
private |
Definition at line 439 of file lib_tree_model_adapter.h.
Referenced by doAddColumn(), FinishTreeInitialization(), LIB_TREE_MODEL_ADAPTER(), and RefreshTree().
|
private |
Definition at line 429 of file lib_tree_model_adapter.h.
Referenced by GetFilter(), and SetFilter().
|
private |
Definition at line 433 of file lib_tree_model_adapter.h.
Referenced by Freeze(), GetParent(), IsFrozen(), and Thaw().
|
private |
Definition at line 427 of file lib_tree_model_adapter.h.
Referenced by PinLibrary(), and UnpinLibrary().
|
private |
Definition at line 431 of file lib_tree_model_adapter.h.
Referenced by SetPreselectNode(), and ShowPreselect().
|
private |
Definition at line 432 of file lib_tree_model_adapter.h.
Referenced by SetPreselectNode(), and ShowPreselect().
|
private |
Definition at line 430 of file lib_tree_model_adapter.h.
Referenced by GetChildren(), and ShowUnits().
|
private |
Definition at line 440 of file lib_tree_model_adapter.h.
Referenced by GetShownColumns(), LIB_TREE_MODEL_ADAPTER(), recreateColumns(), and SetShownColumns().
|
protected |
Definition at line 422 of file lib_tree_model_adapter.h.
Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), AssignIntrinsicRanks(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::deleteLibrary(), FP_TREE_SYNCHRONIZING_ADAPTER::deleteLibrary(), DoAddLibraryNode(), FindItem(), GetChildren(), GetItemCount(), GetLibrariesCount(), resortTree(), ShowPreselect(), ShowResults(), ShowSingleLibrary(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), and UpdateSearchString().
|
private |
Definition at line 435 of file lib_tree_model_adapter.h.
Referenced by AttachTo(), doAddColumn(), FinishTreeInitialization(), PinLibrary(), recreateColumns(), SaveSettings(), SetShownColumns(), ShowPreselect(), ShowResults(), ShowSingleLibrary(), and UpdateSearchString().