本文整理汇总了C++中FP_LIB_TABLE::FindRow方法的典型用法代码示例。如果您正苦于以下问题:C++ FP_LIB_TABLE::FindRow方法的具体用法?C++ FP_LIB_TABLE::FindRow怎么用?C++ FP_LIB_TABLE::FindRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FP_LIB_TABLE
的用法示例。
在下文中一共展示了FP_LIB_TABLE::FindRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveFootprint
bool FOOTPRINT_EDIT_FRAME::SaveFootprint( MODULE* aModule )
{
wxString libraryName = aModule->GetFPID().GetLibNickname();
wxString footprintName = aModule->GetFPID().GetLibItemName();
bool nameChanged = m_footprintNameWhenLoaded != footprintName;
if( aModule->GetLink() )
{
if( SaveFootprintToBoard( false ) )
{
m_footprintNameWhenLoaded = footprintName;
return true;
}
else
return false;
}
else if( libraryName.IsEmpty() || footprintName.IsEmpty() )
{
if( SaveFootprintAs( aModule ) )
{
m_footprintNameWhenLoaded = footprintName;
SyncLibraryTree( true );
return true;
}
else
return false;
}
FP_LIB_TABLE* tbl = Prj().PcbFootprintLibs();
// Legacy libraries are readable, but modifying legacy format is not allowed
// So prompt the user if he try to add/replace a footprint in a legacy lib
wxString libfullname = tbl->FindRow( libraryName )->GetFullURI();
if( IO_MGR::GuessPluginTypeFromLibPath( libfullname ) == IO_MGR::LEGACY )
{
DisplayInfoMessage( this, INFO_LEGACY_LIB_WARN_EDIT );
return false;
}
if( nameChanged )
{
LIB_ID oldFPID( libraryName, m_footprintNameWhenLoaded );
DeleteModuleFromLibrary( oldFPID, false );
}
if( !saveFootprintInLibrary( aModule, libraryName ) )
return false;
if( nameChanged )
{
m_footprintNameWhenLoaded = footprintName;
SyncLibraryTree( true );
}
return true;
}
示例2: UpdateTitle
void FOOTPRINT_VIEWER_FRAME::UpdateTitle()
{
wxString title;
wxString path;
title.Printf( _( "Footprint Library Browser" ) + L" \u2014 %s",
getCurNickname().size()
? getCurNickname()
: _( "no library selected" ) );
// Now, add the full path, for info
if( getCurNickname().size() )
{
FP_LIB_TABLE* libtable = Prj().PcbFootprintLibs();
const LIB_TABLE_ROW* row = libtable->FindRow( getCurNickname() );
if( row )
title << L" \u2014 " << row->GetFullURI( true );
}
SetTitle( title );
}