Commit ac0979fa authored by Marco Mattila's avatar Marco Mattila
Browse files

Tune pcbnew plot dialog. Make actual plotting code independent of dialog...

Tune pcbnew plot dialog. Make actual plotting code independent of dialog widgets and get settings from PCB_PLOT_PARAMS instead.
parent e30ceb0a
Loading
Loading
Loading
Loading
+349 −346
Original line number Original line Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep  8 2010)
// C++ code generated with wxFormBuilder (version Nov 18 2010)
// http://www.wxformbuilder.org/
// http://www.wxformbuilder.org/
//
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -28,7 +28,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
	m_staticText121->Wrap( -1 );
	m_staticText121->Wrap( -1 );
	bSizer27->Add( m_staticText121, 0, wxTOP, 5 );
	bSizer27->Add( m_staticText121, 0, wxTOP, 5 );
	
	
	wxString m_plotFormatOptChoices[] = { _("HPGL"), _("Gerber"), _("Postscript"), _("Postscript A4"), _("DXF") };
	wxString m_plotFormatOptChoices[] = { _("HPGL"), _("Gerber"), _("Postscript"), _("DXF") };
	int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString );
	int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString );
	m_plotFormatOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 0 );
	m_plotFormatOpt = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 0 );
	m_plotFormatOpt->SetSelection( 0 );
	m_plotFormatOpt->SetSelection( 0 );
@@ -272,6 +272,9 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
	m_plotPSNegativeOpt = new wxCheckBox( this, wxID_ANY, _("Negative plot"), wxDefaultPosition, wxDefaultSize, 0 );
	m_plotPSNegativeOpt = new wxCheckBox( this, wxID_ANY, _("Negative plot"), wxDefaultPosition, wxDefaultSize, 0 );
	m_PSOptionsSizer->Add( m_plotPSNegativeOpt, 0, wxALL, 2 );
	m_PSOptionsSizer->Add( m_plotPSNegativeOpt, 0, wxALL, 2 );
	
	
	m_usePsA4Opt = new wxCheckBox( this, wxID_ANY, _("Force A4 paper size"), wxDefaultPosition, wxDefaultSize, 0 );
	m_PSOptionsSizer->Add( m_usePsA4Opt, 0, wxALL, 2 );
	
	m_PlotOptionsSizer->Add( m_PSOptionsSizer, 0, wxALL|wxEXPAND, 3 );
	m_PlotOptionsSizer->Add( m_PSOptionsSizer, 0, wxALL|wxEXPAND, 3 );
	
	
	bUpperSizer->Add( m_PlotOptionsSizer, 0, 0, 5 );
	bUpperSizer->Add( m_PlotOptionsSizer, 0, 0, 5 );
+3997 −2735

File changed.

Preview size limit exceeded, changes collapsed.

+113 −112
Original line number Original line Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep  8 2010)
// C++ code generated with wxFormBuilder (version Nov 18 2010)
// http://www.wxformbuilder.org/
// http://www.wxformbuilder.org/
//
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -84,6 +84,7 @@ class DIALOG_PLOT_BASE : public wxDialog
		wxStaticText* m_staticText8;
		wxStaticText* m_staticText8;
		wxTextCtrl* m_fineAdjustYscaleOpt;
		wxTextCtrl* m_fineAdjustYscaleOpt;
		wxCheckBox* m_plotPSNegativeOpt;
		wxCheckBox* m_plotPSNegativeOpt;
		wxCheckBox* m_usePsA4Opt;
		wxStaticText* m_staticText2;
		wxStaticText* m_staticText2;
		wxTextCtrl* m_messagesBox;
		wxTextCtrl* m_messagesBox;
		
		
+1 −1
Original line number Original line Diff line number Diff line
@@ -356,7 +356,7 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( IO_
            aPcbPlotParams->subtractMaskFromSilk = ParseBool();
            aPcbPlotParams->subtractMaskFromSilk = ParseBool();
            break;
            break;
        case T_outputformat:
        case T_outputformat:
            aPcbPlotParams->m_PlotFormat = ParseInt( 0, 4 );
            aPcbPlotParams->m_PlotFormat = ParseInt( 0, 3 );
            break;
            break;
        case T_mirror:
        case T_mirror:
            aPcbPlotParams->m_PlotMirror = ParseBool();
            aPcbPlotParams->m_PlotMirror = ParseBool();
+2 −0
Original line number Original line Diff line number Diff line
@@ -102,6 +102,8 @@ public:
    bool        operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const;
    bool        operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const;
    bool        operator!=( const PCB_PLOT_PARAMS &aPcbPlotParams ) const;
    bool        operator!=( const PCB_PLOT_PARAMS &aPcbPlotParams ) const;


    void        SetPlotFormat( int aFormat ) { m_PlotFormat = aFormat; };
    int         GetPlotFormat() const { return m_PlotFormat; };
    void        SetOutputDirectory( wxString aDir ) { outputDirectory = aDir; };
    void        SetOutputDirectory( wxString aDir ) { outputDirectory = aDir; };
    wxString    GetOutputDirectory() const { return outputDirectory; };
    wxString    GetOutputDirectory() const { return outputDirectory; };
    void        SetUseGerberExtensions( bool aUse ) { useGerberExtensions = aUse; };
    void        SetUseGerberExtensions( bool aUse ) { useGerberExtensions = aUse; };
Loading