KiCad PCB EDA Suite
PANEL_GERBVIEW_EXCELLON_SETTINGS Class Reference

#include <panel_gerbview_excellon_settings.h>

Inheritance diagram for PANEL_GERBVIEW_EXCELLON_SETTINGS:
PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE RESETTABLE_PANEL

Public Member Functions

 PANEL_GERBVIEW_EXCELLON_SETTINGS (GERBVIEW_FRAME *aFrame, wxWindow *aWindow)
 
 ~PANEL_GERBVIEW_EXCELLON_SETTINGS ()
 
virtual wxString GetResetTooltip ()
 Get the tooltip the reset button should display when showing this panel. More...
 

Protected Member Functions

virtual void onUnitsChange (wxCommandEvent &event)
 

Protected Attributes

wxStaticText * m_staticText11
 
wxRadioBox * m_rbUnits
 
wxRadioBox * m_rbZeroFormat
 
wxStaticLine * m_staticline1
 
wxStaticText * m_staticText6
 
wxStaticText * m_staticText10
 
wxStaticText * m_staticText7
 
wxStaticText * m_staticTextUnitsmm
 
wxChoice * m_choiceIntegerMM
 
wxStaticText * m_staticText8
 
wxChoice * m_choiceMantissaMM
 
wxStaticText * m_staticTextUnitsInch
 
wxChoice * m_choiceIntegerInch
 
wxStaticText * m_staticText9
 
wxChoice * m_choiceMantissaInch
 

Private Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
void ResetPanel () override
 Reset the contents of this panel. More...
 
void applySettingsToPanel (const EXCELLON_DEFAULTS &aSettings)
 

Private Attributes

GERBVIEW_FRAMEm_Parent
 

Detailed Description

Definition at line 34 of file panel_gerbview_excellon_settings.h.

Constructor & Destructor Documentation

◆ PANEL_GERBVIEW_EXCELLON_SETTINGS()

PANEL_GERBVIEW_EXCELLON_SETTINGS::PANEL_GERBVIEW_EXCELLON_SETTINGS ( GERBVIEW_FRAME aFrame,
wxWindow *  aWindow 
)

Definition at line 29 of file panel_gerbview_excellon_settings.cpp.

30  :
31  PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE( aWindow, wxID_ANY ),
32  m_Parent( aFrame )
33 {
34 }
PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(440, 336), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)

◆ ~PANEL_GERBVIEW_EXCELLON_SETTINGS()

PANEL_GERBVIEW_EXCELLON_SETTINGS::~PANEL_GERBVIEW_EXCELLON_SETTINGS ( )
inline

Definition at line 38 of file panel_gerbview_excellon_settings.h.

38 {};

Member Function Documentation

◆ applySettingsToPanel()

void PANEL_GERBVIEW_EXCELLON_SETTINGS::applySettingsToPanel ( const EXCELLON_DEFAULTS aSettings)
private

Definition at line 73 of file panel_gerbview_excellon_settings.cpp.

74 {
75  m_rbUnits->SetSelection( aSettings.m_UnitsMM ? 1 : 0 );
76  m_rbZeroFormat->SetSelection( aSettings.m_LeadingZero );
77 
78  // The first value of these param is 2, not 0
79  #define FIRST_VALUE 2
80  m_choiceIntegerMM->SetSelection( aSettings.m_MmIntegerLen-FIRST_VALUE );
81  m_choiceMantissaMM->SetSelection( aSettings.m_MmMantissaLen-FIRST_VALUE );
82  m_choiceIntegerInch->SetSelection( aSettings.m_InchIntegerLen-FIRST_VALUE );
83  m_choiceMantissaInch->SetSelection( aSettings.m_InchMantissaLen-FIRST_VALUE );
84 }
#define FIRST_VALUE

References FIRST_VALUE, PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceIntegerInch, PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceIntegerMM, PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceMantissaInch, PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceMantissaMM, EXCELLON_DEFAULTS::m_InchIntegerLen, EXCELLON_DEFAULTS::m_InchMantissaLen, EXCELLON_DEFAULTS::m_LeadingZero, EXCELLON_DEFAULTS::m_MmIntegerLen, EXCELLON_DEFAULTS::m_MmMantissaLen, PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_rbUnits, PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_rbZeroFormat, and EXCELLON_DEFAULTS::m_UnitsMM.

Referenced by ResetPanel(), and TransferDataToWindow().

◆ GetResetTooltip()

virtual wxString RESETTABLE_PANEL::GetResetTooltip ( )
inlinevirtualinherited

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

Returns
the tooltip

Reimplemented in PANEL_HOTKEYS_EDITOR, and PANEL_COLOR_SETTINGS.

Definition at line 52 of file resettable_panel.h.

53  {
54  return _( "Reset all settings on this page to their default" );
55  }
#define _(s)

References _.

◆ onUnitsChange()

virtual void PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::onUnitsChange ( wxCommandEvent &  event)
inlineprotectedvirtualinherited

◆ ResetPanel()

void PANEL_GERBVIEW_EXCELLON_SETTINGS::ResetPanel ( )
overrideprivatevirtual

Reset the contents of this panel.

Implements RESETTABLE_PANEL.

Definition at line 66 of file panel_gerbview_excellon_settings.cpp.

67 {
68  EXCELLON_DEFAULTS defaults;
69  applySettingsToPanel( defaults );
70 }
void applySettingsToPanel(const EXCELLON_DEFAULTS &aSettings)
management of default values used to read a Excellon (.nc) drill file Some important parameters are n...

References applySettingsToPanel().

◆ TransferDataFromWindow()

bool PANEL_GERBVIEW_EXCELLON_SETTINGS::TransferDataFromWindow ( )
overrideprivate

Definition at line 49 of file panel_gerbview_excellon_settings.cpp.

50 {
51  GERBVIEW_SETTINGS* config = static_cast<GERBVIEW_SETTINGS*>( m_Parent->config() );
52 
53  config->m_ExcellonDefaults.m_UnitsMM = m_rbUnits->GetSelection() != 0;
54  config->m_ExcellonDefaults.m_LeadingZero = m_rbZeroFormat->GetSelection();
55  // The first value of these param is 2, not 0
56  #define FIRST_VALUE 2
57  config->m_ExcellonDefaults.m_MmIntegerLen = m_choiceIntegerMM->GetSelection()+FIRST_VALUE;
58  config->m_ExcellonDefaults.m_MmMantissaLen = m_choiceMantissaMM->GetSelection()+FIRST_VALUE;
59  config->m_ExcellonDefaults.m_InchIntegerLen = m_choiceIntegerInch->GetSelection()+FIRST_VALUE;
60  config->m_ExcellonDefaults.m_InchMantissaLen = m_choiceMantissaInch->GetSelection()+FIRST_VALUE;
61 
62  return true;
63 }
virtual APP_SETTINGS_BASE * config() const
Returns the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
#define FIRST_VALUE

References config, EDA_BASE_FRAME::config(), FIRST_VALUE, PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceIntegerInch, PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceIntegerMM, PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceMantissaInch, PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceMantissaMM, m_Parent, PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_rbUnits, and PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_rbZeroFormat.

◆ TransferDataToWindow()

bool PANEL_GERBVIEW_EXCELLON_SETTINGS::TransferDataToWindow ( )
overrideprivate

Definition at line 37 of file panel_gerbview_excellon_settings.cpp.

38 {
39  GERBVIEW_SETTINGS* config = static_cast<GERBVIEW_SETTINGS*>( m_Parent->config() );
40  EXCELLON_DEFAULTS curr_settings;
41  config->GetExcellonDefaults( curr_settings );
42 
43  applySettingsToPanel( curr_settings );
44 
45  return true;
46 }
void applySettingsToPanel(const EXCELLON_DEFAULTS &aSettings)
virtual APP_SETTINGS_BASE * config() const
Returns the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
management of default values used to read a Excellon (.nc) drill file Some important parameters are n...

References applySettingsToPanel(), config, EDA_BASE_FRAME::config(), and m_Parent.

Member Data Documentation

◆ m_choiceIntegerInch

◆ m_choiceIntegerMM

◆ m_choiceMantissaInch

wxChoice* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceMantissaInch
protectedinherited

◆ m_choiceMantissaMM

wxChoice* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceMantissaMM
protectedinherited

◆ m_Parent

GERBVIEW_FRAME* PANEL_GERBVIEW_EXCELLON_SETTINGS::m_Parent
private

◆ m_rbUnits

wxRadioBox* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_rbUnits
protectedinherited

◆ m_rbZeroFormat

wxRadioBox* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_rbZeroFormat
protectedinherited

◆ m_staticline1

wxStaticLine* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticline1
protectedinherited

◆ m_staticText10

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText10
protectedinherited

◆ m_staticText11

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText11
protectedinherited

◆ m_staticText6

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText6
protectedinherited

◆ m_staticText7

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText7
protectedinherited

◆ m_staticText8

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText8
protectedinherited

◆ m_staticText9

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText9
protectedinherited

◆ m_staticTextUnitsInch

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticTextUnitsInch
protectedinherited

◆ m_staticTextUnitsmm

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticTextUnitsmm
protectedinherited

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