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 wxT( "plot_dialog-window" )
35
36class wxRearrangeList;
37class wxBitmapButton;
38
39
44{
45public:
46 DIALOG_PLOT( PCB_EDIT_FRAME* parent );
47
48 virtual ~DIALOG_PLOT();
49
50private:
51 // Event called functions
52 void Plot( wxCommandEvent& event ) override;
53 void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
54 void OnRightClick( wxMouseEvent& event ) override;
55 void OnPopUpLayers( wxCommandEvent& event ) override;
56 void SetPlotFormat( wxCommandEvent& event ) override;
57 void OnChangeDXFPlotMode( wxCommandEvent& event ) override;
58 void OnSetScaleOpt( wxCommandEvent& event ) override;
59 void CreateDrillFile( wxCommandEvent& event ) override;
60 void OnGerberX2Checked( wxCommandEvent& event ) override;
61 void onRunDRC( wxCommandEvent& event ) override;
62 void onBoardSetup( wxHyperlinkEvent& aEvent ) override;
63
64 void onPlotAllListMoveUp( wxCommandEvent& aEvent );
65 void onPlotAllListMoveDown( wxCommandEvent& aEvent );
66
67 // other functions
68 void init_Dialog(); // main initialization
69 void reInitDialog(); // initialization after calling drill dialog
70 void applyPlotSettings();
72
74 {
75 m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 );
76 }
77
79 LSEQ m_layerList; // List to hold CheckListBox layer numbers
80 double m_XScaleAdjust; // X scale factor adjust to compensate
81 // plotter X scaling error
82 double m_YScaleAdjust; // X scale factor adjust to compensate
83 // plotter Y scaling error
84 int m_PSWidthAdjust; // Global width correction for exact line width
85 // in postscript output.
86 // this is a correction factor for tracks width
87 // when plotted
88 int m_widthAdjustMinValue; // Global track width limits
89 int m_widthAdjustMaxValue; // tracks width will be "clipped" whenever the
90 // m_PSWidthAdjust to these limits.
93
95
97
98 wxRearrangeList* m_plotAllLayersList;
99 wxBitmapButton* m_bpMoveUp;
100 wxBitmapButton* m_bpMoveDown;
101
104
107};
Class DIALOG_PLOT_BASE.
wxChoice * m_plotModeOpt
A dialog to set the plot options and create plot files in various formats.
Definition: dialog_plot.h:44
void OnRightClick(wxMouseEvent &event) override
void reInitDialog()
PCB_PLOT_PARAMS m_plotOpts
Definition: dialog_plot.h:96
void onPlotAllListMoveUp(wxCommandEvent &aEvent)
void OnChangeDXFPlotMode(wxCommandEvent &event) override
int m_widthAdjustMinValue
Definition: dialog_plot.h:88
UNIT_BINDER m_trackWidthCorrection
Definition: dialog_plot.h:92
void onBoardSetup(wxHyperlinkEvent &aEvent) override
wxBitmapButton * m_bpMoveUp
Definition: dialog_plot.h:99
PCB_EDIT_FRAME * m_parent
Definition: dialog_plot.h:78
void Plot(wxCommandEvent &event) override
void applyPlotSettings()
int m_PSWidthAdjust
Definition: dialog_plot.h:84
wxString m_DRCWarningTemplate
Definition: dialog_plot.h:94
void setPlotModeChoiceSelection(OUTLINE_MODE aPlotMode)
Definition: dialog_plot.h:73
void OnOutputDirectoryBrowseClicked(wxCommandEvent &event) override
wxRearrangeList * m_plotAllLayersList
Definition: dialog_plot.h:98
void onPlotAllListMoveDown(wxCommandEvent &aEvent)
void onRunDRC(wxCommandEvent &event) override
double m_YScaleAdjust
Definition: dialog_plot.h:82
void OnSetScaleOpt(wxCommandEvent &event) override
virtual ~DIALOG_PLOT()
static LSEQ m_lastPlotOnAllLayersOrder
The plot on all layers ordering the last time the dialog was opened.
Definition: dialog_plot.h:106
void OnPopUpLayers(wxCommandEvent &event) override
wxBitmapButton * m_bpMoveDown
Definition: dialog_plot.h:100
static LSET m_lastLayerSet
The plot layer set that last time the dialog was opened.
Definition: dialog_plot.h:103
DIALOG_PLOT(PCB_EDIT_FRAME *parent)
Definition: dialog_plot.cpp:77
void CreateDrillFile(wxCommandEvent &event) override
UNIT_BINDER m_defaultPenSize
Definition: dialog_plot.h:91
double m_XScaleAdjust
Definition: dialog_plot.h:80
PLOT_FORMAT getPlotFormat()
int m_widthAdjustMaxValue
Definition: dialog_plot.h:89
void OnGerberX2Checked(wxCommandEvent &event) override
void init_Dialog()
void SetPlotFormat(wxCommandEvent &event) override
LSEQ m_layerList
Definition: dialog_plot.h:79
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:490
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:529
The main frame for Pcbnew.
Parameters and options when plotting/printing a board.
OUTLINE_MODE
Definition: outline_mode.h:25
@ SKETCH
Definition: outline_mode.h:26
PLOT_FORMAT
The set of supported output plot formats.
Definition: plotter.h:69