KiCad PCB EDA Suite
PANEL_3D_DISPLAY_OPTIONS Class Reference

#include <panel_3D_display_options.h>

Inheritance diagram for PANEL_3D_DISPLAY_OPTIONS:
PANEL_3D_DISPLAY_OPTIONS_BASE RESETTABLE_PANEL

Public Member Functions

 PANEL_3D_DISPLAY_OPTIONS (wxWindow *aParent)
 
void OnCheckEnableAnimation (wxCommandEvent &WXUNUSED(event)) override
 
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 Member Functions

virtual void OnCheckRealisticMode (wxCommandEvent &event)
 
virtual void OnCheckEnableAnimation (wxCommandEvent &event)
 

Protected Attributes

wxCheckBox * m_checkBoxSilkscreen
 
wxCheckBox * m_checkBoxSubtractMaskFromSilk
 
wxCheckBox * m_checkBoxClipSilkOnViaAnnulus
 
wxCheckBox * m_checkBoxSolderMask
 
wxCheckBox * m_checkBoxSolderpaste
 
wxCheckBox * m_checkBoxAdhesive
 
wxCheckBox * m_checkBoxComments
 
wxCheckBox * m_checkBoxECO
 
wxCheckBox * m_checkBoxRealisticMode
 
wxCheckBox * m_checkBoxBoardBody
 
wxCheckBox * m_checkBoxAreas
 
wxCheckBox * m_checkBoxRenderPlatedPadsAsPlated
 
wxStaticText * m_materialPropertiesLabel
 
wxChoice * m_materialProperties
 
wxStaticText * m_staticTextRotAngle
 
wxSpinCtrlDouble * m_spinCtrlRotationAngle
 
wxStaticText * m_staticTextRotAngleUnits
 
wxStaticLine * m_staticline3
 
wxCheckBox * m_checkBoxEnableAnimation
 
wxStaticText * m_staticAnimationSpeed
 
wxSlider * m_sliderAnimationSpeed
 

Private Member Functions

void loadViewSettings (EDA_3D_VIEWER_SETTINGS *aCfg)
 

Detailed Description

Definition at line 32 of file panel_3D_display_options.h.

Constructor & Destructor Documentation

◆ PANEL_3D_DISPLAY_OPTIONS()

PANEL_3D_DISPLAY_OPTIONS::PANEL_3D_DISPLAY_OPTIONS ( wxWindow *  aParent)
explicit

Definition at line 32 of file panel_3D_display_options.cpp.

32 :
34{
35}
PANEL_3D_DISPLAY_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)

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().

◆ loadViewSettings()

void PANEL_3D_DISPLAY_OPTIONS::loadViewSettings ( EDA_3D_VIEWER_SETTINGS aCfg)
private

Definition at line 45 of file panel_3D_display_options.cpp.

46{
47 // Check/uncheck checkboxes
50 m_checkBoxAreas->SetValue( aCfg->m_Render.show_zones );
54 m_checkBoxAdhesive->SetValue( aCfg->m_Render.show_adhesive );
55 m_checkBoxComments->SetValue( aCfg->m_Render.show_comments );
56 m_checkBoxECO->SetValue( aCfg->m_Render.show_eco );
60
61 m_materialProperties->SetSelection( static_cast<int>( aCfg->m_Render.material_mode ) );
62
63 // Camera Options
69}

References EDA_3D_VIEWER_SETTINGS::CAMERA_SETTINGS::animation_enabled, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::clip_silk_on_via_annulus, EDA_3D_VIEWER_SETTINGS::m_Camera, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxAdhesive, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxAreas, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxBoardBody, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxClipSilkOnViaAnnulus, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxComments, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxECO, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxEnableAnimation, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxRealisticMode, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxRenderPlatedPadsAsPlated, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSilkscreen, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSolderMask, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSolderpaste, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSubtractMaskFromSilk, PANEL_3D_DISPLAY_OPTIONS_BASE::m_materialProperties, EDA_3D_VIEWER_SETTINGS::m_Render, PANEL_3D_DISPLAY_OPTIONS_BASE::m_sliderAnimationSpeed, PANEL_3D_DISPLAY_OPTIONS_BASE::m_spinCtrlRotationAngle, PANEL_3D_DISPLAY_OPTIONS_BASE::m_staticAnimationSpeed, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::material_mode, EDA_3D_VIEWER_SETTINGS::CAMERA_SETTINGS::moving_speed_multiplier, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::realistic, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::renderPlatedPadsAsPlated, EDA_3D_VIEWER_SETTINGS::CAMERA_SETTINGS::rotation_increment, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_adhesive, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_board_body, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_comments, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_eco, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_silkscreen, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_soldermask, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_solderpaste, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_zones, and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::subtract_mask_from_silk.

Referenced by ResetPanel(), and TransferDataToWindow().

◆ OnCheckEnableAnimation() [1/2]

virtual void PANEL_3D_DISPLAY_OPTIONS_BASE::OnCheckEnableAnimation ( wxCommandEvent &  event)
inlineprotectedvirtualinherited

◆ OnCheckEnableAnimation() [2/2]

void PANEL_3D_DISPLAY_OPTIONS::OnCheckEnableAnimation ( wxCommandEvent &  WXUNUSEDevent)
override

◆ OnCheckRealisticMode()

virtual void PANEL_3D_DISPLAY_OPTIONS_BASE::OnCheckRealisticMode ( wxCommandEvent &  event)
inlineprotectedvirtualinherited

◆ ResetPanel()

void PANEL_3D_DISPLAY_OPTIONS::ResetPanel ( )
overridevirtual

Reset the contents of this panel.

Implements RESETTABLE_PANEL.

Definition at line 115 of file panel_3D_display_options.cpp.

116{
118 cfg.Load(); // Loading without a file will init to defaults
119
120 loadViewSettings( &cfg );
121}
virtual void Load()
Updates the parameters of this object based on the current JSON document contents.
void loadViewSettings(EDA_3D_VIEWER_SETTINGS *aCfg)

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

◆ TransferDataFromWindow()

bool PANEL_3D_DISPLAY_OPTIONS::TransferDataFromWindow ( )
override

Definition at line 82 of file panel_3D_display_options.cpp.

83{
84 EDA_3D_VIEWER_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
85
86 // Set render mode
88
89 // Set visibility of items
91 cfg->m_Render.show_zones = m_checkBoxAreas->GetValue();
95
96 cfg->m_Render.material_mode = static_cast<MATERIAL_MODE>( m_materialProperties->GetSelection() );
97
98 // Set Layer visibility
102 cfg->m_Render.show_adhesive = m_checkBoxAdhesive->GetValue();
103 cfg->m_Render.show_comments = m_checkBoxComments->GetValue();
104 cfg->m_Render.show_eco = m_checkBoxECO->GetValue( );
105
106 // Camera Options
110
111 return true;
112}
MATERIAL_MODE
Render 3d model shape materials mode.
Definition: 3d_enums.h:71
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:111

References EDA_3D_VIEWER_SETTINGS::CAMERA_SETTINGS::animation_enabled, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::clip_silk_on_via_annulus, EDA_3D_VIEWER_SETTINGS::m_Camera, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxAdhesive, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxAreas, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxBoardBody, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxClipSilkOnViaAnnulus, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxComments, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxECO, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxEnableAnimation, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxRealisticMode, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxRenderPlatedPadsAsPlated, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSilkscreen, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSolderMask, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSolderpaste, PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSubtractMaskFromSilk, PANEL_3D_DISPLAY_OPTIONS_BASE::m_materialProperties, EDA_3D_VIEWER_SETTINGS::m_Render, PANEL_3D_DISPLAY_OPTIONS_BASE::m_sliderAnimationSpeed, PANEL_3D_DISPLAY_OPTIONS_BASE::m_spinCtrlRotationAngle, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::material_mode, EDA_3D_VIEWER_SETTINGS::CAMERA_SETTINGS::moving_speed_multiplier, Pgm(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::realistic, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::renderPlatedPadsAsPlated, EDA_3D_VIEWER_SETTINGS::CAMERA_SETTINGS::rotation_increment, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_adhesive, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_board_body, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_comments, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_eco, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_silkscreen, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_soldermask, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_solderpaste, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_zones, and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::subtract_mask_from_silk.

◆ TransferDataToWindow()

bool PANEL_3D_DISPLAY_OPTIONS::TransferDataToWindow ( )
override

Definition at line 72 of file panel_3D_display_options.cpp.

73{
74 EDA_3D_VIEWER_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
75
76 loadViewSettings( cfg );
77
78 return true;
79}

References loadViewSettings(), and Pgm().

Member Data Documentation

◆ m_checkBoxAdhesive

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxAdhesive
protectedinherited

◆ m_checkBoxAreas

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxAreas
protectedinherited

◆ m_checkBoxBoardBody

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxBoardBody
protectedinherited

◆ m_checkBoxClipSilkOnViaAnnulus

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxClipSilkOnViaAnnulus
protectedinherited

◆ m_checkBoxComments

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxComments
protectedinherited

◆ m_checkBoxECO

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxECO
protectedinherited

◆ m_checkBoxEnableAnimation

◆ m_checkBoxRealisticMode

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxRealisticMode
protectedinherited

◆ m_checkBoxRenderPlatedPadsAsPlated

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxRenderPlatedPadsAsPlated
protectedinherited

◆ m_checkBoxSilkscreen

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSilkscreen
protectedinherited

◆ m_checkBoxSolderMask

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSolderMask
protectedinherited

◆ m_checkBoxSolderpaste

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSolderpaste
protectedinherited

◆ m_checkBoxSubtractMaskFromSilk

wxCheckBox* PANEL_3D_DISPLAY_OPTIONS_BASE::m_checkBoxSubtractMaskFromSilk
protectedinherited

◆ m_materialProperties

wxChoice* PANEL_3D_DISPLAY_OPTIONS_BASE::m_materialProperties
protectedinherited

◆ m_materialPropertiesLabel

wxStaticText* PANEL_3D_DISPLAY_OPTIONS_BASE::m_materialPropertiesLabel
protectedinherited

◆ m_sliderAnimationSpeed

wxSlider* PANEL_3D_DISPLAY_OPTIONS_BASE::m_sliderAnimationSpeed
protectedinherited

◆ m_spinCtrlRotationAngle

wxSpinCtrlDouble* PANEL_3D_DISPLAY_OPTIONS_BASE::m_spinCtrlRotationAngle
protectedinherited

◆ m_staticAnimationSpeed

wxStaticText* PANEL_3D_DISPLAY_OPTIONS_BASE::m_staticAnimationSpeed
protectedinherited

◆ m_staticline3

wxStaticLine* PANEL_3D_DISPLAY_OPTIONS_BASE::m_staticline3
protectedinherited

◆ m_staticTextRotAngle

wxStaticText* PANEL_3D_DISPLAY_OPTIONS_BASE::m_staticTextRotAngle
protectedinherited

◆ m_staticTextRotAngleUnits

wxStaticText* PANEL_3D_DISPLAY_OPTIONS_BASE::m_staticTextRotAngleUnits
protectedinherited

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