Add --exclude-pdf-property-popups to schematic plotting CLI.
This commit is contained in:
parent
7cca303f65
commit
3e4d5d776d
|
@ -33,6 +33,7 @@ JOB_EXPORT_SCH_PLOT::JOB_EXPORT_SCH_PLOT( bool aIsCli, SCH_PLOT_FORMAT aPlotForm
|
|||
m_useBackgroundColor( true ),
|
||||
m_HPGLPenSize( 1.0 ),
|
||||
m_HPGLPaperSizeSelect( JOB_HPGL_PAGE_SIZE::DEFAULT ),
|
||||
m_PDFPropertyPopups( true ),
|
||||
m_theme(),
|
||||
m_outputDirectory(),
|
||||
m_outputFile(),
|
||||
|
|
|
@ -77,20 +77,21 @@ class KICOMMON_API JOB_EXPORT_SCH_PLOT : public JOB
|
|||
public:
|
||||
JOB_EXPORT_SCH_PLOT( bool aIsCli, SCH_PLOT_FORMAT aPlotFormat, wxString aFilename );
|
||||
|
||||
SCH_PLOT_FORMAT m_plotFormat;
|
||||
wxString m_filename;
|
||||
wxString m_drawingSheet;
|
||||
SCH_PLOT_FORMAT m_plotFormat;
|
||||
wxString m_filename;
|
||||
wxString m_drawingSheet;
|
||||
|
||||
bool m_plotAll;
|
||||
bool m_plotDrawingSheet;
|
||||
std::vector<wxString> m_plotPages;
|
||||
|
||||
bool m_blackAndWhite;
|
||||
JOB_PAGE_SIZE m_pageSizeSelect;
|
||||
bool m_useBackgroundColor;
|
||||
double m_HPGLPenSize; // for HPGL format only: pen size
|
||||
JOB_HPGL_PAGE_SIZE m_HPGLPaperSizeSelect;
|
||||
wxString m_theme;
|
||||
bool m_blackAndWhite;
|
||||
JOB_PAGE_SIZE m_pageSizeSelect;
|
||||
bool m_useBackgroundColor;
|
||||
double m_HPGLPenSize; // for HPGL format only: pen size
|
||||
JOB_HPGL_PAGE_SIZE m_HPGLPaperSizeSelect;
|
||||
bool m_PDFPropertyPopups;
|
||||
wxString m_theme;
|
||||
|
||||
wxString m_outputDirectory;
|
||||
wxString m_outputFile;
|
||||
|
|
|
@ -211,6 +211,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportPlot( JOB* aJob )
|
|||
settings.m_HPGLPaperSizeSelect = hpglPageSize;
|
||||
settings.m_HPGLPenSize = aPlotJob->m_HPGLPenSize;
|
||||
settings.m_HPGLPlotOrigin = hpglOrigin;
|
||||
settings.m_PDFPropertyPopups = aPlotJob->m_PDFPropertyPopups;
|
||||
settings.m_outputDirectory = aPlotJob->m_outputDirectory;
|
||||
settings.m_outputFile = aPlotJob->m_outputFile;
|
||||
settings.m_pageSizeSelect = pageSizeSelect;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
|
||||
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
|
@ -35,6 +35,7 @@
|
|||
#define ARG_HPGL_PEN_SIZE "--pen-size"
|
||||
#define ARG_HPGL_ORIGIN "--origin"
|
||||
#define ARG_PAGES "--pages"
|
||||
#define ARG_EXCLUDE_PDF_PROPERTY_POPUPS "--exclude-pdf-property-popups"
|
||||
|
||||
const JOB_HPGL_PLOT_ORIGIN_AND_UNITS hpgl_origin_ops[4] = {
|
||||
JOB_HPGL_PLOT_ORIGIN_AND_UNITS::PLOTTER_BOT_LEFT,
|
||||
|
@ -71,6 +72,11 @@ CLI::SCH_EXPORT_PLOT_COMMAND::SCH_EXPORT_PLOT_COMMAND( const std::string& aName,
|
|||
.implicit_value( true )
|
||||
.default_value( false );
|
||||
|
||||
m_argParser.add_argument( ARG_EXCLUDE_PDF_PROPERTY_POPUPS )
|
||||
.help( UTF8STDSTR( _( "Do not generate property popups in PDF" ) ) )
|
||||
.implicit_value( true )
|
||||
.default_value( false );
|
||||
|
||||
m_argParser.add_argument( "-n", ARG_NO_BACKGROUND_COLOR )
|
||||
.help( UTF8STDSTR( _( "Avoid setting a background color (regardless of theme)" ) ) )
|
||||
.implicit_value( true )
|
||||
|
@ -148,6 +154,11 @@ int CLI::SCH_EXPORT_PLOT_COMMAND::doPerform( KIWAY& aKiway )
|
|||
}
|
||||
plotJob->m_HPGLPlotOrigin = hpgl_origin_ops[origin];
|
||||
}
|
||||
// PDF local options
|
||||
else if( m_plotFormat == SCH_PLOT_FORMAT::PDF )
|
||||
{
|
||||
plotJob->m_PDFPropertyPopups = !m_argParser.get<bool>( ARG_EXCLUDE_PDF_PROPERTY_POPUPS );
|
||||
}
|
||||
|
||||
int exitCode = aKiway.ProcessJob( KIWAY::FACE_SCH, plotJob.get() );
|
||||
|
||||
|
|
Loading…
Reference in New Issue