本文整理汇总了C++中FOOTPRINT_LIST::GetErrorCount方法的典型用法代码示例。如果您正苦于以下问题:C++ FOOTPRINT_LIST::GetErrorCount方法的具体用法?C++ FOOTPRINT_LIST::GetErrorCount怎么用?C++ FOOTPRINT_LIST::GetErrorCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FOOTPRINT_LIST
的用法示例。
在下文中一共展示了FOOTPRINT_LIST::GetErrorCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SelectFootprint
wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow,
const wxString& aLibraryName,
const wxString& aMask,
const wxString& aKeyWord,
FP_LIB_TABLE* aTable )
{
static wxString oldName; // Save the name of the last module loaded.
wxString fpname;
wxString msg;
wxArrayString libraries;
std::vector< wxArrayString > rows;
wxASSERT( aTable != NULL );
MList.ReadFootprintFiles( aTable, !aLibraryName ? NULL : &aLibraryName );
if( MList.GetErrorCount() )
{
MList.DisplayErrors( this );
return wxEmptyString;
}
if( MList.GetCount() == 0 )
{
wxString tmp;
for( unsigned i = 0; i < libraries.GetCount(); i++ )
{
tmp += libraries[i] + wxT( "\n" );
}
msg.Printf( _( "No footprints could be read from library file(s):\n\n%s\nin any of "
"the library search paths. Verify your system is configured properly "
"so the footprint libraries can be found." ), GetChars( tmp ) );
DisplayError( aWindow, msg );
return wxEmptyString;
}
if( !aKeyWord.IsEmpty() ) // Create a list of modules found by keyword.
{
for( unsigned ii = 0; ii < MList.GetCount(); ii++ )
{
if( KeyWordOk( aKeyWord, MList.GetItem( ii ).GetKeywords() ) )
{
wxArrayString cols;
cols.Add( MList.GetItem( ii ).GetFootprintName() );
cols.Add( MList.GetItem( ii ).GetNickname() );
rows.push_back( cols );
}
}
}
else if( !aMask.IsEmpty() ) // Create a list of modules found by pattern
{
for( unsigned ii = 0; ii < MList.GetCount(); ii++ )
{
const wxString& candidate = MList.GetItem( ii ).GetFootprintName();
if( WildCompareString( aMask, candidate, false ) )
{
wxArrayString cols;
cols.Add( MList.GetItem( ii ).GetFootprintName() );
cols.Add( MList.GetItem( ii ).GetNickname() );
rows.push_back( cols );
}
}
}
else // Create the full list of modules
{
for( unsigned ii = 0; ii < MList.GetCount(); ii++ )
{
wxArrayString cols;
cols.Add( MList.GetItem( ii ).GetFootprintName() );
cols.Add( MList.GetItem( ii ).GetNickname() );
rows.push_back( cols );
}
}
if( !rows.empty() )
{
wxArrayString headers;
headers.Add( _( "Module" ) );
headers.Add( _( "Library" ) );
msg.Printf( _( "Modules [%d items]" ), (int) rows.size() );
EDA_LIST_DIALOG dlg( aWindow, msg, headers, rows, oldName, DisplayCmpDoc );
if( dlg.ShowModal() == wxID_OK )
{
fpname = dlg.GetTextSelection();
fpname = dlg.GetTextSelection( 1 ) + wxT( ":" ) + fpname;
SkipNextLeftButtonReleaseEvent();
}
else
fpname.Empty();
//.........这里部分代码省略.........