KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_gencad_export_options.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) 2017 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * @author Maciej Suminski <[email protected]>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, you may find one here:
21 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22 * or you may search the http://www.gnu.org website for the version 2 license,
23 * or you may write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25 */
26
27#pragma once
28
29#include <dialog_shim.h>
30
31class PCB_EDIT_FRAME;
32class wxFilePickerCtrl;
33class wxCheckBox;
34class wxGridSizer;
35class wxFlexGridSizer;
36class wxStaticText;
37class wxTextCtrl;
39class PCB_EDIT_FRAME;
40
43{
44 FLIP_BOTTOM_PADS, // flip bottom components padstacks geometry
45 UNIQUE_PIN_NAMES, // generate unique pin names
46 INDIVIDUAL_SHAPES, // generate a shape for each component
47 USE_AUX_ORIGIN, // use auxiliary axis as origin
48 STORE_ORIGIN_COORDS // saves the origin point coordinates or (0, 0)
49};
50
52
53
55{
56public:
57 DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent, const wxString& aTitle, JOB_EXPORT_PCB_GENCAD* aJob );
59
61 bool GetOption( GENCAD_EXPORT_OPT aOption ) const;
62
64 wxString GetFileName() const;
65
66protected:
67 bool TransferDataFromWindow() override;
68 bool TransferDataToWindow() override;
69
70 virtual void onBrowseClicked( wxCommandEvent& aEvent );
71
74
75protected:
76 std::map<GENCAD_EXPORT_OPT, wxCheckBox*> m_options;
77
79
80 // Widgets
81 wxGridSizer* m_optsSizer;
82 wxBoxSizer* m_fileSizer;
83 wxTextCtrl* m_outputFileName;
84 wxStaticText* m_textFile;
87};
bool GetOption(GENCAD_EXPORT_OPT aOption) const
Return the selected file path.
virtual void onBrowseClicked(wxCommandEvent &aEvent)
Create checkboxes for GenCAD export options.
std::map< GENCAD_EXPORT_OPT, wxCheckBox * > m_options
~DIALOG_GENCAD_EXPORT_OPTIONS()
Check whether an option has been selected.
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:61
The main frame for Pcbnew.
A bitmap button widget that behaves like a standard dialog button except with an icon.
GENCAD_EXPORT_OPT
Settings for GenCAD exporter.