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
 
wxCheckBox * m_dragSelects
 

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

bool PANEL_MODEDIT_SETTINGS::TransferDataFromWindow ( )
overrideprivate

Definition at line 58 of file panel_modedit_settings.cpp.

References CAPTURE_ALWAYS, PCB_BASE_FRAME::GetDisplayOptions(), INCHES, PANEL_MODEDIT_SETTINGS_BASE::m_dragSelects, PCB_GENERAL_SETTINGS::m_dragSelects, 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, PCB_BASE_FRAME::Settings(), and EDA_DRAW_FRAME::SetUserUnits().

59 {
60  // Display options
61  auto displ_opts = (PCB_DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
62  displ_opts->m_DisplayPolarCood = m_PolarDisplay->GetSelection() != 0;
63 
64  m_frame->SetUserUnits( m_UnitsSelection->GetSelection() == 0 ? INCHES : MILLIMETRES );
65 
66  // Editing options
70 
71  return true;
72 }
MAGNETIC_PAD_OPTION_VALUES m_magneticPads
void * GetDisplayOptions() override
Function GetDisplayOptions returns the display options current in use Display options are relative to...
static bool m_use45DegreeGraphicSegments
Class PCB_DISPLAY_OPTIONS handles display options like enable/disable some optional drawings...
PCB_GENERAL_SETTINGS & Settings()
Definition: common.h:160
FOOTPRINT_EDIT_FRAME * m_frame
void SetUserUnits(EDA_UNITS_T aUnits)
Definition: draw_frame.h:285
bool PANEL_MODEDIT_SETTINGS::TransferDataToWindow ( )
overrideprivate

Definition at line 41 of file panel_modedit_settings.cpp.

References CAPTURE_ALWAYS, PCB_BASE_FRAME::GetDisplayOptions(), EDA_DRAW_FRAME::GetUserUnits(), INCHES, PANEL_MODEDIT_SETTINGS_BASE::m_dragSelects, PCB_GENERAL_SETTINGS::m_dragSelects, 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().

42 {
43  auto displ_opts = (PCB_DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
44 
45  // Display options
46  m_PolarDisplay->SetSelection( displ_opts->m_DisplayPolarCood ? 1 : 0 );
47  m_UnitsSelection->SetSelection( m_frame->GetUserUnits() == INCHES ? 0 : 1 );
48 
49  // Editing options
53 
54  return true;
55 }
MAGNETIC_PAD_OPTION_VALUES m_magneticPads
void * GetDisplayOptions() override
Function GetDisplayOptions returns the display options current in use Display options are relative to...
static bool m_use45DegreeGraphicSegments
Class PCB_DISPLAY_OPTIONS handles display options like enable/disable some optional drawings...
PCB_GENERAL_SETTINGS & Settings()
EDA_UNITS_T GetUserUnits() const override
Return the user units currently in use.
Definition: draw_frame.h:284
Definition: common.h:160
FOOTPRINT_EDIT_FRAME * m_frame

Member Data Documentation

wxCheckBox* PANEL_MODEDIT_SETTINGS_BASE::m_dragSelects
protectedinherited
FOOTPRINT_EDIT_FRAME* PANEL_MODEDIT_SETTINGS::m_frame
private

Definition at line 31 of file panel_modedit_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxCheckBox* PANEL_MODEDIT_SETTINGS_BASE::m_MagneticPads
protectedinherited
wxRadioBox* PANEL_MODEDIT_SETTINGS_BASE::m_PolarDisplay
protectedinherited
wxCheckBox* PANEL_MODEDIT_SETTINGS_BASE::m_Segments_45_Only_Ctrl
protectedinherited
wxRadioBox* PANEL_MODEDIT_SETTINGS_BASE::m_UnitsSelection
protectedinherited

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