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 (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;
35class wxGridSizer;
36
39{
40 FLIP_BOTTOM_PADS, // flip bottom components padstacks geometry
41 UNIQUE_PIN_NAMES, // generate unique pin names
42 INDIVIDUAL_SHAPES, // generate a shape for each component
43 USE_AUX_ORIGIN, // use auxiliary axis as origin
44 STORE_ORIGIN_COORDS // saves the origin point coordinates or (0, 0)
45};
46
47
49{
50public:
51 DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent, const wxString& aPath );
53
55 bool GetOption( GENCAD_EXPORT_OPT aOption ) const;
56
58 std::map<GENCAD_EXPORT_OPT, bool> GetAllOptions() const;
59
61 wxString GetFileName() const;
62
63protected:
64 bool TransferDataFromWindow() override;
65
68
69 std::map<GENCAD_EXPORT_OPT, wxCheckBox*> m_options;
70
71 // Widgets
72 wxGridSizer* m_optsSizer;
73 wxFilePickerCtrl* m_filePicker;
74};
75
76#endif //__DIALOG_GENCAD_EXPORT_OPTIONS_H__
bool TransferDataFromWindow() override
Create checkboxes for GenCAD export options.
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:88
The main frame for Pcbnew.
GENCAD_EXPORT_OPT
Settings for GenCAD exporter.