KiCad PCB EDA Suite
PANEL_LIBEDIT_SETTINGS Class Reference

#include <panel_libedit_settings.h>

Inheritance diagram for PANEL_LIBEDIT_SETTINGS:
PANEL_LIBEDIT_SETTINGS_BASE

Public Member Functions

 PANEL_LIBEDIT_SETTINGS (LIB_EDIT_FRAME *aFrame, wxWindow *aWindow)
 

Protected Attributes

wxStaticText * m_lineWidthLabel
 
wxTextCtrl * m_lineWidthCtrl
 
wxStaticText * m_lineWidthUnits
 
wxStaticText * m_textSizeLabel
 
wxTextCtrl * m_textSizeCtrl
 
wxStaticText * m_textSizeUnits
 
wxStaticText * m_pinLengthLabel
 
wxTextCtrl * m_pinLengthCtrl
 
wxStaticText * m_pinLengthUnits
 
wxStaticText * m_pinNumSizeLabel
 
wxTextCtrl * m_pinNumSizeCtrl
 
wxStaticText * m_pinNumSizeUnits
 
wxStaticText * m_pinNameSizeLabel
 
wxTextCtrl * m_pinNameSizeCtrl
 
wxStaticText * m_pinNameSizeUnits
 
wxCheckBox * m_cbShowPinElectricalType
 
wxStaticText * m_hPitchLabel
 
wxTextCtrl * m_hPitchCtrl
 
wxStaticText * m_hPitchUnits
 
wxStaticText * m_vPitchLabel
 
wxTextCtrl * m_vPitchCtrl
 
wxStaticText * m_vPitchUnits
 
wxStaticText * m_pinPitchLabel
 
wxChoice * m_choicePinDisplacement
 
wxStaticText * m_pinPitchUnits
 
wxStaticText * m_labelIncrementLabel1
 
wxSpinCtrl * m_spinRepeatLabel
 

Private Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 

Private Attributes

LIB_EDIT_FRAMEm_frame
 
UNIT_BINDER m_lineWidth
 
UNIT_BINDER m_textSize
 
UNIT_BINDER m_pinLength
 
UNIT_BINDER m_pinNameSize
 
UNIT_BINDER m_pinNumberSize
 
UNIT_BINDER m_hPitch
 
UNIT_BINDER m_vPitch
 

Detailed Description

Definition at line 29 of file panel_libedit_settings.h.

Constructor & Destructor Documentation

◆ PANEL_LIBEDIT_SETTINGS()

PANEL_LIBEDIT_SETTINGS::PANEL_LIBEDIT_SETTINGS ( LIB_EDIT_FRAME aFrame,
wxWindow *  aWindow 
)

Definition at line 35 of file panel_libedit_settings.cpp.

35  :
36  PANEL_LIBEDIT_SETTINGS_BASE( aWindow ),
37  m_frame( aFrame ),
45 {}
PANEL_LIBEDIT_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

◆ TransferDataFromWindow()

bool PANEL_LIBEDIT_SETTINGS::TransferDataFromWindow ( )
overrideprivate

Definition at line 68 of file panel_libedit_settings.cpp.

69 {
70  LIBEDIT_SETTINGS* settings = Pgm().GetSettingsManager().GetAppSettings<LIBEDIT_SETTINGS>();
71 
72  settings->m_Defaults.line_width = Iu2Mils( (int) m_lineWidth.GetValue() );
73  settings->m_Defaults.text_size = Iu2Mils( (int) m_textSize.GetValue() );
74  settings->m_Defaults.pin_length = Iu2Mils( (int) m_pinLength.GetValue() );
75  settings->m_Defaults.pin_num_size = Iu2Mils( (int) m_pinNumberSize.GetValue() );
76  settings->m_Defaults.pin_name_size = Iu2Mils( (int) m_pinNameSize.GetValue() );
77  settings->m_Repeat.x_step = Iu2Mils( (int) m_hPitch.GetValue() );
78  settings->m_Repeat.y_step = Iu2Mils( (int) m_vPitch.GetValue() );
79  settings->m_Repeat.label_delta = m_spinRepeatLabel->GetValue();
80  settings->m_Repeat.pin_step = m_choicePinDisplacement->GetSelection() == 1 ? 50 : 100;
81 
84 
85  return true;
86 }
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:104
KIGFX::SCH_RENDER_SETTINGS * GetRenderSettings()
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
virtual long long int GetValue()
Function GetValue Returns the current value in Internal Units.

References SCH_BASE_FRAME::GetCanvas(), SCH_BASE_FRAME::GetRenderSettings(), UNIT_BINDER::GetValue(), LIBEDIT_SETTINGS::REPEAT::label_delta, LIBEDIT_SETTINGS::DEFAULTS::line_width, PANEL_LIBEDIT_SETTINGS_BASE::m_cbShowPinElectricalType, PANEL_LIBEDIT_SETTINGS_BASE::m_choicePinDisplacement, LIBEDIT_SETTINGS::m_Defaults, m_frame, m_hPitch, m_lineWidth, m_pinLength, m_pinNameSize, m_pinNumberSize, LIBEDIT_SETTINGS::m_Repeat, KIGFX::SCH_RENDER_SETTINGS::m_ShowPinsElectricalType, PANEL_LIBEDIT_SETTINGS_BASE::m_spinRepeatLabel, m_textSize, m_vPitch, Pgm(), LIBEDIT_SETTINGS::DEFAULTS::pin_length, LIBEDIT_SETTINGS::DEFAULTS::pin_name_size, LIBEDIT_SETTINGS::DEFAULTS::pin_num_size, LIBEDIT_SETTINGS::REPEAT::pin_step, EDA_DRAW_PANEL_GAL::Refresh(), LIBEDIT_SETTINGS::DEFAULTS::text_size, LIBEDIT_SETTINGS::REPEAT::x_step, and LIBEDIT_SETTINGS::REPEAT::y_step.

◆ TransferDataToWindow()

bool PANEL_LIBEDIT_SETTINGS::TransferDataToWindow ( )
overrideprivate

Definition at line 48 of file panel_libedit_settings.cpp.

49 {
50  LIBEDIT_SETTINGS* settings = Pgm().GetSettingsManager().GetAppSettings<LIBEDIT_SETTINGS>();
51 
52  m_lineWidth.SetValue( Mils2iu( settings->m_Defaults.line_width ) );
53  m_textSize.SetValue( Mils2iu( settings->m_Defaults.text_size ) );
54  m_pinLength.SetValue( Mils2iu( settings->m_Defaults.pin_length ) );
55  m_pinNumberSize.SetValue( Mils2iu( settings->m_Defaults.pin_num_size ) );
56  m_pinNameSize.SetValue( Mils2iu( settings->m_Defaults.pin_name_size ) );
57  m_hPitch.SetValue( Mils2iu( settings->m_Repeat.x_step ) );
58  m_vPitch.SetValue( Mils2iu( settings->m_Repeat.y_step ) );
59  m_choicePinDisplacement->SetSelection( settings->m_Repeat.pin_step == 50 ? 1 : 0 );
60  m_spinRepeatLabel->SetValue( settings->m_Repeat.label_delta );
61 
63 
64  return true;
65 }
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:104
KIGFX::SCH_RENDER_SETTINGS * GetRenderSettings()
virtual void SetValue(int aValue)
Function SetValue Sets new value (in Internal Units) for the text field, taking care of units convers...

References SCH_BASE_FRAME::GetRenderSettings(), LIBEDIT_SETTINGS::REPEAT::label_delta, LIBEDIT_SETTINGS::DEFAULTS::line_width, PANEL_LIBEDIT_SETTINGS_BASE::m_cbShowPinElectricalType, PANEL_LIBEDIT_SETTINGS_BASE::m_choicePinDisplacement, LIBEDIT_SETTINGS::m_Defaults, m_frame, m_hPitch, m_lineWidth, m_pinLength, m_pinNameSize, m_pinNumberSize, LIBEDIT_SETTINGS::m_Repeat, KIGFX::SCH_RENDER_SETTINGS::m_ShowPinsElectricalType, PANEL_LIBEDIT_SETTINGS_BASE::m_spinRepeatLabel, m_textSize, m_vPitch, Pgm(), LIBEDIT_SETTINGS::DEFAULTS::pin_length, LIBEDIT_SETTINGS::DEFAULTS::pin_name_size, LIBEDIT_SETTINGS::DEFAULTS::pin_num_size, LIBEDIT_SETTINGS::REPEAT::pin_step, UNIT_BINDER::SetValue(), LIBEDIT_SETTINGS::DEFAULTS::text_size, LIBEDIT_SETTINGS::REPEAT::x_step, and LIBEDIT_SETTINGS::REPEAT::y_step.

Member Data Documentation

◆ m_cbShowPinElectricalType

wxCheckBox* PANEL_LIBEDIT_SETTINGS_BASE::m_cbShowPinElectricalType
protectedinherited

◆ m_choicePinDisplacement

wxChoice* PANEL_LIBEDIT_SETTINGS_BASE::m_choicePinDisplacement
protectedinherited

◆ m_frame

LIB_EDIT_FRAME* PANEL_LIBEDIT_SETTINGS::m_frame
private

Definition at line 31 of file panel_libedit_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_hPitch

UNIT_BINDER PANEL_LIBEDIT_SETTINGS::m_hPitch
private

Definition at line 40 of file panel_libedit_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_hPitchCtrl

wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_hPitchCtrl
protectedinherited

◆ m_hPitchLabel

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_hPitchLabel
protectedinherited

◆ m_hPitchUnits

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_hPitchUnits
protectedinherited

◆ m_labelIncrementLabel1

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_labelIncrementLabel1
protectedinherited

◆ m_lineWidth

UNIT_BINDER PANEL_LIBEDIT_SETTINGS::m_lineWidth
private

Definition at line 33 of file panel_libedit_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_lineWidthCtrl

wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_lineWidthCtrl
protectedinherited

◆ m_lineWidthLabel

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_lineWidthLabel
protectedinherited

◆ m_lineWidthUnits

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_lineWidthUnits
protectedinherited

◆ m_pinLength

UNIT_BINDER PANEL_LIBEDIT_SETTINGS::m_pinLength
private

Definition at line 36 of file panel_libedit_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_pinLengthCtrl

wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_pinLengthCtrl
protectedinherited

◆ m_pinLengthLabel

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinLengthLabel
protectedinherited

◆ m_pinLengthUnits

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinLengthUnits
protectedinherited

◆ m_pinNameSize

UNIT_BINDER PANEL_LIBEDIT_SETTINGS::m_pinNameSize
private

Definition at line 37 of file panel_libedit_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_pinNameSizeCtrl

wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNameSizeCtrl
protectedinherited

◆ m_pinNameSizeLabel

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNameSizeLabel
protectedinherited

◆ m_pinNameSizeUnits

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNameSizeUnits
protectedinherited

◆ m_pinNumberSize

UNIT_BINDER PANEL_LIBEDIT_SETTINGS::m_pinNumberSize
private

Definition at line 38 of file panel_libedit_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_pinNumSizeCtrl

wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNumSizeCtrl
protectedinherited

◆ m_pinNumSizeLabel

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNumSizeLabel
protectedinherited

◆ m_pinNumSizeUnits

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNumSizeUnits
protectedinherited

◆ m_pinPitchLabel

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinPitchLabel
protectedinherited

◆ m_pinPitchUnits

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinPitchUnits
protectedinherited

◆ m_spinRepeatLabel

wxSpinCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_spinRepeatLabel
protectedinherited

◆ m_textSize

UNIT_BINDER PANEL_LIBEDIT_SETTINGS::m_textSize
private

Definition at line 34 of file panel_libedit_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_textSizeCtrl

wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_textSizeCtrl
protectedinherited

◆ m_textSizeLabel

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_textSizeLabel
protectedinherited

◆ m_textSizeUnits

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_textSizeUnits
protectedinherited

◆ m_vPitch

UNIT_BINDER PANEL_LIBEDIT_SETTINGS::m_vPitch
private

Definition at line 41 of file panel_libedit_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_vPitchCtrl

wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_vPitchCtrl
protectedinherited

◆ m_vPitchLabel

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_vPitchLabel
protectedinherited

◆ m_vPitchUnits

wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_vPitchUnits
protectedinherited

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