KiCad PCB EDA Suite
dialog_plot.h
Go to the documentation of this file.
1 
5 /*
6  * This program source code file is part of KiCad, a free EDA CAD application.
7  *
8  * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, you may find one here:
22  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
23  * or you may search the http://www.gnu.org website for the version 2 license,
24  * or you may write to the Free Software Foundation, Inc.,
25  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
26  */
27 
28 #include <board.h>
29 #include <dialog_plot_base.h>
30 #include <pcb_plot_params.h>
31 #include <widgets/unit_binder.h>
32 
33 // the plot dialog window name, used by wxWidgets
34 #define DLG_WINDOW_NAME "plot_dialog-window"
35 
40 {
41 public:
42  DIALOG_PLOT( PCB_EDIT_FRAME* parent );
43 
44 private:
45  // Event called functions
46  void Plot( wxCommandEvent& event ) override;
47  void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
48  void OnRightClick( wxMouseEvent& event ) override;
49  void OnPopUpLayers( wxCommandEvent& event ) override;
50  void SetPlotFormat( wxCommandEvent& event ) override;
51  void OnChangeDXFPlotMode( wxCommandEvent& event ) override;
52  void OnSetScaleOpt( wxCommandEvent& event ) override;
53  void CreateDrillFile( wxCommandEvent& event ) override;
54  void OnGerberX2Checked( wxCommandEvent& event ) override;
55  void onRunDRC( wxCommandEvent& event ) override;
56  void onBoardSetup( wxHyperlinkEvent& aEvent ) override;
57 
58  // other functions
59  void init_Dialog(); // main initialization
60  void reInitDialog(); // initialization after calling drill dialog
61  void applyPlotSettings();
63 
65  {
66  m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 );
67  }
68 
70  LSEQ m_layerList; // List to hold CheckListBox layer numbers
71  double m_XScaleAdjust; // X scale factor adjust to compensate
72  // plotter X scaling error
73  double m_YScaleAdjust; // X scale factor adjust to compensate
74  // plotter Y scaling error
75  int m_PSWidthAdjust; // Global width correction for exact line width
76  // in postscript output.
77  // this is a correction factor for tracks width
78  // when plotted
79  int m_widthAdjustMinValue; // Global track width limits
80  int m_widthAdjustMaxValue; // tracks width will be "clipped" whenever the
81  // m_PSWidthAdjust to these limits.
84 
86 
88 };
LSEQ m_layerList
Definition: dialog_plot.h:70
double m_YScaleAdjust
Definition: dialog_plot.h:73
OUTLINE_MODE
Definition: outline_mode.h:24
void OnOutputDirectoryBrowseClicked(wxCommandEvent &event) override
void OnGerberX2Checked(wxCommandEvent &event) override
void OnChangeDXFPlotMode(wxCommandEvent &event) override
void onRunDRC(wxCommandEvent &event) override
void CreateDrillFile(wxCommandEvent &event) override
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:83
double m_XScaleAdjust
Definition: dialog_plot.h:71
void SetPlotFormat(wxCommandEvent &event) override
void Plot(wxCommandEvent &event) override
Class DIALOG_PLOT_BASE.
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:69
int m_widthAdjustMaxValue
Definition: dialog_plot.h:80
PLOT_FORMAT getPlotFormat()
PLOT_FORMAT
The set of supported output plot formats.
Definition: plotter.h:67
void onBoardSetup(wxHyperlinkEvent &aEvent) override
int m_PSWidthAdjust
Definition: dialog_plot.h:75
void OnPopUpLayers(wxCommandEvent &event) override
void setPlotModeChoiceSelection(OUTLINE_MODE aPlotMode)
Definition: dialog_plot.h:64
void OnSetScaleOpt(wxCommandEvent &event) override
int m_widthAdjustMinValue
Definition: dialog_plot.h:79
Parameters and options when plotting/printing a board.
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:465
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:87
A dialog to set the plot options and create plot files in various formats.
Definition: dialog_plot.h:39
void reInitDialog()
wxString m_DRCWarningTemplate
Definition: dialog_plot.h:85
void init_Dialog()
Definition: dialog_plot.cpp:80
void applyPlotSettings()
The main frame for Pcbnew.
wxChoice * m_plotModeOpt
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:82
void OnRightClick(wxMouseEvent &event) override
DIALOG_PLOT(PCB_EDIT_FRAME *parent)
Definition: dialog_plot.cpp:53