22 #include <wx/tokenzr.h> 23 #include <wx/window.h> 35 #define PROGRESS_INTERVAL_MILLIS 66 38 wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>
42 return wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>( adapter );
65 aNicknames.size(), aParent );
70 for(
const auto& nickname : aNicknames )
72 if( prg && wxGetUTCTimeMillis() > nextUpdate )
102 std::vector<LIB_PART*> symbols;
103 std::vector<LIB_TREE_ITEM*> comp_list;
117 if( symbols.size() > 0 )
119 comp_list.assign( symbols.begin(), symbols.end() );
list components flagged PWR
void DoAddLibrary(wxString const &aNodeName, wxString const &aDesc, std::vector< LIB_TREE_ITEM * > const &aItemList, bool presorted)
Add the given list of components by alias.
void AddLibrary(wxString const &aLibNickname)
wxString GenerateInfo(LIB_ID const &aLibId, int aUnit) override
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.
A logical library item identifier and consists of various portions much like a URI.
Abstract pattern-matching tool and implementations.
SYMBOL_TREE_MODEL_ADAPTER(EDA_BASE_FRAME *aParent, LIB_TABLE *aLibs)
Constructor; takes a set of libraries to be included in the search.
SYMBOL_LIB_TABLE * m_libs
wxString GenerateAliasInfo(SYMBOL_LIB_TABLE *aSymLibTable, LIB_ID const &aLibId, int aUnit)
Return an HTML page describing a LIB_ID in a SYMBOL_LIB_TABLE.
virtual const wxString What() const
A composite of Problem() and Where()
const wxString GetDescription(const wxString &aNickname)
void LoadSymbolLib(std::vector< LIB_PART * > &aAliasList, const wxString &aNickname, bool aPowerSymbolsOnly=false)
virtual bool Update(int aValue, const wxString &aNewMsg=wxEmptyString, bool *aSkip=NULL) override
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
void AssignIntrinsicRanks(bool presorted=false)
Store intrinsic ranks on all children of this node.
static bool m_show_progress
Flag to only show the symbol library table load progress dialog the first time.
The base frame for deriving all KiCad main window classes.
wxProgressDialog with the option to also update the application progress on the taskbar
void AddLibraries(const std::vector< wxString > &aNicknames, wxWindow *aParent)
Add all the libraries in a SYMBOL_LIB_TABLE to the model.
LIB_TREE_NODE_ROOT m_tree
#define PROGRESS_INTERVAL_MILLIS
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
~SYMBOL_TREE_MODEL_ADAPTER()
Destructor.
CMP_FILTER_TYPE GetFilter() const
Return the active filter.
Manage LIB_TABLE_ROW records (rows), and can be searched based on library nickname.