Rename {Set,Get}GerberExtensions() to {Set,Get}GerberProtelExtensions() (better name) in public API.

This commit is contained in:
unknown 2015-10-21 08:55:30 +02:00 committed by jean-pierre charras
parent 4dc2ece011
commit ad10218a58
5 changed files with 46 additions and 46 deletions

View File

@ -43,6 +43,7 @@ popt.SetAutoScale(False)
popt.SetScale(1)
popt.SetMirror(False)
popt.SetUseGerberAttributes(True)
popt.SetUseGerberProtelExtensions(False)
popt.SetExcludeEdgeLayer(False);
popt.SetScale(1)
popt.SetUseAuxOrigin(True)

View File

@ -162,7 +162,7 @@ void DIALOG_PLOT::Init_Dialog()
}
// Option for using proper Gerber extensions
m_useGerberExtensions->SetValue( m_plotOpts.GetUseGerberExtensions() );
m_useGerberExtensions->SetValue( m_plotOpts.GetUseGerberProtelExtensions() );
// Option for including Gerber attributes (from Gerber X2 format) in the output
m_useGerberAttributes->SetValue( m_plotOpts.GetUseGerberAttributes() );
@ -673,7 +673,7 @@ void DIALOG_PLOT::applyPlotSettings()
tempOptions.SetFormat( getPlotFormat() );
tempOptions.SetUseGerberExtensions( m_useGerberExtensions->GetValue() );
tempOptions.SetUseGerberProtelExtensions( m_useGerberExtensions->GetValue() );
tempOptions.SetUseGerberAttributes( m_useGerberAttributes->GetValue() );
tempOptions.SetGerberPrecision( m_rbGerberFormat->GetSelection() == 0 ? 5 : 6 );
@ -827,4 +827,3 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
if( !m_plotOpts.GetLayerSelection().any() )
DisplayError( this, _( "No layer selected" ) );
}

View File

@ -82,7 +82,7 @@ static bool setInt( int* aInt, int aValue, int aMin, int aMax )
PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() :
m_layerSelection( 4, B_Cu, F_Cu, F_SilkS, B_SilkS )
{
m_useGerberExtensions = false;
m_useGerberProtelExtensions = false;
m_useGerberAttributes = false;
m_gerberPrecision = gbrDefaultPrecision;
m_excludeEdgeLayer = true;
@ -147,7 +147,7 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
m_layerSelection.FmtHex().c_str() );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ),
m_useGerberExtensions ? trueStr : falseStr );
m_useGerberProtelExtensions ? trueStr : falseStr );
if( m_useGerberAttributes ) // save this option only if active,
// to avoid incompatibility with older Pcbnew version
@ -223,7 +223,7 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
{
if( m_layerSelection != aPcbPlotParams.m_layerSelection )
return false;
if( m_useGerberExtensions != aPcbPlotParams.m_useGerberExtensions )
if( m_useGerberProtelExtensions != aPcbPlotParams.m_useGerberProtelExtensions )
return false;
if( m_useGerberAttributes != aPcbPlotParams.m_useGerberAttributes )
return false;
@ -390,7 +390,7 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams )
break;
case T_usegerberextensions:
aPcbPlotParams->m_useGerberExtensions = parseBool();
aPcbPlotParams->m_useGerberProtelExtensions = parseBool();
break;
case T_usegerberattributes:

View File

@ -90,9 +90,9 @@ private:
/// Set of layers to plot
LSET m_layerSelection;
/** When plotting gerbers use a conventional set of extensions instead of
* appending a suffix to the board name */
bool m_useGerberExtensions;
/** When plotting gerbers use a conventional set of Protel extensions
* instead of appending a suffix to the board name */
bool m_useGerberProtelExtensions;
/// Include attributes from the Gerber X2 format (chapter 5 in revision J2)
bool m_useGerberAttributes;
@ -232,8 +232,8 @@ public:
void SetUseGerberAttributes( bool aUse ) { m_useGerberAttributes = aUse; }
bool GetUseGerberAttributes() const { return m_useGerberAttributes; }
void SetUseGerberExtensions( bool aUse ) { m_useGerberExtensions = aUse; }
bool GetUseGerberExtensions() const { return m_useGerberExtensions; }
void SetUseGerberProtelExtensions( bool aUse ) { m_useGerberProtelExtensions = aUse; }
bool GetUseGerberProtelExtensions() const { return m_useGerberProtelExtensions; }
void SetGerberPrecision( int aPrecision );
int GetGerberPrecision() const { return m_gerberPrecision; }

View File

@ -377,7 +377,7 @@ bool PLOT_CONTROLLER::OpenPlotfile( const wxString &aSuffix,
// Gerber format can use specific file ext, depending on layers
// (now not a good practice, because the official file ext is .gbr)
if( GetPlotOptions().GetFormat() == PLOT_FORMAT_GERBER &&
GetPlotOptions().GetUseGerberExtensions() )
GetPlotOptions().GetUseGerberProtelExtensions() )
fileExt = GetGerberProtelExtension( GetLayer() );
BuildPlotFileName( &fn, outputDirName, aSuffix, fileExt );