KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_3D_opengl_options.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) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#include <3d_enums.h>
26#include <pgm_base.h>
31
32
35{
36 m_selectionColorSwatch->SetDefaultColor( COLOR4D( 0.0, 1.0, 0.0, 1.0 ) );
37 m_selectionColorSwatch->SetSupportsOpacity( false );
38}
39
40
55
56
62
63
65{
67 {
68 cfg->m_Render.opengl_copper_thickness = m_checkBoxCuThickness->GetValue();
69 cfg->m_Render.show_model_bbox = m_checkBoxBoundingBoxes->GetValue();
70 cfg->m_Render.highlight_on_rollover = m_checkBoxHighlightOnRollOver->GetValue();
71
72 cfg->m_Render.opengl_AA_mode = static_cast<ANTIALIASING_MODE>( m_choiceAntiAliasing->GetSelection() );
73 cfg->m_Render.opengl_selection_color = m_selectionColorSwatch->GetSwatchColor();
74
75 cfg->m_Render.opengl_AA_disableOnMove = m_checkBoxDisableAAMove->GetValue();
76 cfg->m_Render.opengl_thickness_disableOnMove = m_checkBoxDisableMoveThickness->GetValue();
77 cfg->m_Render.opengl_microvias_disableOnMove = m_checkBoxDisableMoveVias->GetValue();
78 cfg->m_Render.opengl_holes_disableOnMove = m_checkBoxDisableMoveHoles->GetValue();
79 }
80
81 return true;
82}
83
84
86{
88 cfg.Load(); // Loading without a file will init to defaults
89
90 loadSettings( &cfg );
91}
declared enumerations and flags
virtual void Load()
Updates the parameters of this object based on the current JSON document contents.
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:104
PANEL_3D_OPENGL_OPTIONS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void loadSettings(EDA_3D_VIEWER_SETTINGS *aCfg)
PANEL_3D_OPENGL_OPTIONS(wxWindow *aParent)
void ResetPanel() override
Reset the contents of this panel.
ANTIALIASING_MODE
Anti-aliasing options.
see class PGM_BASE
T * GetAppSettings(const char *aFilename)