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-2017 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 <class_board.h>
29 #include <dialog_plot_base.h>
30 #include <pcb_plot_params.h>
31 
37 {
38 public:
39  DIALOG_PLOT( PCB_EDIT_FRAME* parent );
40 
41 private:
43  wxConfigBase* m_config;
44  LSEQ m_layerList; // List to hold CheckListBox layer numbers
45  double m_XScaleAdjust; // X scale factor adjust to compensate
46  // plotter X scaling error
47  double m_YScaleAdjust; // X scale factor adjust to compensate
48  // plotter Y scaling error
49  int m_PSWidthAdjust; // Global width correction for exact line width
50  // in postscript output.
51  // this is a correction factor for tracks width
52  // when plotted
53  int m_widthAdjustMinValue; // Global track width limits
54  int m_widthAdjustMaxValue; // tracks width will be "clipped" whenever the
55  // m_PSWidthAdjust to these limits.
56 
58 
59  // Event called functions
60  void Plot( wxCommandEvent& event ) override;
61  void OnQuit( wxCommandEvent& event ) override;
62  void OnClose( wxCloseEvent& event ) override;
63  void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
64  void OnRightClick( wxMouseEvent& event ) override;
65  void OnPopUpLayers( wxCommandEvent& event ) override;
66  void SetPlotFormat( wxCommandEvent& event ) override;
67  void OnChangeDXFPlotMode( wxCommandEvent& event ) override;
68  void OnSetScaleOpt( wxCommandEvent& event ) override;
69  void CreateDrillFile( wxCommandEvent& event ) override;
70  void OnGerberX2Checked( wxCommandEvent& event ) override;
71  void onRunDRC( wxCommandEvent& event ) override;
72 
73  // other functions
74  void init_Dialog(); // main initialization
75  void reInitDialog(); // initialization after calling drill dialog
76  void applyPlotSettings();
78 
80  {
81  m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 );
82  }
83 };
LSEQ m_layerList
Definition: dialog_plot.h:44
double m_YScaleAdjust
Definition: dialog_plot.h:47
void OnOutputDirectoryBrowseClicked(wxCommandEvent &event) override
void OnGerberX2Checked(wxCommandEvent &event) override
void OnChangeDXFPlotMode(wxCommandEvent &event) override
Class BOARD to handle a board.
PlotFormat getPlotFormat()
void onRunDRC(wxCommandEvent &event) override
PlotFormat
Enum PlotFormat is the set of supported output plot formats.
Definition: plotter.h:50
void CreateDrillFile(wxCommandEvent &event) override
double m_XScaleAdjust
Definition: dialog_plot.h:45
void SetPlotFormat(wxCommandEvent &event) override
void Plot(wxCommandEvent &event) override
Class DIALOG_PLOT_BASE.
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:42
int m_widthAdjustMaxValue
Definition: dialog_plot.h:54
EDA_DRAW_MODE_T
Definition: eda_text.h:62
int m_PSWidthAdjust
Definition: dialog_plot.h:49
void OnPopUpLayers(wxCommandEvent &event) override
void setPlotModeChoiceSelection(EDA_DRAW_MODE_T aPlotMode)
Definition: dialog_plot.h:79
void OnSetScaleOpt(wxCommandEvent &event) override
int m_widthAdjustMinValue
Definition: dialog_plot.h:53
Class PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board...
Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:57
Class DIALOG_PLOT is the dialog to set the plot options, and create plot files in various formats...
Definition: dialog_plot.h:36
void reInitDialog()
void init_Dialog()
Definition: dialog_plot.cpp:60
void applyPlotSettings()
wxChoice * m_plotModeOpt
wxConfigBase * m_config
Definition: dialog_plot.h:43
void OnRightClick(wxMouseEvent &event) override
void OnQuit(wxCommandEvent &event) override
void OnClose(wxCloseEvent &event) override
DIALOG_PLOT(PCB_EDIT_FRAME *parent)
Definition: dialog_plot.cpp:48