KiCad PCB EDA Suite
Loading...
Searching...
No Matches
job_export_sch_bom.cpp
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) 2023 Mark Roszko <[email protected]>
5 * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
22#include <jobs/job_registry.h>
23#include <i18n_utility.h>
24
25
27 JOB( "bom", false),
28 m_filename(),
29
30 m_fieldDelimiter(),
31 m_stringDelimiter(),
32 m_refDelimiter(),
33 m_refRangeDelimiter(),
34 m_keepTabs( false ),
35 m_keepLineBreaks( false ),
36
37 m_fieldsOrdered(),
38 m_fieldsLabels(),
39 m_fieldsGroupBy(),
40 m_sortField(),
41 m_sortAsc( true ),
42 m_filterString(),
43 m_excludeDNP( false ),
44 m_includeExcludedFromBOM( false )
45{
46 m_params.emplace_back( new JOB_PARAM<wxString>( "field_delimiter",
49 m_params.emplace_back( new JOB_PARAM<wxString>( "string_delimiter",
52 m_params.emplace_back( new JOB_PARAM<wxString>( "ref_delimiter",
55 m_params.emplace_back( new JOB_PARAM<wxString>( "ref_range_delimiter",
58 m_params.emplace_back( new JOB_PARAM<bool>( "keep_tabs", &m_keepTabs, m_keepTabs ) );
59 m_params.emplace_back( new JOB_PARAM<bool>( "keep_line_breaks",
62 m_params.emplace_back( new JOB_PARAM<std::vector<wxString>>( "fields_ordered",
65 m_params.emplace_back( new JOB_PARAM<std::vector<wxString>>( "fields_labels",
68 m_params.emplace_back( new JOB_PARAM<std::vector<wxString>>( "fields_group_by",
71 m_params.emplace_back( new JOB_PARAM<wxString>( "sort_field", &m_sortField, m_sortField ) );
72 m_params.emplace_back( new JOB_PARAM<bool>( "sort_asc", &m_sortAsc, m_sortAsc ) );
73 m_params.emplace_back( new JOB_PARAM<wxString>( "filter_string",
76 m_params.emplace_back( new JOB_PARAM<bool>( "exclude_dnp", &m_excludeDNP, m_excludeDNP ) );
77 m_params.emplace_back( new JOB_PARAM<bool>( "include_excluded_from_bom",
80
81}
82
83
85{
86 return wxString::Format( _( "Schematic BOM export" ) );
87}
88
89REGISTER_JOB( sch_export_bom, _HKI( "Schematic: Export BOM" ), KIWAY::FACE_SCH, JOB_EXPORT_SCH_BOM );
std::vector< wxString > m_fieldsLabels
std::vector< wxString > m_fieldsOrdered
wxString GetDescription() override
std::vector< wxString > m_fieldsGroupBy
Definition: job.h:45
An simple container class that lets us dispatch output jobs to kifaces.
Definition: job.h:79
std::vector< JOB_PARAM_BASE * > m_params
Definition: job.h:134
@ FACE_SCH
eeschema DSO
Definition: kiway.h:291
#define _HKI(x)
#define _(s)
Some functions to handle hotkeys in KiCad.
#define REGISTER_JOB(job_name, title, face, T)
Definition: job_registry.h:64