KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_export_2581.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 modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * 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#ifndef IPC2581_EXPORT_DIALOG_H
21#define IPC2581_EXPORT_DIALOG_H
24
25class PCB_EDIT_FRAME;
27
29{
30public:
32 DIALOG_EXPORT_2581( JOB_EXPORT_PCB_IPC2581* aJob, PCB_EDIT_FRAME* aEditFrame, wxWindow* aParent );
33
34 wxString GetOutputPath() const
35 {
36 return m_outputFileName->GetValue();
37 }
38
39 wxString GetUnitsString() const
40 {
41 if( m_choiceUnits->GetSelection() == 0 )
42 return wxT( "mm" );
43 else
44 return wxT( "inch" );
45 }
46
47 wxString GetPrecision() const
48 {
49 return wxString::Format( "%d", m_precision->GetValue() );
50 }
51
52 char GetVersion() const
53 {
54 return m_versionChoice->GetSelection() == 0 ? 'B' : 'C';
55 }
56
57 bool GetCompress() const
58 {
59 return m_cbCompress->GetValue();
60 }
61
62private:
63 void onBrowseClicked( wxCommandEvent& event ) override;
64 void onCompressCheck( wxCommandEvent& event ) override;
65 void onOKClick( wxCommandEvent& event ) override;
66
68 void saveToProject();
69
70 void init();
71
72 bool TransferDataToWindow() override;
73 bool TransferDataFromWindow() override;
74
77};
78
79#endif // IPC2581_EXPORT_DIALOG_H
DIALOG_EXPORT_2581_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Export IPC-2581"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxString GetPrecision() const
bool TransferDataToWindow() override
void onCompressCheck(wxCommandEvent &event) override
void onOKClick(wxCommandEvent &event) override
bool TransferDataFromWindow() override
DIALOG_EXPORT_2581(PCB_EDIT_FRAME *aParent)
PCB_EDIT_FRAME * m_parent
void onBrowseClicked(wxCommandEvent &event) override
wxString GetUnitsString() const
JOB_EXPORT_PCB_IPC2581 * m_job
wxString GetOutputPath() const
void saveToProject()
Keep the dialog selections A job keeps them on the job.
The main frame for Pcbnew.