KiCad PCB EDA Suite
PANEL_EESCHEMA_SETTINGS Class Reference

#include <panel_eeschema_settings.h>

Inheritance diagram for PANEL_EESCHEMA_SETTINGS:
PANEL_EESCHEMA_SETTINGS_BASE

Public Member Functions

 PANEL_EESCHEMA_SETTINGS (SCH_EDIT_FRAME *aFrame, wxWindow *aWindow)
 

Protected Member Functions

virtual void OnChooseUnits (wxCommandEvent &event)
 

Protected Attributes

wxStaticText * m_staticText2
 
wxChoice * m_choiceUnits
 
wxCheckBox * m_checkHVOrientation
 
wxCheckBox * m_mouseDragIsDrag
 
wxStaticText * m_borderColorLabel
 
COLOR_SWATCHm_borderColorSwatch
 
wxStaticText * m_backgroundColorLabel
 
COLOR_SWATCHm_backgroundColorSwatch
 
wxCheckBox * m_cbPinSelectionOpt
 
wxCheckBox * m_checkAutoplaceFields
 
wxCheckBox * m_checkAutoplaceJustify
 
wxCheckBox * m_checkAutoplaceAlign
 
wxStaticText * m_hPitchLabel
 
wxTextCtrl * m_hPitchCtrl
 
wxStaticText * m_hPitchUnits
 
wxStaticText * m_vPitchLabel
 
wxTextCtrl * m_vPitchCtrl
 
wxStaticText * m_vPitchUnits
 
wxStaticText * m_labelIncrementLabel
 
wxSpinCtrl * m_spinLabelRepeatStep
 
wxCheckBox * m_footprintPreview
 
wxCheckBox * m_navigatorStaysOpen
 

Private Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 

Private Attributes

SCH_EDIT_FRAMEm_frame
 
UNIT_BINDER m_hPitch
 
UNIT_BINDER m_vPitch
 

Detailed Description

Definition at line 29 of file panel_eeschema_settings.h.

Constructor & Destructor Documentation

◆ PANEL_EESCHEMA_SETTINGS()

PANEL_EESCHEMA_SETTINGS::PANEL_EESCHEMA_SETTINGS ( SCH_EDIT_FRAME aFrame,
wxWindow *  aWindow 
)

Definition at line 35 of file panel_eeschema_settings.cpp.

35  :
37  m_frame( aFrame ),
40 {}
PANEL_EESCHEMA_SETTINGS_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

◆ OnChooseUnits()

virtual void PANEL_EESCHEMA_SETTINGS_BASE::OnChooseUnits ( wxCommandEvent &  event)
inlineprotectedvirtualinherited

Definition at line 67 of file panel_eeschema_settings_base.h.

67 { event.Skip(); }

Referenced by PANEL_EESCHEMA_SETTINGS_BASE::_wxFB_OnChooseUnits().

◆ TransferDataFromWindow()

bool PANEL_EESCHEMA_SETTINGS::TransferDataFromWindow ( )
overrideprivate

Definition at line 77 of file panel_eeschema_settings.cpp.

78 {
80 
81  m_frame->SetUserUnits( m_choiceUnits->GetSelection() == 0 ? EDA_UNITS::INCHES
83 
86 
87  cfg->m_Drawing.default_repeat_offset_x = Iu2Mils( (int) m_hPitch.GetValue() );
88  cfg->m_Drawing.default_repeat_offset_y = Iu2Mils( (int) m_vPitch.GetValue() );
90 
91  cfg->m_Drawing.hv_lines_only = m_checkHVOrientation->GetValue();
94 
98 
99  cfg->m_Input.drag_is_move = !m_mouseDragIsDrag->GetValue();
101 
103 
104  return true;
105 }
KIGFX::COLOR4D GetSwatchColor() const
void SaveProjectSettings() override
Save changes to the project settings to the project (.pro) file.
EESCHEMA_SETTINGS * eeconfig() const
AUTOPLACE_FIELDS m_AutoplaceFields
virtual long long int GetValue()
Function GetValue Returns the current value in Internal Units.
void SetUserUnits(EDA_UNITS aUnits)

References EESCHEMA_SETTINGS::AUTOPLACE_FIELDS::align_to_grid, EESCHEMA_SETTINGS::AUTOPLACE_FIELDS::allow_rejustify, EESCHEMA_SETTINGS::DRAWING::default_repeat_offset_x, EESCHEMA_SETTINGS::DRAWING::default_repeat_offset_y, EESCHEMA_SETTINGS::DRAWING::default_sheet_background_color, EESCHEMA_SETTINGS::DRAWING::default_sheet_border_color, EESCHEMA_SETTINGS::INPUT::drag_is_move, SCH_BASE_FRAME::eeconfig(), EESCHEMA_SETTINGS::AUTOPLACE_FIELDS::enable, EESCHEMA_SETTINGS::APPEARANCE::footprint_preview, COLOR_SWATCH::GetSwatchColor(), UNIT_BINDER::GetValue(), EESCHEMA_SETTINGS::DRAWING::hv_lines_only, INCHES, EESCHEMA_SETTINGS::m_Appearance, EESCHEMA_SETTINGS::m_AutoplaceFields, PANEL_EESCHEMA_SETTINGS_BASE::m_backgroundColorSwatch, PANEL_EESCHEMA_SETTINGS_BASE::m_borderColorSwatch, PANEL_EESCHEMA_SETTINGS_BASE::m_cbPinSelectionOpt, PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceAlign, PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceFields, PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceJustify, PANEL_EESCHEMA_SETTINGS_BASE::m_checkHVOrientation, PANEL_EESCHEMA_SETTINGS_BASE::m_choiceUnits, EESCHEMA_SETTINGS::m_Drawing, PANEL_EESCHEMA_SETTINGS_BASE::m_footprintPreview, m_frame, m_hPitch, EESCHEMA_SETTINGS::m_Input, PANEL_EESCHEMA_SETTINGS_BASE::m_mouseDragIsDrag, PANEL_EESCHEMA_SETTINGS_BASE::m_navigatorStaysOpen, EESCHEMA_SETTINGS::m_Selection, PANEL_EESCHEMA_SETTINGS_BASE::m_spinLabelRepeatStep, m_vPitch, MILLIMETRES, EESCHEMA_SETTINGS::APPEARANCE::navigator_stays_open, EESCHEMA_SETTINGS::DRAWING::repeat_label_increment, SCH_EDIT_FRAME::SaveProjectSettings(), EESCHEMA_SETTINGS::SELECTION::select_pin_selects_symbol, and EDA_BASE_FRAME::SetUserUnits().

◆ TransferDataToWindow()

bool PANEL_EESCHEMA_SETTINGS::TransferDataToWindow ( )
overrideprivate

Definition at line 43 of file panel_eeschema_settings.cpp.

44 {
46 
47  m_choiceUnits->SetSelection( m_frame->GetUserUnits() == EDA_UNITS::INCHES ? 0 : 1 );
48 
52 
54  COLOR4D schematicBackground = settings->GetColor( LAYER_SCHEMATIC_BACKGROUND );
55 
56  m_borderColorSwatch->SetSwatchBackground( schematicBackground );
58 
59  m_backgroundColorSwatch->SetSwatchBackground( schematicBackground );
61 
65 
69 
70  m_mouseDragIsDrag->SetValue( !cfg->m_Input.drag_is_move );
72 
73  return true;
74 }
void SetSwatchColor(KIGFX::COLOR4D aColor, bool sendEvent)
Set the current swatch color directly.
void SetSwatchBackground(KIGFX::COLOR4D aBackground)
Set the swatch background color.
COLOR_SETTINGS * GetColorSettings() override
Returns a pointer to the active color theme settings.
EESCHEMA_SETTINGS * eeconfig() const
AUTOPLACE_FIELDS m_AutoplaceFields
COLOR4D GetColor(int aLayer) const
virtual void SetValue(int aValue)
Function SetValue Sets new value (in Internal Units) for the text field, taking care of units convers...
Color settings are a bit different than most of the settings objects in that there can be more than o...
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:99

References EESCHEMA_SETTINGS::AUTOPLACE_FIELDS::align_to_grid, EESCHEMA_SETTINGS::AUTOPLACE_FIELDS::allow_rejustify, EESCHEMA_SETTINGS::DRAWING::default_repeat_offset_x, EESCHEMA_SETTINGS::DRAWING::default_repeat_offset_y, EESCHEMA_SETTINGS::DRAWING::default_sheet_background_color, EESCHEMA_SETTINGS::DRAWING::default_sheet_border_color, EESCHEMA_SETTINGS::INPUT::drag_is_move, SCH_BASE_FRAME::eeconfig(), EESCHEMA_SETTINGS::AUTOPLACE_FIELDS::enable, EESCHEMA_SETTINGS::APPEARANCE::footprint_preview, COLOR_SETTINGS::GetColor(), SCH_BASE_FRAME::GetColorSettings(), EDA_BASE_FRAME::GetUserUnits(), EESCHEMA_SETTINGS::DRAWING::hv_lines_only, INCHES, LAYER_SCHEMATIC_BACKGROUND, EESCHEMA_SETTINGS::m_Appearance, EESCHEMA_SETTINGS::m_AutoplaceFields, PANEL_EESCHEMA_SETTINGS_BASE::m_backgroundColorSwatch, PANEL_EESCHEMA_SETTINGS_BASE::m_borderColorSwatch, PANEL_EESCHEMA_SETTINGS_BASE::m_cbPinSelectionOpt, PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceAlign, PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceFields, PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceJustify, PANEL_EESCHEMA_SETTINGS_BASE::m_checkHVOrientation, PANEL_EESCHEMA_SETTINGS_BASE::m_choiceUnits, EESCHEMA_SETTINGS::m_Drawing, PANEL_EESCHEMA_SETTINGS_BASE::m_footprintPreview, m_frame, m_hPitch, EESCHEMA_SETTINGS::m_Input, PANEL_EESCHEMA_SETTINGS_BASE::m_mouseDragIsDrag, PANEL_EESCHEMA_SETTINGS_BASE::m_navigatorStaysOpen, EESCHEMA_SETTINGS::m_Selection, PANEL_EESCHEMA_SETTINGS_BASE::m_spinLabelRepeatStep, m_vPitch, EESCHEMA_SETTINGS::APPEARANCE::navigator_stays_open, EESCHEMA_SETTINGS::DRAWING::repeat_label_increment, EESCHEMA_SETTINGS::SELECTION::select_pin_selects_symbol, COLOR_SWATCH::SetSwatchBackground(), COLOR_SWATCH::SetSwatchColor(), and UNIT_BINDER::SetValue().

Member Data Documentation

◆ m_backgroundColorLabel

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_backgroundColorLabel
protectedinherited

Definition at line 49 of file panel_eeschema_settings_base.h.

◆ m_backgroundColorSwatch

COLOR_SWATCH* PANEL_EESCHEMA_SETTINGS_BASE::m_backgroundColorSwatch
protectedinherited

Definition at line 50 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_borderColorLabel

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_borderColorLabel
protectedinherited

Definition at line 47 of file panel_eeschema_settings_base.h.

◆ m_borderColorSwatch

COLOR_SWATCH* PANEL_EESCHEMA_SETTINGS_BASE::m_borderColorSwatch
protectedinherited

Definition at line 48 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_cbPinSelectionOpt

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_cbPinSelectionOpt
protectedinherited

Definition at line 51 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_checkAutoplaceAlign

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceAlign
protectedinherited

Definition at line 54 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_checkAutoplaceFields

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceFields
protectedinherited

Definition at line 52 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_checkAutoplaceJustify

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceJustify
protectedinherited

Definition at line 53 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_checkHVOrientation

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_checkHVOrientation
protectedinherited

Definition at line 45 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_choiceUnits

wxChoice* PANEL_EESCHEMA_SETTINGS_BASE::m_choiceUnits
protectedinherited

Definition at line 44 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_footprintPreview

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_footprintPreview
protectedinherited

Definition at line 63 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_frame

SCH_EDIT_FRAME* PANEL_EESCHEMA_SETTINGS::m_frame
private

Definition at line 31 of file panel_eeschema_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_hPitch

UNIT_BINDER PANEL_EESCHEMA_SETTINGS::m_hPitch
private

Definition at line 33 of file panel_eeschema_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_hPitchCtrl

wxTextCtrl* PANEL_EESCHEMA_SETTINGS_BASE::m_hPitchCtrl
protectedinherited

Definition at line 56 of file panel_eeschema_settings_base.h.

◆ m_hPitchLabel

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_hPitchLabel
protectedinherited

Definition at line 55 of file panel_eeschema_settings_base.h.

◆ m_hPitchUnits

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_hPitchUnits
protectedinherited

Definition at line 57 of file panel_eeschema_settings_base.h.

◆ m_labelIncrementLabel

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_labelIncrementLabel
protectedinherited

Definition at line 61 of file panel_eeschema_settings_base.h.

◆ m_mouseDragIsDrag

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_mouseDragIsDrag
protectedinherited

Definition at line 46 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_navigatorStaysOpen

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_navigatorStaysOpen
protectedinherited

Definition at line 64 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_spinLabelRepeatStep

wxSpinCtrl* PANEL_EESCHEMA_SETTINGS_BASE::m_spinLabelRepeatStep
protectedinherited

Definition at line 62 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_staticText2

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_staticText2
protectedinherited

Definition at line 43 of file panel_eeschema_settings_base.h.

◆ m_vPitch

UNIT_BINDER PANEL_EESCHEMA_SETTINGS::m_vPitch
private

Definition at line 34 of file panel_eeschema_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_vPitchCtrl

wxTextCtrl* PANEL_EESCHEMA_SETTINGS_BASE::m_vPitchCtrl
protectedinherited

Definition at line 59 of file panel_eeschema_settings_base.h.

◆ m_vPitchLabel

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_vPitchLabel
protectedinherited

Definition at line 58 of file panel_eeschema_settings_base.h.

◆ m_vPitchUnits

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_vPitchUnits
protectedinherited

Definition at line 60 of file panel_eeschema_settings_base.h.


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