KiCad PCB EDA Suite
PANEL_MODEDIT_SETTINGS Class Reference

#include <panel_modedit_settings.h>

Inheritance diagram for PANEL_MODEDIT_SETTINGS:
PANEL_MODEDIT_SETTINGS_BASE

Public Member Functions

 PANEL_MODEDIT_SETTINGS (FOOTPRINT_EDIT_FRAME *aFrame, PAGED_DIALOG *aWindow)
 

Protected Attributes

wxRadioBox * m_PolarDisplay
 
wxRadioBox * m_UnitsSelection
 
wxCheckBox * m_MagneticPads
 
wxCheckBox * m_Segments_45_Only_Ctrl
 

Private Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 

Private Attributes

FOOTPRINT_EDIT_FRAMEm_frame
 

Detailed Description

Definition at line 29 of file panel_modedit_settings.h.

Constructor & Destructor Documentation

◆ PANEL_MODEDIT_SETTINGS()

PANEL_MODEDIT_SETTINGS::PANEL_MODEDIT_SETTINGS ( FOOTPRINT_EDIT_FRAME aFrame,
PAGED_DIALOG aWindow 
)

Definition at line 34 of file panel_modedit_settings.cpp.

35  :
36  PANEL_MODEDIT_SETTINGS_BASE( aParent->GetTreebook() ),
37  m_frame( aFrame )
38 {}
PANEL_MODEDIT_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL)
FOOTPRINT_EDIT_FRAME * m_frame

Member Function Documentation

◆ TransferDataFromWindow()

bool PANEL_MODEDIT_SETTINGS::TransferDataFromWindow ( )
overrideprivate

Definition at line 55 of file panel_modedit_settings.cpp.

56 {
57  // Display options
58  m_frame->SetShowPolarCoords( m_PolarDisplay->GetSelection() != 0 );
59  m_frame->SetUserUnits( m_UnitsSelection->GetSelection() == 0 ? INCHES : MILLIMETRES );
60 
61  // Editing options
64 
65  return true;
66 }
void SetUserUnits(EDA_UNITS_T aUnits)
void SetShowPolarCoords(bool aShow)
MAGNETIC_OPTIONS m_MagneticPads
PCB_GENERAL_SETTINGS & Settings()
Definition: common.h:155
FOOTPRINT_EDIT_FRAME * m_frame

References CAPTURE_ALWAYS, INCHES, m_frame, PANEL_MODEDIT_SETTINGS_BASE::m_MagneticPads, PCB_GENERAL_SETTINGS::m_MagneticPads, PANEL_MODEDIT_SETTINGS_BASE::m_PolarDisplay, PANEL_MODEDIT_SETTINGS_BASE::m_Segments_45_Only_Ctrl, PANEL_MODEDIT_SETTINGS_BASE::m_UnitsSelection, PCB_GENERAL_SETTINGS::m_Use45DegreeGraphicSegments, MILLIMETRES, NO_EFFECT, EDA_DRAW_FRAME::SetShowPolarCoords(), PCB_BASE_FRAME::Settings(), and EDA_BASE_FRAME::SetUserUnits().

◆ TransferDataToWindow()

bool PANEL_MODEDIT_SETTINGS::TransferDataToWindow ( )
overrideprivate

Definition at line 41 of file panel_modedit_settings.cpp.

42 {
43  // Display options
44  m_PolarDisplay->SetSelection( m_frame->GetShowPolarCoords() ? 1 : 0 );
45  m_UnitsSelection->SetSelection( m_frame->GetUserUnits() == INCHES ? 0 : 1 );
46 
47  // Editing options
50 
51  return true;
52 }
MAGNETIC_OPTIONS m_MagneticPads
PCB_GENERAL_SETTINGS & Settings()
Definition: common.h:155
FOOTPRINT_EDIT_FRAME * m_frame
bool GetShowPolarCoords() const
For those frames that support polar coordinates.
EDA_UNITS_T GetUserUnits() const
Return the user units currently in use.

References CAPTURE_ALWAYS, EDA_DRAW_FRAME::GetShowPolarCoords(), EDA_BASE_FRAME::GetUserUnits(), INCHES, m_frame, PANEL_MODEDIT_SETTINGS_BASE::m_MagneticPads, PCB_GENERAL_SETTINGS::m_MagneticPads, PANEL_MODEDIT_SETTINGS_BASE::m_PolarDisplay, PANEL_MODEDIT_SETTINGS_BASE::m_Segments_45_Only_Ctrl, PANEL_MODEDIT_SETTINGS_BASE::m_UnitsSelection, PCB_GENERAL_SETTINGS::m_Use45DegreeGraphicSegments, and PCB_BASE_FRAME::Settings().

Member Data Documentation

◆ m_frame

FOOTPRINT_EDIT_FRAME* PANEL_MODEDIT_SETTINGS::m_frame
private

Definition at line 31 of file panel_modedit_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_MagneticPads

wxCheckBox* PANEL_MODEDIT_SETTINGS_BASE::m_MagneticPads
protectedinherited

◆ m_PolarDisplay

wxRadioBox* PANEL_MODEDIT_SETTINGS_BASE::m_PolarDisplay
protectedinherited

◆ m_Segments_45_Only_Ctrl

wxCheckBox* PANEL_MODEDIT_SETTINGS_BASE::m_Segments_45_Only_Ctrl
protectedinherited

◆ m_UnitsSelection

wxRadioBox* PANEL_MODEDIT_SETTINGS_BASE::m_UnitsSelection
protectedinherited

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