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
 
wxStaticText * m_textSizeLabel
 
wxTextCtrl * m_textSizeCtrl
 
wxStaticText * m_textSizeUnits
 
wxStaticText * m_hPitchLabel
 
wxTextCtrl * m_hPitchCtrl
 
wxStaticText * m_hPitchUnits
 
wxStaticText * m_vPitchLabel
 
wxTextCtrl * m_vPitchCtrl
 
wxStaticText * m_vPitchUnits
 
wxStaticText * m_staticText16
 
wxSpinCtrl * m_spinRepeatLabel
 
wxCheckBox * m_checkHVOrientation
 
wxCheckBox * m_footprintPreview
 
wxCheckBox * m_checkAutoplaceFields
 
wxCheckBox * m_checkAutoplaceJustify
 
wxCheckBox * m_checkAutoplaceAlign
 

Private Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 

Private Attributes

SCH_EDIT_FRAMEm_frame
 

Detailed Description

Definition at line 28 of file panel_eeschema_settings.h.

Constructor & Destructor Documentation

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

Definition at line 32 of file panel_eeschema_settings.cpp.

32  :
34  m_frame( aFrame )
35 {}
PANEL_EESCHEMA_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

virtual void PANEL_EESCHEMA_SETTINGS_BASE::OnChooseUnits ( wxCommandEvent &  event)
inlineprotectedvirtualinherited
bool PANEL_EESCHEMA_SETTINGS::TransferDataFromWindow ( )
overrideprivate

Definition at line 58 of file panel_eeschema_settings.cpp.

References GetDefaultTextSize(), INCHES, 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, PANEL_EESCHEMA_SETTINGS_BASE::m_footprintPreview, m_frame, PANEL_EESCHEMA_SETTINGS_BASE::m_hPitchCtrl, PANEL_EESCHEMA_SETTINGS_BASE::m_spinRepeatLabel, PANEL_EESCHEMA_SETTINGS_BASE::m_textSizeCtrl, PANEL_EESCHEMA_SETTINGS_BASE::m_vPitchCtrl, MILLIMETRES, SCH_EDIT_FRAME::SaveProjectSettings(), SCH_EDIT_FRAME::SetAutoplaceAlign(), SCH_EDIT_FRAME::SetAutoplaceFields(), SCH_EDIT_FRAME::SetAutoplaceJustify(), SetDefaultTextSize(), SCH_EDIT_FRAME::SetFootprintPreview(), SCH_EDIT_FRAME::SetForceHVLines(), SCH_BASE_FRAME::SetRepeatDeltaLabel(), SCH_BASE_FRAME::SetRepeatStep(), EDA_DRAW_FRAME::SetUserUnits(), and ValueFromString().

59 {
60  m_frame->SetUserUnits( m_choiceUnits->GetSelection() == 0 ? INCHES : MILLIMETRES );
61 
62  int textSize = ValueFromString( INCHES, m_textSizeCtrl->GetValue(), true );
63 
64  if( textSize != GetDefaultTextSize() )
65  {
66  SetDefaultTextSize( textSize );
67  m_frame->SaveProjectSettings( false );
68  }
69 
71  ValueFromString( INCHES, m_vPitchCtrl->GetValue(), true ) ) );
73 
76 
80 
81  return true;
82 }
void SetForceHVLines(bool aForceHVdirection)
void SetRepeatDeltaLabel(int aDelta)
Sets the repeat delta label value for repeat command.
void SetAutoplaceAlign(bool aEnable)
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 SetAutoplaceJustify(bool aEnable)
void SaveProjectSettings(bool aAskForSave) override
Save changes to the project settings to the project (.pro) file.
void SetDefaultTextSize(int aTextSize)
Definition: common.h:160
void SetAutoplaceFields(bool aEnable)
void SetRepeatStep(const wxPoint &aStep)
Sets the repeat step value for repeat command.
void SetFootprintPreview(bool aEnable)
void SetUserUnits(EDA_UNITS_T aUnits)
Definition: draw_frame.h:285
int GetDefaultTextSize()
Default size for text in general.
bool PANEL_EESCHEMA_SETTINGS::TransferDataToWindow ( )
overrideprivate

Definition at line 38 of file panel_eeschema_settings.cpp.

References SCH_EDIT_FRAME::GetAutoplaceAlign(), SCH_EDIT_FRAME::GetAutoplaceFields(), SCH_EDIT_FRAME::GetAutoplaceJustify(), GetDefaultTextSize(), SCH_EDIT_FRAME::GetFootprintPreview(), SCH_EDIT_FRAME::GetForceHVLines(), SCH_BASE_FRAME::GetRepeatDeltaLabel(), SCH_BASE_FRAME::GetRepeatStep(), EDA_DRAW_FRAME::GetUserUnits(), INCHES, 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, PANEL_EESCHEMA_SETTINGS_BASE::m_footprintPreview, m_frame, PANEL_EESCHEMA_SETTINGS_BASE::m_hPitchCtrl, PANEL_EESCHEMA_SETTINGS_BASE::m_spinRepeatLabel, PANEL_EESCHEMA_SETTINGS_BASE::m_textSizeCtrl, PANEL_EESCHEMA_SETTINGS_BASE::m_vPitchCtrl, StringFromValue(), wxPoint::x, and wxPoint::y.

39 {
40  m_choiceUnits->SetSelection( m_frame->GetUserUnits() == INCHES ? 0 : 1 );
41 
42  m_textSizeCtrl->SetValue( StringFromValue( INCHES, GetDefaultTextSize(), false, true ) );
43  m_hPitchCtrl->SetValue( StringFromValue( INCHES, m_frame->GetRepeatStep().x, false, true ) );
44  m_vPitchCtrl->SetValue( StringFromValue( INCHES, m_frame->GetRepeatStep().y, false, true ) );
46 
49 
53 
54  return true;
55 }
bool GetForceHVLines() const
bool GetAutoplaceAlign() const
const wxPoint GetRepeatStep() const
int GetRepeatDeltaLabel() const
EDA_UNITS_T GetUserUnits() const override
Return the user units currently in use.
Definition: draw_frame.h:284
Definition: common.h:160
bool GetAutoplaceJustify() const
bool GetFootprintPreview() const
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 GetAutoplaceFields() const
int GetDefaultTextSize()
Default size for text in general.

Member Data Documentation

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceAlign
protectedinherited

Definition at line 60 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceFields
protectedinherited

Definition at line 58 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceJustify
protectedinherited

Definition at line 59 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_checkHVOrientation
protectedinherited

Definition at line 56 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxChoice* PANEL_EESCHEMA_SETTINGS_BASE::m_choiceUnits
protectedinherited

Definition at line 44 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_footprintPreview
protectedinherited

Definition at line 57 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

SCH_EDIT_FRAME* PANEL_EESCHEMA_SETTINGS::m_frame
private

Definition at line 30 of file panel_eeschema_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxTextCtrl* PANEL_EESCHEMA_SETTINGS_BASE::m_hPitchCtrl
protectedinherited

Definition at line 49 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_hPitchLabel
protectedinherited

Definition at line 48 of file panel_eeschema_settings_base.h.

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_hPitchUnits
protectedinherited

Definition at line 50 of file panel_eeschema_settings_base.h.

wxSpinCtrl* PANEL_EESCHEMA_SETTINGS_BASE::m_spinRepeatLabel
protectedinherited

Definition at line 55 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_staticText16
protectedinherited

Definition at line 54 of file panel_eeschema_settings_base.h.

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_staticText2
protectedinherited

Definition at line 43 of file panel_eeschema_settings_base.h.

wxTextCtrl* PANEL_EESCHEMA_SETTINGS_BASE::m_textSizeCtrl
protectedinherited

Definition at line 46 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_textSizeLabel
protectedinherited

Definition at line 45 of file panel_eeschema_settings_base.h.

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_textSizeUnits
protectedinherited

Definition at line 47 of file panel_eeschema_settings_base.h.

wxTextCtrl* PANEL_EESCHEMA_SETTINGS_BASE::m_vPitchCtrl
protectedinherited

Definition at line 52 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_vPitchLabel
protectedinherited

Definition at line 51 of file panel_eeschema_settings_base.h.

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_vPitchUnits
protectedinherited

Definition at line 53 of file panel_eeschema_settings_base.h.


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