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_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_checkShowPinElectricalType
 
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_pinPitchUnis
 
wxStaticText * m_labelIncrementLabel
 
wxSpinCtrl * m_spinRepeatLabel
 

Private Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 

Private Attributes

LIB_EDIT_FRAMEm_frame
 

Detailed Description

Definition at line 28 of file panel_libedit_settings.h.

Constructor & Destructor Documentation

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

Definition at line 34 of file panel_libedit_settings.cpp.

34  :
35  PANEL_LIBEDIT_SETTINGS_BASE( aWindow ),
36  m_frame( aFrame )
37 {}
PANEL_LIBEDIT_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL)

Member Function Documentation

bool PANEL_LIBEDIT_SETTINGS::TransferDataFromWindow ( )
overrideprivate

Definition at line 57 of file panel_libedit_settings.cpp.

References SCH_BASE_FRAME::GetCanvas(), SCH_BASE_FRAME::GetRenderSettings(), LIB_EDIT_FRAME::GetShowElectricalType(), INCHES, PANEL_LIBEDIT_SETTINGS_BASE::m_checkShowPinElectricalType, PANEL_LIBEDIT_SETTINGS_BASE::m_choicePinDisplacement, m_frame, PANEL_LIBEDIT_SETTINGS_BASE::m_hPitchCtrl, PANEL_LIBEDIT_SETTINGS_BASE::m_lineWidthCtrl, PANEL_LIBEDIT_SETTINGS_BASE::m_pinLengthCtrl, PANEL_LIBEDIT_SETTINGS_BASE::m_pinNameSizeCtrl, PANEL_LIBEDIT_SETTINGS_BASE::m_pinNumSizeCtrl, KIGFX::SCH_RENDER_SETTINGS::m_ShowPinsElectricalType, PANEL_LIBEDIT_SETTINGS_BASE::m_spinRepeatLabel, PANEL_LIBEDIT_SETTINGS_BASE::m_vPitchCtrl, SCH_DRAW_PANEL::Refresh(), SetDefaultLineThickness(), LIB_EDIT_FRAME::SetDefaultPinLength(), LIB_EDIT_FRAME::SetPinNameDefaultSize(), LIB_EDIT_FRAME::SetPinNumDefaultSize(), SCH_BASE_FRAME::SetRepeatDeltaLabel(), LIB_EDIT_FRAME::SetRepeatPinStep(), SCH_BASE_FRAME::SetRepeatStep(), LIB_EDIT_FRAME::SetShowElectricalType(), and ValueFromString().

58 {
64  ValueFromString( INCHES, m_vPitchCtrl->GetValue(), true ) ) );
65  m_frame->SetRepeatPinStep( m_choicePinDisplacement->GetSelection() == 1 ? 50 : 100 );
67 
69 
72 
73  return true;
74 }
static void SetPinNameDefaultSize(int aSize)
void SetRepeatDeltaLabel(int aDelta)
Sets the repeat delta label value for repeat command.
void SetRepeatPinStep(int aStep)
Sets the repeat step value for pins repeat command.
KIGFX::SCH_RENDER_SETTINGS * GetRenderSettings()
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...
int ValueFromString(EDA_UNITS_T aUnits, const wxString &aTextValue, bool aUseMils)
Function ValueFromString converts aTextValue in aUnits to internal units used by the application...
Definition: base_units.cpp:409
void SetDefaultLineThickness(int aThickness)
Definition: common.h:160
SCH_DRAW_PANEL * GetCanvas() const override
static void SetPinNumDefaultSize(int aSize)
void SetShowElectricalType(bool aShow)
void SetRepeatStep(const wxPoint &aStep)
Sets the repeat step value for repeat command.
static void SetDefaultPinLength(int aLength)
Set the default pin len.
bool GetShowElectricalType()
bool PANEL_LIBEDIT_SETTINGS::TransferDataToWindow ( )
overrideprivate

Definition at line 40 of file panel_libedit_settings.cpp.

References GetDefaultLineThickness(), LIB_EDIT_FRAME::GetDefaultPinLength(), LIB_EDIT_FRAME::GetPinNameDefaultSize(), LIB_EDIT_FRAME::GetPinNumDefaultSize(), SCH_BASE_FRAME::GetRepeatDeltaLabel(), LIB_EDIT_FRAME::GetRepeatPinStep(), SCH_BASE_FRAME::GetRepeatStep(), LIB_EDIT_FRAME::GetShowElectricalType(), INCHES, PANEL_LIBEDIT_SETTINGS_BASE::m_checkShowPinElectricalType, PANEL_LIBEDIT_SETTINGS_BASE::m_choicePinDisplacement, m_frame, PANEL_LIBEDIT_SETTINGS_BASE::m_hPitchCtrl, PANEL_LIBEDIT_SETTINGS_BASE::m_lineWidthCtrl, PANEL_LIBEDIT_SETTINGS_BASE::m_pinLengthCtrl, PANEL_LIBEDIT_SETTINGS_BASE::m_pinNameSizeCtrl, PANEL_LIBEDIT_SETTINGS_BASE::m_pinNumSizeCtrl, PANEL_LIBEDIT_SETTINGS_BASE::m_spinRepeatLabel, PANEL_LIBEDIT_SETTINGS_BASE::m_vPitchCtrl, StringFromValue(), wxPoint::x, and wxPoint::y.

41 {
42  m_lineWidthCtrl->SetValue( StringFromValue( INCHES, GetDefaultLineThickness(), false, true ) );
43  m_pinLengthCtrl->SetValue( StringFromValue( INCHES, m_frame->GetDefaultPinLength(), false, true ) );
44  m_pinNumSizeCtrl->SetValue( StringFromValue( INCHES, m_frame->GetPinNumDefaultSize(), false, true ) );
45  m_pinNameSizeCtrl->SetValue( StringFromValue( INCHES, m_frame->GetPinNameDefaultSize(), false, true ) );
46  m_hPitchCtrl->SetValue( StringFromValue( INCHES, m_frame->GetRepeatStep().x, false, true ) );
47  m_vPitchCtrl->SetValue( StringFromValue( INCHES, m_frame->GetRepeatStep().y, false, true ) );
48  m_choicePinDisplacement->SetSelection( m_frame->GetRepeatPinStep() == 50 ? 1 : 0 );
50 
52 
53  return true;
54 }
int GetRepeatPinStep() const
const wxPoint GetRepeatStep() const
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i...
static int GetDefaultPinLength()
int GetRepeatDeltaLabel() const
static int GetPinNumDefaultSize()
Definition: common.h:160
static int GetPinNameDefaultSize()
wxString StringFromValue(EDA_UNITS_T aUnits, int aValue, bool aAddUnitSymbol, bool aUseMils)
Function StringFromValue returns the string from aValue according to units (inch, mm ...
Definition: base_units.cpp:210
bool GetShowElectricalType()

Member Data Documentation

wxCheckBox* PANEL_LIBEDIT_SETTINGS_BASE::m_checkShowPinElectricalType
protectedinherited
wxChoice* PANEL_LIBEDIT_SETTINGS_BASE::m_choicePinDisplacement
protectedinherited
LIB_EDIT_FRAME* PANEL_LIBEDIT_SETTINGS::m_frame
private

Definition at line 30 of file panel_libedit_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_hPitchCtrl
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_hPitchLabel
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_hPitchUnits
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_labelIncrementLabel
protectedinherited
wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_lineWidthCtrl
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_lineWidthLabel
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_lineWidthUnits
protectedinherited
wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_pinLengthCtrl
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinLengthLabel
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinLengthUnits
protectedinherited
wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNameSizeCtrl
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNameSizeLabel
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNameSizeUnits
protectedinherited
wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNumSizeCtrl
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNumSizeLabel
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinNumSizeUnits
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinPitchLabel
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_pinPitchUnis
protectedinherited
wxSpinCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_spinRepeatLabel
protectedinherited
wxTextCtrl* PANEL_LIBEDIT_SETTINGS_BASE::m_vPitchCtrl
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_vPitchLabel
protectedinherited
wxStaticText* PANEL_LIBEDIT_SETTINGS_BASE::m_vPitchUnits
protectedinherited

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