KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_plot.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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#include <board.h>
21#include <dialog_plot_base.h>
22#include <pcb_plot_params.h>
23#include <widgets/unit_binder.h>
24
25// the plot dialog window name, used by wxWidgets
26#define DLG_WINDOW_NAME wxT( "plot_dialog-window" )
27
28class wxRearrangeList;
29class wxBitmapButton;
30
32
37{
38public:
39 DIALOG_PLOT( PCB_EDIT_FRAME* aEditFrame );
40 DIALOG_PLOT( PCB_EDIT_FRAME* aEditFrame, wxWindow* aParent, JOB_EXPORT_PCB_PLOT* aJob = nullptr );
41
42 virtual ~DIALOG_PLOT();
43
44 bool TransferDataToWindow() override;
45
46private:
47 // Event called functions
48 void Plot( wxCommandEvent& event ) override;
49 void onOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
50 void OnRightClickLayers( wxMouseEvent& event );
51 void OnRightClickAllLayers( wxMouseEvent& event );
52 void SetPlotFormat( wxCommandEvent& event ) override;
53 void OnChangeDXFPlotMode( wxCommandEvent& event ) override;
54 void CreateDrillFile( wxCommandEvent& event ) override;
55 void OnGerberX2Checked( wxCommandEvent& event ) override;
56 void onRunDRC( wxCommandEvent& event ) override;
57 void onOpenOutputDirectory( wxCommandEvent& event ) override;
58 void onBoardSetup( wxHyperlinkEvent& aEvent ) override;
59
60 void onPlotAllListMoveUp( wxCommandEvent& aEvent );
61 void onPlotAllListMoveDown( wxCommandEvent& aEvent );
62
63 void onDNPCheckbox( wxCommandEvent& event ) override;
64 void onSketchPads( wxCommandEvent& event ) override;
65 void onPDFColorChoice( wxCommandEvent& event ) override;
66
67 // other functions
68 void reInitDialog(); // initialization after calling drill dialog
69 void applyPlotSettings();
71 wxString getSelectedVariant() const;
72
73 void arrangeAllLayersList( const LSEQ& aSeq );
76
77private:
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.
92
94
96
97 wxRearrangeList* m_plotAllLayersList;
98
101
103
106};
DIALOG_PLOT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Plot"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void onPDFColorChoice(wxCommandEvent &event) override
DIALOG_PLOT(PCB_EDIT_FRAME *aEditFrame)
void reInitDialog()
void OnRightClickLayers(wxMouseEvent &event)
static LSEQ s_lastAllLayersOrder
The plot on all layers ordering the last time the dialog was opened.
JOB_EXPORT_PCB_PLOT * m_job
PCB_PLOT_PARAMS m_plotOpts
Definition dialog_plot.h:95
STD_BITMAP_BUTTON * m_bpMoveUp
Definition dialog_plot.h:99
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:91
void onBoardSetup(wxHyperlinkEvent &aEvent) override
void OnRightClickAllLayers(wxMouseEvent &event)
void onSketchPads(wxCommandEvent &event) override
void Plot(wxCommandEvent &event) override
void applyPlotSettings()
int m_PSWidthAdjust
Definition dialog_plot.h:84
wxString m_DRCWarningTemplate
Definition dialog_plot.h:93
wxRearrangeList * m_plotAllLayersList
Definition dialog_plot.h:97
bool TransferDataToWindow() override
void onPlotAllListMoveDown(wxCommandEvent &aEvent)
void onRunDRC(wxCommandEvent &event) override
void arrangeAllLayersList(const LSEQ &aSeq)
double m_YScaleAdjust
Definition dialog_plot.h:82
void onOpenOutputDirectory(wxCommandEvent &event) override
void updatePdfColorOptions()
PCB_EDIT_FRAME * m_editFrame
Definition dialog_plot.h:78
virtual ~DIALOG_PLOT()
STD_BITMAP_BUTTON * m_bpMoveDown
wxString getSelectedVariant() const
void CreateDrillFile(wxCommandEvent &event) override
void onDNPCheckbox(wxCommandEvent &event) override
double m_XScaleAdjust
Definition dialog_plot.h:80
PLOT_FORMAT getPlotFormat()
void transferPlotParamsToJob()
int m_widthAdjustMaxValue
Definition dialog_plot.h:89
void onOutputDirectoryBrowseClicked(wxCommandEvent &event) override
void OnGerberX2Checked(wxCommandEvent &event) override
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 lseq.h:47
The main frame for Pcbnew.
Parameters and options when plotting/printing a board.
A bitmap button widget that behaves like a standard dialog button except with an icon.
PLOT_FORMAT
The set of supported output plot formats.
Definition plotter.h:60