KiCad PCB EDA Suite
PANEL_3D_OPENGL_OPTIONS Class Reference

#include <panel_3D_opengl_options.h>

Inheritance diagram for PANEL_3D_OPENGL_OPTIONS:
PANEL_3D_OPENGL_OPTIONS_BASE RESETTABLE_PANEL

Public Member Functions

 PANEL_3D_OPENGL_OPTIONS (wxWindow *aParent)
 
bool TransferDataFromWindow () override
 
bool TransferDataToWindow () override
 
void ResetPanel () override
 Reset the contents of this panel. More...
 
virtual wxString GetResetTooltip () const
 Get the tooltip the reset button should display when showing this panel. More...
 
wxString GetHelpTextAtPoint (const wxPoint &aPt, wxHelpEvent::Origin aOrigin) const override
 Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }. More...
 

Protected Attributes

wxCheckBox * m_checkBoxBoundingBoxes
 
wxCheckBox * m_checkBoxCuThickness
 
wxCheckBox * m_checkBoxHighlightOnRollOver
 
wxStaticText * m_staticText221
 
wxChoice * m_choiceAntiAliasing
 
wxStaticText * m_selectionColorLabel
 
COLOR_SWATCHm_selectionColorSwatch
 
wxCheckBox * m_checkBoxDisableAAMove
 
wxCheckBox * m_checkBoxDisableMoveThickness
 
wxCheckBox * m_checkBoxDisableMoveVias
 
wxCheckBox * m_checkBoxDisableMoveHoles
 

Private Member Functions

void loadSettings (EDA_3D_VIEWER_SETTINGS *aCfg)
 

Detailed Description

Definition at line 31 of file panel_3D_opengl_options.h.

Constructor & Destructor Documentation

◆ PANEL_3D_OPENGL_OPTIONS()

PANEL_3D_OPENGL_OPTIONS::PANEL_3D_OPENGL_OPTIONS ( wxWindow *  aParent)
explicit

Definition at line 33 of file panel_3D_opengl_options.cpp.

33 :
35{
36 m_selectionColorSwatch->SetDefaultColor( COLOR4D( 0.0, 1.0, 0.0, 1.0 ) );
38}
void SetSupportsOpacity(bool aSupportsOpacity)
Definition: color_swatch.h:122
void SetDefaultColor(const KIGFX::COLOR4D &aColor)
Sets the color that will be chosen with the "Reset to Default" button in the chooser.
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)

References PANEL_3D_OPENGL_OPTIONS_BASE::m_selectionColorSwatch, COLOR_SWATCH::SetDefaultColor(), and COLOR_SWATCH::SetSupportsOpacity().

Member Function Documentation

◆ GetHelpTextAtPoint()

wxString RESETTABLE_PANEL::GetHelpTextAtPoint ( const wxPoint &  aPt,
wxHelpEvent::Origin  aOrigin 
) const
inlineoverrideinherited

Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }.

Definition at line 72 of file resettable_panel.h.

73 {
74 if( aPt == wxPoint( -INT_MAX, INT_MAX ) )
75 return GetResetTooltip();
76 else
77 return wxPanel::GetHelpTextAtPoint( aPt, aOrigin );
78 }
virtual wxString GetResetTooltip() const
Get the tooltip the reset button should display when showing this panel.

References RESETTABLE_PANEL::GetResetTooltip().

◆ GetResetTooltip()

virtual wxString RESETTABLE_PANEL::GetResetTooltip ( ) const
inlinevirtualinherited

Get the tooltip the reset button should display when showing this panel.

Returns
the tooltip

Reimplemented in PANEL_COLOR_SETTINGS, and PANEL_HOTKEYS_EDITOR.

Definition at line 64 of file resettable_panel.h.

65 {
66 return _( "Reset all settings on this page to their default" );
67 }
#define _(s)

References _.

Referenced by RESETTABLE_PANEL::GetHelpTextAtPoint().

◆ loadSettings()

void PANEL_3D_OPENGL_OPTIONS::loadSettings ( EDA_3D_VIEWER_SETTINGS aCfg)
private

Definition at line 41 of file panel_3D_opengl_options.cpp.

42{
46
47 m_choiceAntiAliasing->SetSelection( static_cast<int>( aCfg->m_Render.opengl_AA_mode ) );
49
54}
void SetSwatchColor(const KIGFX::COLOR4D &aColor, bool aSendEvent)
Set the current swatch color directly.

References PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxBoundingBoxes, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxCuThickness, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableAAMove, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableMoveHoles, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableMoveThickness, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableMoveVias, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxHighlightOnRollOver, PANEL_3D_OPENGL_OPTIONS_BASE::m_choiceAntiAliasing, EDA_3D_VIEWER_SETTINGS::m_Render, PANEL_3D_OPENGL_OPTIONS_BASE::m_selectionColorSwatch, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_AA_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_AA_mode, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_copper_thickness, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_highlight_on_rollover, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_holes_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_selection_color, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_show_model_bbox, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_thickness_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_vias_disableOnMove, and COLOR_SWATCH::SetSwatchColor().

Referenced by ResetPanel(), and TransferDataToWindow().

◆ ResetPanel()

void PANEL_3D_OPENGL_OPTIONS::ResetPanel ( )
overridevirtual

Reset the contents of this panel.

Implements RESETTABLE_PANEL.

Definition at line 87 of file panel_3D_opengl_options.cpp.

88{
90 cfg.Load(); // Loading without a file will init to defaults
91
92 loadSettings( &cfg );
93}
virtual void Load()
Updates the parameters of this object based on the current JSON document contents.
void loadSettings(EDA_3D_VIEWER_SETTINGS *aCfg)

References JSON_SETTINGS::Load(), and loadSettings().

◆ TransferDataFromWindow()

bool PANEL_3D_OPENGL_OPTIONS::TransferDataFromWindow ( )
override

Definition at line 67 of file panel_3D_opengl_options.cpp.

68{
69 EDA_3D_VIEWER_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
70
74
75 cfg->m_Render.opengl_AA_mode = static_cast<ANTIALIASING_MODE>( m_choiceAntiAliasing->GetSelection() );
77
82
83 return true;
84}
KIGFX::COLOR4D GetSwatchColor() const
ANTIALIASING_MODE
Anti-aliasing options.
Definition: ogl_attr_list.h:35
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:111

References COLOR_SWATCH::GetSwatchColor(), PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxBoundingBoxes, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxCuThickness, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableAAMove, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableMoveHoles, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableMoveThickness, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableMoveVias, PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxHighlightOnRollOver, PANEL_3D_OPENGL_OPTIONS_BASE::m_choiceAntiAliasing, EDA_3D_VIEWER_SETTINGS::m_Render, PANEL_3D_OPENGL_OPTIONS_BASE::m_selectionColorSwatch, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_AA_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_AA_mode, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_copper_thickness, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_highlight_on_rollover, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_holes_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_selection_color, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_show_model_bbox, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_thickness_disableOnMove, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_vias_disableOnMove, and Pgm().

◆ TransferDataToWindow()

bool PANEL_3D_OPENGL_OPTIONS::TransferDataToWindow ( )
override

Definition at line 57 of file panel_3D_opengl_options.cpp.

58{
59 EDA_3D_VIEWER_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
60
61 loadSettings( cfg );
62
63 return true;
64}

References loadSettings(), and Pgm().

Member Data Documentation

◆ m_checkBoxBoundingBoxes

wxCheckBox* PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxBoundingBoxes
protectedinherited

◆ m_checkBoxCuThickness

wxCheckBox* PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxCuThickness
protectedinherited

◆ m_checkBoxDisableAAMove

wxCheckBox* PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableAAMove
protectedinherited

◆ m_checkBoxDisableMoveHoles

wxCheckBox* PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableMoveHoles
protectedinherited

◆ m_checkBoxDisableMoveThickness

wxCheckBox* PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableMoveThickness
protectedinherited

◆ m_checkBoxDisableMoveVias

wxCheckBox* PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxDisableMoveVias
protectedinherited

◆ m_checkBoxHighlightOnRollOver

wxCheckBox* PANEL_3D_OPENGL_OPTIONS_BASE::m_checkBoxHighlightOnRollOver
protectedinherited

◆ m_choiceAntiAliasing

wxChoice* PANEL_3D_OPENGL_OPTIONS_BASE::m_choiceAntiAliasing
protectedinherited

◆ m_selectionColorLabel

wxStaticText* PANEL_3D_OPENGL_OPTIONS_BASE::m_selectionColorLabel
protectedinherited

◆ m_selectionColorSwatch

COLOR_SWATCH* PANEL_3D_OPENGL_OPTIONS_BASE::m_selectionColorSwatch
protectedinherited

◆ m_staticText221

wxStaticText* PANEL_3D_OPENGL_OPTIONS_BASE::m_staticText221
protectedinherited

The documentation for this class was generated from the following files: