本文整理汇总了C++中ZONE_SETTINGS::SetDoNotAllowVias方法的典型用法代码示例。如果您正苦于以下问题:C++ ZONE_SETTINGS::SetDoNotAllowVias方法的具体用法?C++ ZONE_SETTINGS::SetDoNotAllowVias怎么用?C++ ZONE_SETTINGS::SetDoNotAllowVias使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZONE_SETTINGS
的用法示例。
在下文中一共展示了ZONE_SETTINGS::SetDoNotAllowVias方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TransferDataFromWindow
bool DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataFromWindow()
{
// Init keepout parameters:
m_zonesettings.SetIsKeepout( true );
m_zonesettings.SetDoNotAllowTracks( m_cbTracksCtrl->GetValue() );
m_zonesettings.SetDoNotAllowVias( m_cbViasCtrl->GetValue() );
m_zonesettings.SetDoNotAllowCopperPour( m_cbCopperPourCtrl->GetValue() );
// Test for not allowed items: should have at least one item not allowed:
if( ! m_zonesettings.GetDoNotAllowTracks() &&
! m_zonesettings.GetDoNotAllowVias() &&
! m_zonesettings.GetDoNotAllowCopperPour() )
{
DisplayError( NULL, _("Tracks, vias, and pads are allowed. The keepout will have no effect." ) );
return false;
}
if( m_zonesettings.m_Layers.count() == 0 )
{
DisplayError( NULL, _( "No layers selected." ) );
return false;
}
switch( m_OutlineAppearanceCtrl->GetSelection() )
{
case 0: m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::NO_HATCH; break;
case 1: m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_EDGE; break;
case 2: m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_FULL; break;
}
if( m_config )
m_config->Write( ZONE_NET_OUTLINES_STYLE_KEY, (long) m_zonesettings.m_Zone_HatchingStyle );
m_zonesettings.m_Zone_45_Only = m_cbConstrainCtrl->GetValue();
m_zonesettings.m_ZonePriority = 0; // for a keepout, this param is not used.
*m_ptr = m_zonesettings;
return true;
}