KiCad PCB EDA Suite
Loading...
Searching...
No Matches
LIB_TREE_ITEM Class Referenceabstract

A mix-in to provide polymorphism between items stored in libraries (symbols, aliases and footprints). More...

#include <lib_tree_item.h>

Inheritance diagram for LIB_TREE_ITEM:
FOOTPRINT_INFO LIB_SYMBOL BASIC_FOOTPRINT_INFO FOOTPRINT_INFO_IMPL

Public Member Functions

virtual ~LIB_TREE_ITEM ()
 
virtual LIB_ID GetLibId () const =0
 
virtual wxString GetName () const =0
 
virtual wxString GetLibNickname () const =0
 
virtual wxString GetDescription ()=0
 
virtual void GetChooserFields (std::map< wxString, wxString > &aColumnMap)
 Retrieves a key/value map of the fields on this item that should be exposed to the library browser/chooser for displaying in columns, searching, etc. More...
 
virtual std::vector< SEARCH_TERMGetSearchTerms ()
 
virtual bool IsRoot () const
 For items having aliases, IsRoot() indicates the principal item. More...
 
virtual wxString GetFootprint ()
 For items with footprint fields. More...
 
virtual int GetUnitCount () const
 For items with units, return the number of units. More...
 
virtual wxString GetUnitReference (int aUnit)
 For items with units, return an identifier for unit x. More...
 
virtual wxString GetUnitDisplayName (int aUnit)
 For items with units, return a display name for unit x. More...
 
virtual bool HasUnitDisplayName (int aUnit)
 For items with units, return true if a display name is set for x. More...
 

Detailed Description

A mix-in to provide polymorphism between items stored in libraries (symbols, aliases and footprints).

It is used primarily to drive the component tree for library browsing and editing.

Definition at line 40 of file lib_tree_item.h.

Constructor & Destructor Documentation

◆ ~LIB_TREE_ITEM()

virtual LIB_TREE_ITEM::~LIB_TREE_ITEM ( )
inlinevirtual

Definition at line 43 of file lib_tree_item.h.

Member Function Documentation

◆ GetChooserFields()

virtual void LIB_TREE_ITEM::GetChooserFields ( std::map< wxString, wxString > &  aColumnMap)
inlinevirtual

Retrieves a key/value map of the fields on this item that should be exposed to the library browser/chooser for displaying in columns, searching, etc.

Reimplemented in LIB_SYMBOL.

Definition at line 57 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_LIB_ID::LIB_TREE_NODE_LIB_ID(), and LIB_TREE_NODE_LIB_ID::Update().

◆ GetDescription()

virtual wxString LIB_TREE_ITEM::GetDescription ( )
pure virtual

◆ GetFootprint()

virtual wxString LIB_TREE_ITEM::GetFootprint ( )
inlinevirtual

For items with footprint fields.

Reimplemented in LIB_SYMBOL.

Definition at line 69 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_LIB_ID::LIB_TREE_NODE_LIB_ID().

◆ GetLibId()

virtual LIB_ID LIB_TREE_ITEM::GetLibId ( ) const
pure virtual

Implemented in LIB_SYMBOL, and FOOTPRINT_INFO.

Referenced by LIB_TREE_NODE_LIB_ID::Update().

◆ GetLibNickname()

virtual wxString LIB_TREE_ITEM::GetLibNickname ( ) const
pure virtual

◆ GetName()

virtual wxString LIB_TREE_ITEM::GetName ( ) const
pure virtual

◆ GetSearchTerms()

virtual std::vector< SEARCH_TERM > LIB_TREE_ITEM::GetSearchTerms ( )
inlinevirtual

Reimplemented in LIB_SYMBOL, and FOOTPRINT_INFO.

Definition at line 59 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_LIB_ID::LIB_TREE_NODE_LIB_ID(), and LIB_TREE_NODE_LIB_ID::Update().

◆ GetUnitCount()

virtual int LIB_TREE_ITEM::GetUnitCount ( ) const
inlinevirtual

For items with units, return the number of units.

Reimplemented in LIB_SYMBOL.

Definition at line 74 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_LIB_ID::LIB_TREE_NODE_LIB_ID(), and LIB_TREE_NODE_LIB_ID::Update().

◆ GetUnitDisplayName()

virtual wxString LIB_TREE_ITEM::GetUnitDisplayName ( int  aUnit)
inlinevirtual

For items with units, return a display name for unit x.

Reimplemented in LIB_SYMBOL.

Definition at line 84 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_UNIT::LIB_TREE_NODE_UNIT().

◆ GetUnitReference()

virtual wxString LIB_TREE_ITEM::GetUnitReference ( int  aUnit)
inlinevirtual

For items with units, return an identifier for unit x.

Reimplemented in LIB_SYMBOL.

Definition at line 79 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_UNIT::LIB_TREE_NODE_UNIT().

◆ HasUnitDisplayName()

virtual bool LIB_TREE_ITEM::HasUnitDisplayName ( int  aUnit)
inlinevirtual

For items with units, return true if a display name is set for x.

Reimplemented in LIB_SYMBOL.

Definition at line 89 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_UNIT::LIB_TREE_NODE_UNIT().

◆ IsRoot()

virtual bool LIB_TREE_ITEM::IsRoot ( ) const
inlinevirtual

For items having aliases, IsRoot() indicates the principal item.

Reimplemented in LIB_SYMBOL.

Definition at line 64 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_LIB_ID::LIB_TREE_NODE_LIB_ID(), and LIB_TREE_NODE_LIB_ID::Update().


The documentation for this class was generated from the following file: