KiCad PCB EDA Suite
PANEL_PL_EDITOR_DISPLAY_OPTIONS Class Reference

#include <panel_pl_editor_display_options.h>

Inheritance diagram for PANEL_PL_EDITOR_DISPLAY_OPTIONS:
RESETTABLE_PANEL

Public Member Functions

 PANEL_PL_EDITOR_DISPLAY_OPTIONS (wxWindow *aParent, APP_SETTINGS_BASE *aAppSettings)
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () 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...
 

Private Attributes

GAL_OPTIONS_PANELm_galOptsPanel
 

Detailed Description

Definition at line 30 of file panel_pl_editor_display_options.h.

Constructor & Destructor Documentation

◆ PANEL_PL_EDITOR_DISPLAY_OPTIONS()

PANEL_PL_EDITOR_DISPLAY_OPTIONS::PANEL_PL_EDITOR_DISPLAY_OPTIONS ( wxWindow *  aParent,
APP_SETTINGS_BASE aAppSettings 
)

Definition at line 32 of file panel_pl_editor_display_options.cpp.

33 :
34 RESETTABLE_PANEL( aParent )
35{
36 wxBoxSizer* bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
37 wxBoxSizer* bLeftCol = new wxBoxSizer( wxVERTICAL );
38
39 m_galOptsPanel = new GAL_OPTIONS_PANEL( this, aAppSettings );
40 bLeftCol->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
41
42 bPanelSizer->Add( bLeftCol, 1, wxEXPAND, 0 );
43 bPanelSizer->Add( 0, 0, 1, wxEXPAND, 5 );
44
45 this->SetSizer( bPanelSizer );
46 this->Layout();
47 bPanelSizer->Fit( this );
48}
RESETTABLE_PANEL(wxWindow *aParent, wxWindowID aId=wxID_ANY, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxSize(-1,-1), long aStyle=wxTAB_TRAVERSAL, const wxString &aName=wxEmptyString)

References m_galOptsPanel.

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

◆ ResetPanel()

void PANEL_PL_EDITOR_DISPLAY_OPTIONS::ResetPanel ( )
overridevirtual

Reset the contents of this panel.

Implements RESETTABLE_PANEL.

Definition at line 67 of file panel_pl_editor_display_options.cpp.

68{
70 cfg.Load(); // Loading without a file will init to defaults
71
73}
bool ResetPanel(APP_SETTINGS_BASE *aAppSettings)
virtual void Load()
Updates the parameters of this object based on the current JSON document contents.

References JSON_SETTINGS::Load(), m_galOptsPanel, and GAL_OPTIONS_PANEL::ResetPanel().

◆ TransferDataFromWindow()

bool PANEL_PL_EDITOR_DISPLAY_OPTIONS::TransferDataFromWindow ( )
override

Definition at line 59 of file panel_pl_editor_display_options.cpp.

60{
62
63 return true;
64}
bool TransferDataFromWindow() override
Read the options set in the UI into the given options object.

References m_galOptsPanel, and GAL_OPTIONS_PANEL::TransferDataFromWindow().

◆ TransferDataToWindow()

bool PANEL_PL_EDITOR_DISPLAY_OPTIONS::TransferDataToWindow ( )
override

Definition at line 51 of file panel_pl_editor_display_options.cpp.

52{
54
55 return true;
56}
bool TransferDataToWindow() override
Load the panel controls from the given opt.

References m_galOptsPanel, and GAL_OPTIONS_PANEL::TransferDataToWindow().

Member Data Documentation

◆ m_galOptsPanel

GAL_OPTIONS_PANEL* PANEL_PL_EDITOR_DISPLAY_OPTIONS::m_galOptsPanel
private

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