KiCad PCB EDA Suite
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 (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * @author Maciej Suminski <maciej.suminski@cern.ch>
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 #ifndef __DIALOG_GENCAD_EXPORT_OPTIONS_H__
28 #define __DIALOG_GENCAD_EXPORT_OPTIONS_H__
29 
30 #include <dialog_shim.h>
31 
32 class PCB_EDIT_FRAME;
33 class wxFilePickerCtrl;
34 
37 {
38  FLIP_BOTTOM_PADS, // flip bottom components padstacks geometry
39  UNIQUE_PIN_NAMES, // generate unique pin names
40  INDIVIDUAL_SHAPES, // generate a shape for each component
41  USE_AUX_ORIGIN, // use auxiliary axis as origin
42  STORE_ORIGIN_COORDS // saves the origin point coordinates or (0, 0)
43 };
44 
45 
47 {
48 public:
49  DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent, const wxString& aPath );
51 
53  bool GetOption( GENCAD_EXPORT_OPT aOption ) const;
54 
56  std::map<GENCAD_EXPORT_OPT, bool> GetAllOptions() const;
57 
59  wxString GetFileName() const;
60 
61 protected:
62  bool TransferDataFromWindow() override;
63 
65  void createOptCheckboxes();
66 
67  std::map<GENCAD_EXPORT_OPT, wxCheckBox*> m_options;
68 
69  // Widgets
70  wxGridSizer* m_optsSizer;
71  wxFilePickerCtrl* m_filePicker;
72 };
73 
74 #endif //__DIALOG_GENCAD_EXPORT_OPTIONS_H__
bool GetOption(GENCAD_EXPORT_OPT aOption) const
Return all export settings.
bool TransferDataFromWindow() override
Create checkboxes for GenCAD export 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:83
std::map< GENCAD_EXPORT_OPT, bool > GetAllOptions() const
Return the selected file path.
std::map< GENCAD_EXPORT_OPT, wxCheckBox * > m_options
GENCAD_EXPORT_OPT
Settings for GenCAD exporter.
DIALOG_GENCAD_EXPORT_OPTIONS(PCB_EDIT_FRAME *aParent, const wxString &aPath)
The main frame for Pcbnew.