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 <[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#ifndef __DIALOG_GENCAD_EXPORT_OPTIONS_H__
28#define __DIALOG_GENCAD_EXPORT_OPTIONS_H__
29
30#include <dialog_shim.h>
31
32class PCB_EDIT_FRAME;
33class wxFilePickerCtrl;
34class wxCheckBox;
35
38{
39 FLIP_BOTTOM_PADS, // flip bottom components padstacks geometry
40 UNIQUE_PIN_NAMES, // generate unique pin names
41 INDIVIDUAL_SHAPES, // generate a shape for each component
42 USE_AUX_ORIGIN, // use auxiliary axis as origin
43 STORE_ORIGIN_COORDS // saves the origin point coordinates or (0, 0)
44};
45
46
48{
49public:
50 DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent, const wxString& aPath );
52
54 bool GetOption( GENCAD_EXPORT_OPT aOption ) const;
55
57 std::map<GENCAD_EXPORT_OPT, bool> GetAllOptions() const;
58
60 wxString GetFileName() const;
61
62protected:
63 bool TransferDataFromWindow() override;
64
67
68 std::map<GENCAD_EXPORT_OPT, wxCheckBox*> m_options;
69
70 // Widgets
71 wxGridSizer* m_optsSizer;
72 wxFilePickerCtrl* m_filePicker;
73};
74
75#endif //__DIALOG_GENCAD_EXPORT_OPTIONS_H__
bool TransferDataFromWindow() override
Create checkboxes for GenCAD export options.
DIALOG_GENCAD_EXPORT_OPTIONS(PCB_EDIT_FRAME *aParent, const wxString &aPath)
bool GetOption(GENCAD_EXPORT_OPT aOption) const
Return all export settings.
std::map< GENCAD_EXPORT_OPT, bool > GetAllOptions() const
Return the selected file path.
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:83
The main frame for Pcbnew.
GENCAD_EXPORT_OPT
Settings for GenCAD exporter.