KiCad PCB EDA Suite
Loading...
Searching...
No Matches
job_export_pcb_odb.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 The 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
21#include <jobs/job_registry.h>
22#include <i18n_utility.h>
24
37
38
40 JOB( "odb", false ),
41 m_filename(),
44 m_precision( 4 ),
46{
47 m_params.emplace_back( new JOB_PARAM<wxString>( "drawing_sheet", &m_drawingSheet, m_drawingSheet ) );
48 m_params.emplace_back( new JOB_PARAM<ODB_UNITS>( "units", &m_units, m_units ) );
49 m_params.emplace_back( new JOB_PARAM<int>( "precision", &m_precision, m_precision ) );
50 m_params.emplace_back( new JOB_PARAM<ODB_COMPRESSION>( "compression", &m_compressionMode,
52}
53
54
56{
57 return _( "Export ODB++" );
58}
59
60
62{
63 return _( "Export ODB++ Job Settings" );
64}
65
66
67void JOB_EXPORT_PCB_ODB::SetDefaultOutputPath( const wxString& aReferenceName )
68{
69 wxFileName fn = aReferenceName;
70
71 fn.SetExt( "zip" );
72
73 SetConfiguredOutputPath( fn.GetFullName() );
74}
75
76REGISTER_JOB( pcb_export_odb, _HKI( "PCB: Export ODB++" ), KIWAY::FACE_PCB,
void SetDefaultOutputPath(const wxString &aReferenceName)
wxString GetSettingsDialogTitle() const override
ODB_COMPRESSION m_compressionMode
wxString GetDefaultDescription() const override
void SetConfiguredOutputPath(const wxString &aPath)
Sets the configured output path for the job, this path is always saved to file.
Definition job.cpp:153
std::vector< JOB_PARAM_BASE * > m_params
Definition job.h:267
JOB(const std::string &aType, bool aOutputIsDirectory)
Definition job.cpp:26
@ FACE_PCB
pcbnew DSO
Definition kiway.h:294
#define _(s)
Some functions to handle hotkeys in KiCad.
NLOHMANN_JSON_SERIALIZE_ENUM(JOB_EXPORT_PCB_ODB::ODB_UNITS, { { JOB_EXPORT_PCB_ODB::ODB_UNITS::INCH, "in" }, { JOB_EXPORT_PCB_ODB::ODB_UNITS::MM, "mm" }, }) NLOHMANN_JSON_SERIALIZE_ENUM(JOB_EXPORT_PCB_ODB
#define REGISTER_JOB(job_name, title, face, T)
#define _HKI(x)
Definition page_info.cpp:44
Definition of file extensions used in Kicad.