KiCad PCB EDA Suite
Loading...
Searching...
No Matches
legacyfiledlg_netlist_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) 2022 KiCad Developers, see AUTHORS.txt for contributors.
5*
6* This program is free software: you can redistribute it and/or modify it
7* under the terms of the GNU General Public License as published by the
8* Free Software Foundation, either version 3 of the License, or (at your
9* option) any later version.
10*
11* This program is distributed in the hope that it will be useful, but
12* WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14* General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License along
17* with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef LEGACYFILEDLG_NETLIST_OPTIONS_H_
21#define LEGACYFILEDLG_NETLIST_OPTIONS_H_
22
23#include <wx/checkbox.h>
24#include <wx/panel.h>
25#include <wx/sizer.h>
26
30class LEGACYFILEDLG_NETLIST_OPTIONS : public wxPanel
31{
32public:
33 LEGACYFILEDLG_NETLIST_OPTIONS( wxWindow* aParent ) : wxPanel( aParent )
34 {
35 m_cbOmitExtras = new wxCheckBox( this, wxID_ANY, _( "Omit extra information" ) );
36 m_cbOmitNets = new wxCheckBox( this, wxID_ANY, _( "Omit nets" ) );
38 new wxCheckBox( this, wxID_ANY, _( "Do not prefix path with footprint UUID." ) );
39
40 wxBoxSizer* sizer = new wxBoxSizer( wxHORIZONTAL );
41 sizer->Add( m_cbOmitExtras, 0, wxALL, 5 );
42 sizer->Add( m_cbOmitNets, 0, wxALL, 5 );
43 sizer->Add( m_cbOmitFpUuids, 0, wxALL, 5 );
44
45 SetSizerAndFit( sizer );
46 }
47
49 {
50 int options = 0;
51
52 if( m_cbOmitExtras->GetValue() )
53 options |= CTL_OMIT_EXTRA;
54
55 if( m_cbOmitNets->GetValue() )
56 options |= CTL_OMIT_NETS;
57
58 if( m_cbOmitFpUuids->GetValue() )
59 options |= CTL_OMIT_FP_UUID;
60
61 return options;
62 }
63
64 static wxWindow* Create( wxWindow* aParent )
65 {
66 return new LEGACYFILEDLG_NETLIST_OPTIONS( aParent );
67 }
68
69protected:
70 wxCheckBox* m_cbOmitExtras;
71 wxCheckBox* m_cbOmitNets;
72 wxCheckBox* m_cbOmitFpUuids;
73};
74
75#endif
Helper widget to add controls to a wxFileDialog to set netlist configuration options.
static wxWindow * Create(wxWindow *aParent)
#define CTL_OMIT_EXTRA
Definition: ctl_flags.h:27
#define CTL_OMIT_NETS
Definition: ctl_flags.h:28
#define CTL_OMIT_FP_UUID
Don't prefix the footprint UUID to the sheet path.
Definition: ctl_flags.h:31
#define _(s)