KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_export_odbpp.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) 2023 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 ODBPP_EXPORT_DIALOG_H
21#define ODBPP_EXPORT_DIALOG_H
23
24class PCB_EDIT_FRAME;
26class REPORTER;
28class BOARD;
29
31{
32public:
34 DIALOG_EXPORT_ODBPP( JOB_EXPORT_PCB_ODB* aJob, PCB_EDIT_FRAME* aEditFrame, wxWindow* aParent );
35
36 wxString GetOutputPath() const { return m_outputFileName->GetValue(); }
37
38 wxString GetUnitsString() const
39 {
40 if( m_choiceUnits->GetSelection() == 0 )
41 return wxT( "mm" );
42 else
43 return wxT( "inch" );
44 }
45
46 int GetPrecision() const { return m_precision->GetValue(); }
47
48
49 bool GetCompress() const { return m_cbCompress->GetValue(); }
50
51 // Runs the actual generation process; shared between GUI and CLI system
52 static void GenerateODBPPFiles( const JOB_EXPORT_PCB_ODB& aJob, BOARD* aBoard,
53 PCB_EDIT_FRAME* aParentFrame = nullptr,
54 PROGRESS_REPORTER* aProgressReporter = nullptr,
55 REPORTER* aErrorReporter = nullptr );
56
57private:
58 void onBrowseClicked( wxCommandEvent& event ) override;
59 void onOKClick( wxCommandEvent& event ) override;
60
61 bool Init();
62 bool TransferDataFromWindow() override;
63
66};
67
68#endif // ODBPP_EXPORT_DIALOG_H
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:290
Class DIALOG_EXPORT_ODBPP_BASE.
bool TransferDataFromWindow() override
static void GenerateODBPPFiles(const JOB_EXPORT_PCB_ODB &aJob, BOARD *aBoard, PCB_EDIT_FRAME *aParentFrame=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr, REPORTER *aErrorReporter=nullptr)
void onBrowseClicked(wxCommandEvent &event) override
JOB_EXPORT_PCB_ODB * m_job
wxString GetOutputPath() const
PCB_EDIT_FRAME * m_parent
wxString GetUnitsString() const
void onOKClick(wxCommandEvent &event) override
The main frame for Pcbnew.
A progress reporter interface for use in multi-threaded environments.
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:72