KiCad PCB EDA Suite
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 (C) 2014-2021 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 
26 #include <widgets/color_swatch.h>
30 
33  m_settings( aFrame->GetAdapter() ),
34  m_canvas( aFrame->GetCanvas() )
35 {
36  m_selectionColorSwatch->SetDefaultColor( COLOR4D( 0.0, 1.0, 0.0, 1.0 ) );
38 }
39 
40 
42 {
46 
47  m_choiceAntiAliasing->SetSelection( static_cast<int>( m_settings.GetAntiAliasingMode() ) );
51  1.0 ),
52  false );
53 
54  m_checkBoxDisableAAMove->SetValue(
58  m_checkBoxDisableMoveVias->SetValue(
62 
63  return true;
64 }
65 
66 
68 {
72 
74  static_cast<ANTIALIASING_MODE>( m_choiceAntiAliasing->GetSelection() ) );
78 
80  m_checkBoxDisableAAMove->GetValue() );
82  m_checkBoxDisableMoveThickness->GetValue() );
84  m_checkBoxDisableMoveVias->GetValue() );
86  m_checkBoxDisableMoveHoles->GetValue() );
87 
88  return true;
89 }
void SetSwatchColor(const KIGFX::COLOR4D &aColor, bool aSendEvent)
Set the current swatch color directly.
bool GetFlag(DISPLAY3D_FLG aFlag) const
Get a configuration status of a flag.
PANEL_3D_OPENGL_OPTIONS(EDA_3D_VIEWER_FRAME *aFrame, wxWindow *aParent)
KIGFX::COLOR4D GetSwatchColor() const
bool TransferDataToWindow() override
Automatically called after creating the dialog.
void SetAntiAliasingMode(ANTIALIASING_MODE aAAmode)
Set the current antialiasing mode value.
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
Set the status of a flag.
double g
Green component.
Definition: color4d.h:378
double b
Blue component.
Definition: color4d.h:379
Class PANEL_3D_OPENGL_OPTIONS_BASE.
void SetSupportsOpacity(bool aSupportsOpacity)
Definition: color_swatch.h:122
Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard.
void SetDefaultColor(const KIGFX::COLOR4D &aColor)
Sets the color that will be chosen with the "Reset to Default" button in the chooser.
ANTIALIASING_MODE GetAntiAliasingMode() const
Get the current antialiasing mode value.
glm::vec3 SFVEC3F
Definition: xv3d_types.h:44
SFVEC3F m_OpenGlSelectionColor
double r
Red component.
Definition: color4d.h:377
bool TransferDataFromWindow() override
Automatically called when clicking on the OK button.
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103