当前位置: 首页>>代码示例>>C++>>正文


C++ FOOTPRINT_WIZARD::GetName方法代码示例

本文整理汇总了C++中FOOTPRINT_WIZARD::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ FOOTPRINT_WIZARD::GetName方法的具体用法?C++ FOOTPRINT_WIZARD::GetName怎么用?C++ FOOTPRINT_WIZARD::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FOOTPRINT_WIZARD的用法示例。


在下文中一共展示了FOOTPRINT_WIZARD::GetName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SelectFootprintWizard

void FOOTPRINT_WIZARD_FRAME::SelectFootprintWizard()
{
    DIALOG_FOOTPRINT_WIZARD_LIST* selectWizard =
        new DIALOG_FOOTPRINT_WIZARD_LIST( this );

    if( selectWizard->ShowModal() != wxID_OK )
        return;

    FOOTPRINT_WIZARD* footprintWizard = selectWizard->GetWizard();

    if( footprintWizard )
    {
        m_wizardName = footprintWizard->GetName();
        m_wizardDescription = footprintWizard->GetDescription();
    }
    else
    {
        m_wizardName = wxT( "" );
        m_wizardDescription = wxT( "" );
    }

    ReloadFootprint();
    Zoom_Automatique( false );
    DisplayWizardInfos();
    ReCreatePageList();
    ReCreateParameterList();
}
开发者ID:barrem,项目名称:kicad-source-mirror,代码行数:27,代码来源:footprint_wizard.cpp

示例2: GetWizard

FOOTPRINT_WIZARD* FOOTPRINT_WIZARDS::GetWizard( wxString aName )
{
    int max = GetSize();
    
    for( int i=0; i<max; i++ )
    {
        FOOTPRINT_WIZARD *wizard =  GetWizard( i );
        
        wxString name = wizard->GetName();
        
        if ( name.Cmp( aName ) )
                return wizard;     
    }
   
    return NULL;
}
开发者ID:james-sakalaukus,项目名称:kicad,代码行数:16,代码来源:class_footprint_wizard.cpp

示例3: initLists

void DIALOG_FOOTPRINT_WIZARD_LIST::initLists()
{
    // Current wizard selection, empty or first
    m_footprintWizard = NULL;

    int n_wizards = FOOTPRINT_WIZARDS::GetWizardsCount();

    if( n_wizards )
        m_footprintWizard = FOOTPRINT_WIZARDS::GetWizard( 0 );

    // Choose selection mode and insert the needed rows

    m_footprintGeneratorsGrid->SetSelectionMode( wxGrid::wxGridSelectRows );

    int curr_row_cnt = m_footprintGeneratorsGrid->GetNumberRows();
    m_footprintGeneratorsGrid->DeleteRows( 0, curr_row_cnt );
    m_footprintGeneratorsGrid->InsertRows( 0, n_wizards );

    // Put all wizards in the list
    for( int ii = 0; ii < n_wizards; ii++ )
    {
        wxString num = wxString::Format( "%d", ii+1 );
        FOOTPRINT_WIZARD *wizard = FOOTPRINT_WIZARDS::GetWizard( ii );
        wxString name = wizard->GetName();
        wxString description = wizard->GetDescription();
        wxString image = wizard->GetImage();

        m_footprintGeneratorsGrid->SetCellValue( ii, FP_GEN_ROW_NUMBER, num );
        m_footprintGeneratorsGrid->SetCellValue( ii, FP_GEN_ROW_NAME, name );
        m_footprintGeneratorsGrid->SetCellValue( ii, FP_GEN_ROW_DESCR, description );

    }

    m_footprintGeneratorsGrid->AutoSizeColumns();

    // Auto-expand the description column
    int width = m_footprintGeneratorsGrid->GetClientSize().GetWidth() -
                m_footprintGeneratorsGrid->GetRowLabelSize() -
                m_footprintGeneratorsGrid->GetColSize( FP_GEN_ROW_NAME );

    if ( width > m_footprintGeneratorsGrid->GetColMinimalAcceptableWidth() )
        m_footprintGeneratorsGrid->SetColSize( FP_GEN_ROW_DESCR, width );

    // Select the first row
    m_footprintGeneratorsGrid->ClearSelection();
    m_footprintGeneratorsGrid->SelectRow( 0, false );

    // Display info about scripts: Search paths
    wxString message;
    pcbnewGetScriptsSearchPaths( message );
    m_tcSearchPaths->SetValue( message );
    // Display info about scripts: unloadable scripts (due to syntax errors is python source)
    pcbnewGetUnloadableScriptNames( message );
    if( message.IsEmpty() )
    {
        m_tcNotLoaded->SetValue( _( "All footprint generator scripts were loaded" ) );
        m_buttonShowTrace->Show( false );
    }
    else
        m_tcNotLoaded->SetValue( message );
}
开发者ID:,项目名称:,代码行数:61,代码来源:


注:本文中的FOOTPRINT_WIZARD::GetName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。