void SaveParam( wxConfigBase* aConfig ) const override { if( !m_Pt_param || !aConfig ) return; for( size_t index = 1; index <= m_Pt_param->size(); ++index ) { wxString key = ViaDiameterKey; aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ).m_Diameter ) ); key = ViaDrillKey; aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ).m_Drill ) ); } }
void SaveParam( wxConfigBase* aConfig ) const override { if( !m_Pt_param || !aConfig ) return; for( size_t index = 1; index <= m_Pt_param->size(); ++index ) { wxString key = dPairWidthKey; aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ).m_Width ) ); key = dPairGapKey; aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ).m_Gap ) ); key = dPairViaGapKey; aConfig->Write( key << index, Iu2Millimeter( m_Pt_param->at( index - 1 ).m_ViaGap ) ); } }
void SaveParam( wxConfigBase* aConfig ) const override { if( !m_Pt_param || !aConfig ) return; BOARD* board = m_Pt_param; BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings(); wxString oldPath = aConfig->GetPath(); wxString layerKeyPrefix = LayerKeyPrefix; aConfig->Write( CopperLayerCountKey, board->GetCopperLayerCount() ); aConfig->Write( BoardThicknessKey, Iu2Millimeter( bds.GetBoardThickness() ) ); for( LSEQ seq = LSET::AllLayersMask().Seq(); seq; ++seq ) { PCB_LAYER_ID layer = *seq; wxString path = layerKeyPrefix + wxT( "." ) + board->GetStandardLayerName( layer ); wxString layerName = board->GetLayerName( layer ); LAYER_T layerType = board->GetLayerType( layer ); aConfig->SetPath( oldPath ); aConfig->SetPath( path ); if( IsCopperLayer( layer ) ) { aConfig->Write( LayerNameKey, layerName ); aConfig->Write( LayerTypeKey, (int) layerType ); } aConfig->Write( LayerEnabledKey, board->IsLayerEnabled( layer ) ); } aConfig->SetPath( oldPath ); }
/** * Function DisplayImageInfo * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Display info about Image Parameters. * These parameters are valid for the entire file, and must set only once * (If more than once, only the last value is used) */ void GERBER_FILE_IMAGE::DisplayImageInfo( GERBVIEW_FRAME* aMainFrame ) { wxString msg; aMainFrame->ClearMsgPanel(); // Display Image name (Image specific) aMainFrame->AppendMsgPanel( _( "Image name" ), m_ImageName, CYAN ); // Display graphic layer number used to draw this Image // (not a Gerber parameter but is also image specific) msg.Printf( wxT( "%d" ), m_GraphicLayer + 1 ); aMainFrame->AppendMsgPanel( _( "Graphic layer" ), msg, BROWN ); // Display Image rotation (Image specific) msg.Printf( wxT( "%d" ), m_ImageRotation ); aMainFrame->AppendMsgPanel( _( "Img Rot." ), msg, CYAN ); // Display Image polarity (Image specific) msg = m_ImageNegative ? _("Negative") : _("Normal"); aMainFrame->AppendMsgPanel( _( "Polarity" ), msg, BROWN ); // Display Image justification and offset for justification (Image specific) msg = m_ImageJustifyXCenter ? _("Center") : _("Normal"); aMainFrame->AppendMsgPanel( _( "X Justify" ), msg, DARKRED ); msg = m_ImageJustifyYCenter ? _("Center") : _("Normal"); aMainFrame->AppendMsgPanel( _( "Y Justify" ), msg, DARKRED ); if( g_UserUnit == INCHES ) msg.Printf( wxT( "X=%f Y=%f" ), Iu2Mils( m_ImageJustifyOffset.x ) / 1000.0, Iu2Mils( m_ImageJustifyOffset.y ) / 1000.0 ); else msg.Printf( wxT( "X=%f Y=%f" ), Iu2Millimeter( m_ImageJustifyOffset.x ), Iu2Millimeter( m_ImageJustifyOffset.y ) ); aMainFrame->AppendMsgPanel( _( "Image Justify Offset" ), msg, DARKRED ); }