KiCad PCB EDA Suite
Loading...
Searching...
No Matches
FP_LIB_TABLE_ROW Class Reference

Hold a record identifying a library accessed by the appropriate footprint library #PLUGIN object in the FP_LIB_TABLE. More...

#include <fp_lib_table.h>

Inheritance diagram for FP_LIB_TABLE_ROW:
LIB_TABLE_ROW

Public Member Functions

 FP_LIB_TABLE_ROW (const wxString &aNick, const wxString &aURI, const wxString &aType, const wxString &aOptions, const wxString &aDescr=wxEmptyString)
 
 FP_LIB_TABLE_ROW ()
 
bool operator== (const FP_LIB_TABLE_ROW &aRow) const
 
bool operator!= (const FP_LIB_TABLE_ROW &aRow) const
 
const wxString GetType () const override
 return the type of footprint library table represented by this row.
 
void SetType (const wxString &aType) override
 Change the type represented by this row.
 
bool LibraryExists () const override
 
PCB_IO_MGR::PCB_FILE_T GetFileType ()
 
bool operator== (const LIB_TABLE_ROW &r) const
 
bool operator!= (const LIB_TABLE_ROW &r) const
 
const wxString & GetNickName () const
 
void SetNickName (const wxString &aNickName)
 Change the logical name of this library, useful for an editor.
 
bool GetIsLoaded () const
 
void SetLoaded (bool aLoaded)
 Mark the row as being a loaded library.
 
bool GetIsEnabled () const
 
void SetEnabled (bool aEnabled=true)
 Change the enabled status of this library.
 
bool GetIsVisible () const
 
void SetVisible (bool aVisible=true)
 
virtual bool Refresh ()
 
virtual bool SupportsSettingsDialog () const
 
virtual void ShowSettingsDialog (wxWindow *aParent) const
 
const wxString GetFullURI (bool aSubstituted=false) const
 Return the full location specifying URI for the LIB, either in original UI form or in environment variable expanded form.
 
void SetFullURI (const wxString &aFullURI)
 Change the full URI for the library.
 
const wxString & GetOptions () const
 Return the options string, which may hold a password or anything else needed to instantiate the underlying library plugin.
 
void SetOptions (const wxString &aOptions)
 Change the library options strings.
 
const wxString & GetDescr () const
 Return the description of the library referenced by this row.
 
void SetDescr (const wxString &aDescr)
 Change the description of the library referenced by this row.
 
LIB_TABLEGetParent () const
 
void SetParent (LIB_TABLE *aParent)
 
std::mutex & GetMutex ()
 
const std::map< std::string, UTF8 > & GetProperties () const
 Return the constant #PROPERTIES for this library (LIB_TABLE_ROW).
 
void Format (OUTPUTFORMATTER *out, int nestLevel) const
 Serialize this object as utf8 text to an OUTPUTFORMATTER, and tries to make it look good using multiple lines and indentation.
 
LIB_TABLE_ROWclone () const
 

Protected Member Functions

 FP_LIB_TABLE_ROW (const FP_LIB_TABLE_ROW &aRow)
 

Private Member Functions

virtual LIB_TABLE_ROWdo_clone () const override
 
void setPlugin (PCB_IO *aPlugin)
 
void setProperties (const std::map< std::string, UTF8 > &aProperties)
 

Private Attributes

IO_RELEASER< PCB_IOplugin
 
PCB_IO_MGR::PCB_FILE_T type
 
wxString nickName
 
wxString uri_user
 what user entered from UI or loaded from disk
 
wxString options
 
wxString description
 
bool enabled = true
 Whether the LIB_TABLE_ROW is enabled.
 
bool visible = true
 Whether the LIB_TABLE_ROW is visible in choosers.
 
bool m_loaded = false
 Whether the LIB_TABLE_ROW is loaded.
 
LIB_TABLEm_parent
 Pointer to the table this row lives in (maybe null)
 
std::map< std::string, UTF8properties
 
std::mutex m_loadMutex
 

Friends

class FP_LIB_TABLE
 

Detailed Description

Hold a record identifying a library accessed by the appropriate footprint library #PLUGIN object in the FP_LIB_TABLE.

Definition at line 41 of file fp_lib_table.h.

Constructor & Destructor Documentation

◆ FP_LIB_TABLE_ROW() [1/3]

FP_LIB_TABLE_ROW::FP_LIB_TABLE_ROW ( const wxString & aNick,
const wxString & aURI,
const wxString & aType,
const wxString & aOptions,
const wxString & aDescr = wxEmptyString )
inline

Definition at line 44 of file fp_lib_table.h.

References LIB_TABLE_ROW::LIB_TABLE_ROW(), and SetType().

Referenced by FP_LIB_TABLE_ROW(), operator!=(), and operator==().

◆ FP_LIB_TABLE_ROW() [2/3]

FP_LIB_TABLE_ROW::FP_LIB_TABLE_ROW ( )
inline

Definition at line 51 of file fp_lib_table.h.

References type.

Referenced by do_clone().

◆ FP_LIB_TABLE_ROW() [3/3]

FP_LIB_TABLE_ROW::FP_LIB_TABLE_ROW ( const FP_LIB_TABLE_ROW & aRow)
inlineprotected

Definition at line 75 of file fp_lib_table.h.

References FP_LIB_TABLE_ROW(), LIB_TABLE_ROW::LIB_TABLE_ROW(), and type.

Member Function Documentation

◆ clone()

LIB_TABLE_ROW * LIB_TABLE_ROW::clone ( ) const
inlineinherited

Definition at line 265 of file lib_table_base.h.

References do_clone(), and LIB_TABLE_ROW().

Referenced by new_clone().

◆ do_clone()

virtual LIB_TABLE_ROW * FP_LIB_TABLE_ROW::do_clone ( ) const
inlineoverrideprivatevirtual

Implements LIB_TABLE_ROW.

Definition at line 82 of file fp_lib_table.h.

References FP_LIB_TABLE_ROW(), and LIB_TABLE_ROW::LIB_TABLE_ROW().

◆ Format()

void LIB_TABLE_ROW::Format ( OUTPUTFORMATTER * out,
int nestLevel ) const
inherited

Serialize this object as utf8 text to an OUTPUTFORMATTER, and tries to make it look good using multiple lines and indentation.

Parameters
outis an OUTPUTFORMATTER
nestLevelis the indentation level to base all lines of the output. Actual indentation will be 2 spaces for each nestLevel.

Definition at line 125 of file lib_table_base.cpp.

References GetDescr(), GetFullURI(), GetIsEnabled(), GetIsVisible(), GetNickName(), GetOptions(), GetType(), OUTPUTFORMATTER::Print(), and OUTPUTFORMATTER::Quotew().

◆ GetDescr()

const wxString & LIB_TABLE_ROW::GetDescr ( ) const
inlineinherited

Return the description of the library referenced by this row.

Definition at line 236 of file lib_table_base.h.

References description.

Referenced by Format(), LIB_TABLE::GetDescription(), FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), and DIALOG_FOOTPRINT_ASSOCIATIONS::TransferDataToWindow().

◆ GetFileType()

PCB_IO_MGR::PCB_FILE_T FP_LIB_TABLE_ROW::GetFileType ( )
inline

Definition at line 72 of file fp_lib_table.h.

References type.

◆ GetFullURI()

◆ GetIsEnabled()

bool LIB_TABLE_ROW::GetIsEnabled ( ) const
inlineinherited
Returns
the enabled status of this library row

Definition at line 179 of file lib_table_base.h.

References enabled.

Referenced by LIB_TABLE::findRow(), Format(), and LIB_TABLE::GetLogicalLibs().

◆ GetIsLoaded()

bool LIB_TABLE_ROW::GetIsLoaded ( ) const
inlineinherited
Returns
true if the library was loaded without error

Definition at line 169 of file lib_table_base.h.

References m_loaded.

◆ GetIsVisible()

bool LIB_TABLE_ROW::GetIsVisible ( ) const
inlineinherited

Definition at line 186 of file lib_table_base.h.

References visible.

Referenced by Format().

◆ GetMutex()

std::mutex & LIB_TABLE_ROW::GetMutex ( )
inlineinherited

Definition at line 247 of file lib_table_base.h.

References m_loadMutex.

◆ GetNickName()

const wxString & LIB_TABLE_ROW::GetNickName ( ) const
inlineinherited

◆ GetOptions()

const wxString & LIB_TABLE_ROW::GetOptions ( ) const
inlineinherited

Return the options string, which may hold a password or anything else needed to instantiate the underlying library plugin.

Definition at line 226 of file lib_table_base.h.

References options.

Referenced by Format().

◆ GetParent()

LIB_TABLE * LIB_TABLE_ROW::GetParent ( ) const
inlineinherited

Definition at line 243 of file lib_table_base.h.

References m_parent.

◆ GetProperties()

const std::map< std::string, UTF8 > & LIB_TABLE_ROW::GetProperties ( ) const
inlineinherited

◆ GetType()

const wxString FP_LIB_TABLE_ROW::GetType ( ) const
inlineoverridevirtual

return the type of footprint library table represented by this row.

Implements LIB_TABLE_ROW.

Definition at line 63 of file fp_lib_table.h.

References PCB_IO_MGR::ShowType(), and type.

◆ LibraryExists()

bool FP_LIB_TABLE_ROW::LibraryExists ( ) const
overridevirtual

Implements LIB_TABLE_ROW.

Definition at line 66 of file fp_lib_table.cpp.

References LIB_TABLE_ROW::GetFullURI(), and plugin.

◆ operator!=() [1/2]

bool FP_LIB_TABLE_ROW::operator!= ( const FP_LIB_TABLE_ROW & aRow) const
inline

Definition at line 58 of file fp_lib_table.h.

References FP_LIB_TABLE_ROW().

◆ operator!=() [2/2]

bool LIB_TABLE_ROW::operator!= ( const LIB_TABLE_ROW & r) const
inlineinherited

Definition at line 154 of file lib_table_base.h.

References LIB_TABLE_ROW().

◆ operator==() [1/2]

bool FP_LIB_TABLE_ROW::operator== ( const FP_LIB_TABLE_ROW & aRow) const

Definition at line 49 of file fp_lib_table.cpp.

References FP_LIB_TABLE_ROW(), LIB_TABLE_ROW::operator==(), and type.

◆ operator==() [2/2]

bool LIB_TABLE_ROW::operator== ( const LIB_TABLE_ROW & r) const
inherited

Definition at line 150 of file lib_table_base.cpp.

References description, enabled, LIB_TABLE_ROW(), nickName, options, uri_user, and visible.

Referenced by FP_LIB_TABLE_ROW::operator==().

◆ Refresh()

virtual bool LIB_TABLE_ROW::Refresh ( )
inlinevirtualinherited

Definition at line 192 of file lib_table_base.h.

Referenced by LIB_TABLE_GRID_TRICKS::doPopupSelection().

◆ SetDescr()

void LIB_TABLE_ROW::SetDescr ( const wxString & aDescr)
inlineinherited

Change the description of the library referenced by this row.

Definition at line 241 of file lib_table_base.h.

References description.

◆ SetEnabled()

void LIB_TABLE_ROW::SetEnabled ( bool aEnabled = true)
inlineinherited

Change the enabled status of this library.

Definition at line 184 of file lib_table_base.h.

References enabled.

◆ SetFullURI()

void LIB_TABLE_ROW::SetFullURI ( const wxString & aFullURI)
inherited

Change the full URI for the library.

Definition at line 108 of file lib_table_base.cpp.

References uri_user.

Referenced by LIB_TABLE_ROW(), and PCB::IFACE::SaveFileAs().

◆ SetLoaded()

void LIB_TABLE_ROW::SetLoaded ( bool aLoaded)
inlineinherited

Mark the row as being a loaded library.

Definition at line 174 of file lib_table_base.h.

References m_loaded.

◆ SetNickName()

void LIB_TABLE_ROW::SetNickName ( const wxString & aNickName)
inlineinherited

Change the logical name of this library, useful for an editor.

Definition at line 164 of file lib_table_base.h.

References nickName.

◆ SetOptions()

void LIB_TABLE_ROW::SetOptions ( const wxString & aOptions)
inherited

Change the library options strings.

Definition at line 161 of file lib_table_base.cpp.

References options, LIB_TABLE::ParseOptions(), setProperties(), and TO_UTF8.

Referenced by LIB_TABLE_ROW().

◆ SetParent()

void LIB_TABLE_ROW::SetParent ( LIB_TABLE * aParent)
inlineinherited

Definition at line 245 of file lib_table_base.h.

References m_parent.

Referenced by LIB_TABLE::doInsertRow().

◆ setPlugin()

void FP_LIB_TABLE_ROW::setPlugin ( PCB_IO * aPlugin)
inlineprivate

Definition at line 87 of file fp_lib_table.h.

References plugin.

Referenced by FP_LIB_TABLE::FindRow().

◆ setProperties()

void LIB_TABLE_ROW::setProperties ( const std::map< std::string, UTF8 > & aProperties)
privateinherited

Definition at line 102 of file lib_table_base.cpp.

References properties.

Referenced by do_clone(), and SetOptions().

◆ SetType()

void FP_LIB_TABLE_ROW::SetType ( const wxString & aType)
overridevirtual

Change the type represented by this row.

Implements LIB_TABLE_ROW.

Definition at line 55 of file fp_lib_table.cpp.

References PCB_IO_MGR::EnumFromStr(), PCB_IO_MGR::KICAD_SEXP, plugin, and type.

Referenced by FP_LIB_TABLE_ROW().

◆ SetVisible()

void LIB_TABLE_ROW::SetVisible ( bool aVisible = true)
inlineinherited

Definition at line 188 of file lib_table_base.h.

References visible.

◆ ShowSettingsDialog()

virtual void LIB_TABLE_ROW::ShowSettingsDialog ( wxWindow * aParent) const
inlinevirtualinherited

Definition at line 207 of file lib_table_base.h.

Referenced by LIB_TABLE_GRID_TRICKS::doPopupSelection().

◆ SupportsSettingsDialog()

virtual bool LIB_TABLE_ROW::SupportsSettingsDialog ( ) const
inlinevirtualinherited

Definition at line 205 of file lib_table_base.h.

Friends And Related Symbol Documentation

◆ FP_LIB_TABLE

friend class FP_LIB_TABLE
friend

Definition at line 92 of file fp_lib_table.h.

References FP_LIB_TABLE.

Referenced by FP_LIB_TABLE.

Member Data Documentation

◆ description

wxString LIB_TABLE_ROW::description
privateinherited

Definition at line 295 of file lib_table_base.h.

Referenced by GetDescr(), LIB_TABLE_ROW(), LIB_TABLE_ROW(), operator==(), and SetDescr().

◆ enabled

bool LIB_TABLE_ROW::enabled = true
privateinherited

Whether the LIB_TABLE_ROW is enabled.

Definition at line 297 of file lib_table_base.h.

Referenced by GetIsEnabled(), LIB_TABLE_ROW(), LIB_TABLE_ROW(), LIB_TABLE_ROW(), operator==(), and SetEnabled().

◆ m_loaded

bool LIB_TABLE_ROW::m_loaded = false
privateinherited

Whether the LIB_TABLE_ROW is loaded.

Definition at line 299 of file lib_table_base.h.

Referenced by GetIsLoaded(), LIB_TABLE_ROW(), LIB_TABLE_ROW(), LIB_TABLE_ROW(), and SetLoaded().

◆ m_loadMutex

std::mutex LIB_TABLE_ROW::m_loadMutex
privateinherited

Definition at line 304 of file lib_table_base.h.

Referenced by GetMutex().

◆ m_parent

LIB_TABLE* LIB_TABLE_ROW::m_parent
privateinherited

Pointer to the table this row lives in (maybe null)

Definition at line 300 of file lib_table_base.h.

Referenced by GetParent(), LIB_TABLE_ROW(), LIB_TABLE_ROW(), LIB_TABLE_ROW(), and SetParent().

◆ nickName

wxString LIB_TABLE_ROW::nickName
privateinherited

Definition at line 292 of file lib_table_base.h.

Referenced by GetNickName(), LIB_TABLE_ROW(), LIB_TABLE_ROW(), operator==(), and SetNickName().

◆ options

wxString LIB_TABLE_ROW::options
privateinherited

Definition at line 294 of file lib_table_base.h.

Referenced by GetOptions(), LIB_TABLE_ROW(), operator==(), and SetOptions().

◆ plugin

◆ properties

std::map<std::string, UTF8> LIB_TABLE_ROW::properties
privateinherited

Definition at line 302 of file lib_table_base.h.

Referenced by GetProperties(), LIB_TABLE_ROW(), and setProperties().

◆ type

PCB_IO_MGR::PCB_FILE_T FP_LIB_TABLE_ROW::type
private

◆ uri_user

wxString LIB_TABLE_ROW::uri_user
privateinherited

what user entered from UI or loaded from disk

Definition at line 293 of file lib_table_base.h.

Referenced by GetFullURI(), LIB_TABLE_ROW(), operator==(), and SetFullURI().

◆ visible

bool LIB_TABLE_ROW::visible = true
privateinherited

Whether the LIB_TABLE_ROW is visible in choosers.

Definition at line 298 of file lib_table_base.h.

Referenced by GetIsVisible(), LIB_TABLE_ROW(), LIB_TABLE_ROW(), LIB_TABLE_ROW(), operator==(), and SetVisible().


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