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, see <https://www.gnu.org/licenses/>.
21 */
22
23#pragma once
24
25#include <dialog_shim.h>
26
27class PCB_EDIT_FRAME;
28class wxFilePickerCtrl;
29class wxCheckBox;
30class wxGridSizer;
31class wxFlexGridSizer;
32class wxStaticText;
33class wxTextCtrl;
35class PCB_EDIT_FRAME;
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
48
49
51{
52public:
53 DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent, const wxString& aTitle, JOB_EXPORT_PCB_GENCAD* aJob );
55
57 bool GetOption( GENCAD_EXPORT_OPT aOption ) const;
58
60 wxString GetFileName() const;
61
62protected:
63 bool TransferDataFromWindow() override;
64 bool TransferDataToWindow() override;
65
66 virtual void onBrowseClicked( wxCommandEvent& aEvent );
67
70
71protected:
72 std::map<GENCAD_EXPORT_OPT, wxCheckBox*> m_options;
73
75
76 // Widgets
77 wxGridSizer* m_optsSizer;
78 wxBoxSizer* m_fileSizer;
79 wxTextCtrl* m_outputFileName;
80 wxStaticText* m_textFile;
83};
bool GetOption(GENCAD_EXPORT_OPT aOption) const
Return the selected file path.
virtual void onBrowseClicked(wxCommandEvent &aEvent)
Create checkboxes for GenCAD export options.
DIALOG_GENCAD_EXPORT_OPTIONS(PCB_EDIT_FRAME *aParent, const wxString &aTitle, JOB_EXPORT_PCB_GENCAD *aJob)
std::map< GENCAD_EXPORT_OPT, wxCheckBox * > m_options
~DIALOG_GENCAD_EXPORT_OPTIONS()
Check whether an option has been selected.
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
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.