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 (C) 2023 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 along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef IPC2581_EXPORT_DIALOG_H
21#define IPC2581_EXPORT_DIALOG_H
23
24class PCB_EDIT_FRAME;
25
27{
28public:
30
31 wxString GetOutputPath() const
32 {
33 return m_outputFileName->GetValue();
34 }
35
36 wxString GetUnitsString() const
37 {
38 if( m_choiceUnits->GetSelection() == 0 )
39 return wxT( "mm" );
40 else
41 return wxT( "inch" );
42 }
43
44 wxString GetPrecision() const
45 {
46 return wxString::Format( "%d", m_precision->GetValue() );
47 }
48
49 char GetVersion() const
50 {
51 return m_versionChoice->GetSelection() == 0 ? 'B' : 'C';
52 }
53
54 wxString GetOEM() const
55 {
56 if( m_oemRef->GetSelection() == 0 )
57 return wxEmptyString;
58 else
59 return m_oemRef->GetStringSelection();
60 }
61
62 bool GetCompress() const
63 {
64 return m_cbCompress->GetValue();
65 }
66
67 wxString GetMPN() const
68 {
69 if( !m_choiceMPN->IsEnabled() || m_choiceMPN->GetSelection() == 0 )
70 return wxEmptyString;
71 else
72 return m_choiceMPN->GetStringSelection();
73 }
74
75 wxString GetMfg() const
76 {
77 if( !m_choiceMfg->IsEnabled() || m_choiceMfg->GetSelection() == 0 )
78 return wxEmptyString;
79 else
80 return m_choiceMfg->GetStringSelection();
81 }
82
83 wxString GetDistPN() const
84 {
85 if( !m_choiceDistPN->IsEnabled() || m_choiceDistPN->GetSelection() == 0 )
86 return wxEmptyString;
87 else
88 return m_choiceDistPN->GetStringSelection();
89 }
90
91 wxString GetDist() const
92 {
93 if( !m_textDistributor->IsEnabled() || m_textDistributor->GetValue() == _( "N/A" ) )
94 return wxEmptyString;
95 else
96 return m_textDistributor->GetValue();
97 }
98
99private:
100 void onBrowseClicked( wxCommandEvent& event ) override;
101 void onOKClick( wxCommandEvent& event ) override;
102 void onCompressCheck( wxCommandEvent& event ) override;
103 void onMfgPNChange( wxCommandEvent& event ) override;
104 void onDistPNChange( wxCommandEvent& event ) override;
105
106
107 bool TransferDataToWindow() override;
108 bool TransferDataFromWindow() override;
109
111};
112
113#endif // IPC2581_EXPORT_DIALOG_H
Class DIALOG_EXPORT_2581_BASE.
void onMfgPNChange(wxCommandEvent &event) override
wxString GetOEM() const
wxString GetPrecision() const
bool GetCompress() const
bool TransferDataToWindow() override
void onCompressCheck(wxCommandEvent &event) override
void onOKClick(wxCommandEvent &event) override
wxString GetMPN() const
void onDistPNChange(wxCommandEvent &event) override
bool TransferDataFromWindow() override
wxString GetDistPN() const
PCB_EDIT_FRAME * m_parent
wxString GetDist() const
wxString GetMfg() const
void onBrowseClicked(wxCommandEvent &event) override
wxString GetUnitsString() const
wxString GetOutputPath() const
The main frame for Pcbnew.
#define _(s)