Clean up naming.

This commit is contained in:
Jeff Young 2023-08-18 18:44:54 +01:00
parent ec980e8696
commit 6c9ba52f18
6 changed files with 22 additions and 30 deletions

View File

@ -613,7 +613,6 @@ set( PCB_COMMON_SRCS
${CMAKE_SOURCE_DIR}/pcbnew/pcb_painter.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_painter.cpp
${CMAKE_SOURCE_DIR}/pcbnew/plugins/kicad/pcb_parser.cpp ${CMAKE_SOURCE_DIR}/pcbnew/plugins/kicad/pcb_parser.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_plot_params.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_plot_params.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_plot_svg.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_screen.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_screen.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_view.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_view.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcbnew_settings.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcbnew_settings.cpp

View File

@ -52,8 +52,8 @@ set( PCBNEW_DIALOGS
dialogs/dialog_drc_base.cpp dialogs/dialog_drc_base.cpp
dialogs/dialog_footprint_checker.cpp dialogs/dialog_footprint_checker.cpp
dialogs/dialog_footprint_checker_base.cpp dialogs/dialog_footprint_checker_base.cpp
dialogs/dialog_footprint_associations.cpp dialogs/dialog_footprint_associations.cpp
dialogs/dialog_footprint_associations_base.cpp dialogs/dialog_footprint_associations_base.cpp
dialogs/dialog_footprint_properties.cpp dialogs/dialog_footprint_properties.cpp
dialogs/dialog_footprint_properties_base.cpp dialogs/dialog_footprint_properties_base.cpp
dialogs/dialog_footprint_properties_fp_editor.cpp dialogs/dialog_footprint_properties_fp_editor.cpp
@ -207,6 +207,7 @@ set( PCBNEW_EXPORTERS
exporters/export_footprint_associations.cpp exporters/export_footprint_associations.cpp
exporters/export_gencad.cpp exporters/export_gencad.cpp
exporters/export_idf.cpp exporters/export_idf.cpp
exporters/export_svg.cpp
exporters/step/exporter_step.cpp exporters/step/exporter_step.cpp
exporters/step/step_pcb_model.cpp exporters/step/step_pcb_model.cpp
exporters/exporter_vrml.cpp exporters/exporter_vrml.cpp

View File

@ -39,7 +39,7 @@
#include <wx/dirdlg.h> #include <wx/dirdlg.h>
#include <pgm_base.h> #include <pgm_base.h>
#include <project/project_file.h> #include <project/project_file.h>
#include <pcb_plot_svg.h> #include <exporters/export_svg.h>
class DIALOG_EXPORT_SVG : public DIALOG_EXPORT_SVG_BASE class DIALOG_EXPORT_SVG : public DIALOG_EXPORT_SVG_BASE
{ {
@ -310,7 +310,7 @@ void DIALOG_EXPORT_SVG::ExportSVGFile( bool aOnlyOneFile )
svgPlotOptions.m_outputFile = svgPath; svgPlotOptions.m_outputFile = svgPath;
svgPlotOptions.m_printMaskLayer = m_printMaskLayer; svgPlotOptions.m_printMaskLayer = m_printMaskLayer;
if( PCB_PLOT_SVG::Plot(m_board, svgPlotOptions ) ) if( EXPORT_SVG::Plot(m_board, svgPlotOptions ) )
{ {
reporter.Report( wxString::Format( _( "Exported '%s'." ), svgPath ), reporter.Report( wxString::Format( _( "Exported '%s'." ), svgPath ),
RPT_SEVERITY_ACTION ); RPT_SEVERITY_ACTION );

View File

@ -18,18 +18,16 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <board.h> #include "board.h"
#include <board_design_settings.h> #include "locale_io.h"
#include <locale_io.h> #include "pcb_plot_params.h"
#include <pcbnew_settings.h> #include "export_svg.h"
#include <pcb_plot_params.h> #include "pcbplot.h"
#include <pcb_plot_svg.h> #include "pgm_base.h"
#include <pcbplot.h> #include "plotters/plotters_pslike.h"
#include <pgm_base.h>
#include <plotters/plotters_pslike.h>
bool PCB_PLOT_SVG::Plot( BOARD* aBoard, const PCB_PLOT_SVG_OPTIONS& aSvgPlotOptions ) bool EXPORT_SVG::Plot( BOARD* aBoard, const PCB_PLOT_SVG_OPTIONS& aSvgPlotOptions )
{ {
PCB_PLOT_PARAMS plot_opts; PCB_PLOT_PARAMS plot_opts;
wxString outputFile = aSvgPlotOptions.m_outputFile; wxString outputFile = aSvgPlotOptions.m_outputFile;
@ -42,21 +40,15 @@ bool PCB_PLOT_SVG::Plot( BOARD* aBoard, const PCB_PLOT_SVG_OPTIONS& aSvgPlotOpti
switch( aSvgPlotOptions.m_drillShapeOption ) switch( aSvgPlotOptions.m_drillShapeOption )
{ {
default: default:
case 0: case 0: plot_opts.SetDrillMarksType( DRILL_MARKS::NO_DRILL_SHAPE ); break;
plot_opts.SetDrillMarksType( DRILL_MARKS::NO_DRILL_SHAPE ); case 1: plot_opts.SetDrillMarksType( DRILL_MARKS::SMALL_DRILL_SHAPE ); break;
break; case 2: plot_opts.SetDrillMarksType( DRILL_MARKS::FULL_DRILL_SHAPE ); break;
case 1:
plot_opts.SetDrillMarksType( DRILL_MARKS::SMALL_DRILL_SHAPE );
break;
case 2:
plot_opts.SetDrillMarksType( DRILL_MARKS::FULL_DRILL_SHAPE );
break;
} }
} }
else else
{
plot_opts.SetDrillMarksType( DRILL_MARKS::NO_DRILL_SHAPE ); plot_opts.SetDrillMarksType( DRILL_MARKS::NO_DRILL_SHAPE );
}
plot_opts.SetSkipPlotNPTH_Pads( false ); plot_opts.SetSkipPlotNPTH_Pads( false );

View File

@ -41,7 +41,7 @@ struct PCB_PLOT_SVG_OPTIONS
int m_drillShapeOption; int m_drillShapeOption;
}; };
class PCB_PLOT_SVG class EXPORT_SVG
{ {
public: public:
static bool Plot( BOARD* aBoard, const PCB_PLOT_SVG_OPTIONS& aSvgPlotOptions ); static bool Plot( BOARD* aBoard, const PCB_PLOT_SVG_OPTIONS& aSvgPlotOptions );

View File

@ -52,7 +52,7 @@
#include <macros.h> #include <macros.h>
#include <pad.h> #include <pad.h>
#include <pcb_marker.h> #include <pcb_marker.h>
#include <pcb_plot_svg.h> #include <exporters/export_svg.h>
#include <pcbnew_settings.h> #include <pcbnew_settings.h>
#include <pcbplot.h> #include <pcbplot.h>
#include <pgm_base.h> #include <pgm_base.h>
@ -156,7 +156,7 @@ int PCBNEW_JOBS_HANDLER::JobExportSvg( JOB* aJob )
if( aJob->IsCli() ) if( aJob->IsCli() )
{ {
if( PCB_PLOT_SVG::Plot( brd, svgPlotOptions ) ) if( EXPORT_SVG::Plot( brd, svgPlotOptions ) )
m_reporter->Report( _( "Successfully created svg file" ), RPT_SEVERITY_INFO ); m_reporter->Report( _( "Successfully created svg file" ), RPT_SEVERITY_INFO );
else else
m_reporter->Report( _( "Error creating svg file" ), RPT_SEVERITY_ERROR ); m_reporter->Report( _( "Error creating svg file" ), RPT_SEVERITY_ERROR );
@ -843,7 +843,7 @@ int PCBNEW_JOBS_HANDLER::doFpExportSvg( JOB_FP_EXPORT_SVG* aSvgJob, const FOOTPR
svgPlotOptions.m_printMaskLayer = aSvgJob->m_printMaskLayer; svgPlotOptions.m_printMaskLayer = aSvgJob->m_printMaskLayer;
svgPlotOptions.m_plotFrame = false; svgPlotOptions.m_plotFrame = false;
if( !PCB_PLOT_SVG::Plot( brd.get(), svgPlotOptions ) ) if( !EXPORT_SVG::Plot( brd.get(), svgPlotOptions ) )
m_reporter->Report( _( "Error creating svg file" ), RPT_SEVERITY_ERROR ); m_reporter->Report( _( "Error creating svg file" ), RPT_SEVERITY_ERROR );