本文整理汇总了C++中PART_LIB::HasPowerParts方法的典型用法代码示例。如果您正苦于以下问题:C++ PART_LIB::HasPowerParts方法的具体用法?C++ PART_LIB::HasPowerParts怎么用?C++ PART_LIB::HasPowerParts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PART_LIB
的用法示例。
在下文中一共展示了PART_LIB::HasPowerParts方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReCreateListLib
void LIB_VIEW_FRAME::ReCreateListLib()
{
if( !m_libList )
return;
m_libList->Clear();
wxArrayString libs = Prj().SchLibs()->GetLibraryNames();
// Remove not allowed libs from main list, if the allowed lib list is not empty
if( m_allowedLibs.GetCount() )
{
for( unsigned ii = 0; ii < libs.GetCount(); )
{
if( m_allowedLibs.Index( libs[ii] ) == wxNOT_FOUND )
libs.RemoveAt( ii );
else
ii++;
}
}
// Remove libs which have no power components, if this filter is activated
if( m_listPowerCmpOnly )
{
for( unsigned ii = 0; ii < libs.GetCount(); )
{
PART_LIB* lib = Prj().SchLibs()->FindLibrary( libs[ii] );
if( lib && !lib->HasPowerParts() )
libs.RemoveAt( ii );
else
ii++;
}
}
m_libList->Append( libs );
// Search for a previous selection:
int index = m_libList->FindString( m_libraryName );
if( index != wxNOT_FOUND )
{
m_libList->SetSelection( index, true );
}
else
{
// If not found, clear current library selection because it can be
// deleted after a config change.
m_libraryName = wxEmptyString;
m_entryName = wxEmptyString;
m_unit = 1;
m_convert = 1;
}
ReCreateListCmp();
ReCreateHToolbar();
DisplayLibInfos();
m_canvas->Refresh();
}