KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_plot_schematic.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 1992-2018 Jean-Pierre Charras jp.charras at wanadoo.fr
5 * Copyright (C) 1992-2010 Lorenzo Marcantonio
6 * Copyright (C) 2011 Wayne Stambaugh <[email protected]>
7 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, you may find one here:
21 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22 * or you may search the http://www.gnu.org website for the version 2 license,
23 * or you may write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25 */
26
27
28#ifndef __DIALOG_PLOT_SCHEMATIC__
29#define __DIALOG_PLOT_SCHEMATIC__
30
31#include <plotters/plotter.h>
33#include <widgets/unit_binder.h>
34#include <sch_plotter.h>
35
36class PDF_PLOTTER;
37class SCH_EDIT_FRAME;
38class SCH_SCREEN;
39class SCH_SHEET_PATH;
40
42
44{
45public:
47 DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame, wxWindow* aParent,
48 JOB_EXPORT_SCH_PLOT* aJob = nullptr );
49
54
55private:
56 void OnPageSizeSelected( wxCommandEvent& event ) override;
57 void OnPlotCurrent( wxCommandEvent& event ) override;
58 void OnPlotAll( wxCommandEvent& event ) override;
59 void OnUpdateUI( wxUpdateUIEvent& event ) override;
60
61 void initDlg();
62
63 // common
64 void getPlotOptions( RENDER_SETTINGS* aSettings );
65
66 bool getModeColor() { return m_ModeColorOption->GetSelection() == 0; }
67
68 void setModeColor( bool aColor ) { m_ModeColorOption->SetSelection( aColor ? 0 : 1 ); }
69
71
75 void onOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
76
78
79 bool getPlotDrawingSheet() { return m_plotDrawingSheet->GetValue(); }
80 void setPlotDrawingSheet( bool aPlot) { m_plotDrawingSheet->SetValue( aPlot ); }
81
82 bool getOpenFileAfterPlot() { return m_openFileAfterPlot->GetValue(); }
83 void setOpenFileAfterPlot( bool aOpen ) { m_openFileAfterPlot->SetValue( aOpen ); }
84
85 void plotSchematic( bool aPlotAll );
86
103 wxString getOutputPath();
104
105private:
107 bool m_configChanged; // true if a project config param has changed
109 static int m_pageSizeSelect; // Static to keep last option for some format
110 static HPGL_PAGE_SIZE m_HPGLPaperSizeSelect; // for HPGL format only: last selected paper size
115};
116
117#endif // __DIALOG_PLOT_SCHEMATIC__
Color settings are a bit different than most of the settings objects in that there can be more than o...
Class DIALOG_PLOT_SCHEMATIC_BASE.
void OnPageSizeSelected(wxCommandEvent &event) override
void OnPlotAll(wxCommandEvent &event) override
static HPGL_PAGE_SIZE m_HPGLPaperSizeSelect
void setOpenFileAfterPlot(bool aOpen)
void OnPlotCurrent(wxCommandEvent &event) override
void setModeColor(bool aColor)
void setPlotDrawingSheet(bool aPlot)
JOB_EXPORT_SCH_PLOT * m_job
bool PrjConfigChanged()
Return true if the project configuration was modified.
void getPlotOptions(RENDER_SETTINGS *aSettings)
COLOR_SETTINGS * getColorSettings()
void plotSchematic(bool aPlotAll)
void onOutputDirectoryBrowseClicked(wxCommandEvent &event) override
Set the m_outputDirectoryName variable to the selected directory from directory dialog.
void OnUpdateUI(wxUpdateUIEvent &event) override
wxString getOutputPath()
Determine the best absolute path to plot files given the contents of the path edit control.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Schematic editor (Eeschema) main window.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
PLOT_FORMAT
The set of supported output plot formats.
Definition: plotter.h:65
HPGL_PAGE_SIZE
Definition: sch_plotter.h:64