KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_export_vrml.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) 2009-2013 Lorenzo Mercantonio
5 * Copyright (C) 2013 Jean-Pierre Charras jp.charras at wanadoo.fr
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#pragma once
27
28#include <dialog_export_vrml_base.h> // the wxFormBuilder header file
29#include <widgets/unit_binder.h>
30
31class PCB_EDIT_FRAME;
32
34{
35public:
38
39 wxFilePickerCtrl* FilePicker() { return m_filePicker; }
40
41 wxString GetSubdir3Dshapes() { return m_SubdirNameCtrl->GetValue(); }
42 int GetSetUserDefinedOrigin() { return m_cbUserDefinedOrigin->GetValue(); }
43
46
47 double GetScale()
48 {
49 // Assuming the VRML default unit is the mm
50 // this is the mm to VRML scaling factor for mm, 0.1 inch, and inch
51 double scaleList[4] = { 1.0, 0.001, 10.0/25.4, 1.0/25.4 };
52 return scaleList[ m_unitsChoice->GetSelection() ];
53 }
54
55 bool GetNoUnspecifiedOption() { return m_cbRemoveUnspecified->GetValue(); }
56 bool GetNoDNPOption() { return m_cbRemoveDNP->GetValue(); }
57 bool GetCopyFilesOption() { return m_cbCopyFiles->GetValue(); }
58 bool GetUseRelativePathsOption() { return m_cbUseRelativePaths->GetValue(); }
59
60 void OnUpdateUseRelativePath( wxUpdateUIEvent& event ) override
61 {
62 // Making path relative or absolute has no meaning when VRML files are not copied.
63 event.Enable( m_cbCopyFiles->GetValue() );
64 }
65
66 bool TransferDataFromWindow() override;
67
68private:
71};
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:112
Class DIALOG_EXPORT_VRML_BASE.
wxFilePickerCtrl * FilePicker()
void OnUpdateUseRelativePath(wxUpdateUIEvent &event) override
wxString GetSubdir3Dshapes()
bool TransferDataFromWindow() override
~DIALOG_EXPORT_VRML()=default
The main frame for Pcbnew.
int GetIntValue()
Definition: unit_binder.h:134
constexpr double IUTomm(int iu) const
Definition: base_units.h:90