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_mouseDragIsDrag
 
wxCheckBox * m_checkAutoplaceFields
 
wxCheckBox * m_checkAutoplaceJustify
 
wxCheckBox * m_checkAutoplaceAlign
 
wxCheckBox * m_footprintPreview
 

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

◆ OnChooseUnits()

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

Definition at line 64 of file panel_eeschema_settings_base.h.

64 { event.Skip(); }

Referenced by PANEL_EESCHEMA_SETTINGS_BASE::_wxFB_OnChooseUnits().

◆ TransferDataFromWindow()

bool PANEL_EESCHEMA_SETTINGS::TransferDataFromWindow ( )
overrideprivate

Definition at line 60 of file panel_eeschema_settings.cpp.

61 {
62  m_frame->SetUserUnits( m_choiceUnits->GetSelection() == 0 ? INCHES : MILLIMETRES );
63 
64  int textSize = ValueFromString( INCHES, m_textSizeCtrl->GetValue(), true );
65 
66  if( textSize != GetDefaultTextSize() )
67  {
68  SetDefaultTextSize( textSize );
69  m_frame->SaveProjectSettings( false );
70  }
71 
72  m_frame->SetRepeatStep( wxPoint( ValueFromString( INCHES, m_hPitchCtrl->GetValue(), true ),
73  ValueFromString( INCHES, m_vPitchCtrl->GetValue(), true ) ) );
75 
78 
82 
84 
85  return true;
86 }
void SetUserUnits(EDA_UNITS_T aUnits)
void SetForceHVLines(bool aForceHVdirection)
void SetRepeatDeltaLabel(int aDelta)
Sets the repeat delta label value for repeat command.
void SetAutoplaceAlign(bool aEnable)
void SetAutoplaceJustify(bool aEnable)
void SetDragActionIsMove(bool aValue)
void SaveProjectSettings(bool aAskForSave) override
Save changes to the project settings to the project (.pro) file.
void SetDefaultTextSize(int aTextSize)
Definition: common.h:134
void SetShowFootprintPreviews(bool aEnable)
void SetAutoplaceFields(bool aEnable)
void SetRepeatStep(const wxPoint &aStep)
Sets the repeat step value for repeat command.
int GetDefaultTextSize()
Default size for text in general.
long long 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:427

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_mouseDragIsDrag, 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_BASE_FRAME::SetDragActionIsMove(), SCH_EDIT_FRAME::SetForceHVLines(), SCH_BASE_FRAME::SetRepeatDeltaLabel(), SCH_BASE_FRAME::SetRepeatStep(), SCH_EDIT_FRAME::SetShowFootprintPreviews(), EDA_BASE_FRAME::SetUserUnits(), and ValueFromString().

◆ TransferDataToWindow()

bool PANEL_EESCHEMA_SETTINGS::TransferDataToWindow ( )
overrideprivate

Definition at line 38 of file panel_eeschema_settings.cpp.

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 
55 
56  return true;
57 }
bool GetAutoplaceJustify() const
bool GetShowFootprintPreviews() const
bool GetAutoplaceFields() const
bool GetForceHVLines() const
bool GetDragActionIsMove() const
Definition: common.h:134
const wxPoint GetRepeatStep() const
EDA_UNITS_T GetUserUnits() const
Return the user units currently in use.
int GetRepeatDeltaLabel() const
bool GetAutoplaceAlign() const
int GetDefaultTextSize()
Default size for text in general.
wxString StringFromValue(EDA_UNITS_T aUnits, double aValue, bool aAddUnitSymbol, bool aUseMils)
Function StringFromValue returns the string from aValue according to units (inch, mm ....
Definition: base_units.cpp:217

References SCH_EDIT_FRAME::GetAutoplaceAlign(), SCH_EDIT_FRAME::GetAutoplaceFields(), SCH_EDIT_FRAME::GetAutoplaceJustify(), GetDefaultTextSize(), SCH_BASE_FRAME::GetDragActionIsMove(), SCH_EDIT_FRAME::GetForceHVLines(), SCH_BASE_FRAME::GetRepeatDeltaLabel(), SCH_BASE_FRAME::GetRepeatStep(), SCH_EDIT_FRAME::GetShowFootprintPreviews(), EDA_BASE_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_mouseDragIsDrag, PANEL_EESCHEMA_SETTINGS_BASE::m_spinRepeatLabel, PANEL_EESCHEMA_SETTINGS_BASE::m_textSizeCtrl, PANEL_EESCHEMA_SETTINGS_BASE::m_vPitchCtrl, and StringFromValue().

Member Data Documentation

◆ m_checkAutoplaceAlign

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_checkAutoplaceAlign
protectedinherited

Definition at line 60 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 58 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 59 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 56 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 61 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 30 of file panel_eeschema_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_hPitchCtrl

wxTextCtrl* PANEL_EESCHEMA_SETTINGS_BASE::m_hPitchCtrl
protectedinherited

Definition at line 49 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_hPitchLabel

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_hPitchLabel
protectedinherited

Definition at line 48 of file panel_eeschema_settings_base.h.

◆ m_hPitchUnits

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_hPitchUnits
protectedinherited

Definition at line 50 of file panel_eeschema_settings_base.h.

◆ m_mouseDragIsDrag

wxCheckBox* PANEL_EESCHEMA_SETTINGS_BASE::m_mouseDragIsDrag
protectedinherited

Definition at line 57 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_spinRepeatLabel

wxSpinCtrl* PANEL_EESCHEMA_SETTINGS_BASE::m_spinRepeatLabel
protectedinherited

Definition at line 55 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_staticText16

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_staticText16
protectedinherited

Definition at line 54 of file panel_eeschema_settings_base.h.

◆ m_staticText2

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_staticText2
protectedinherited

Definition at line 43 of file panel_eeschema_settings_base.h.

◆ m_textSizeCtrl

wxTextCtrl* PANEL_EESCHEMA_SETTINGS_BASE::m_textSizeCtrl
protectedinherited

Definition at line 46 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_textSizeLabel

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_textSizeLabel
protectedinherited

Definition at line 45 of file panel_eeschema_settings_base.h.

◆ m_textSizeUnits

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_textSizeUnits
protectedinherited

Definition at line 47 of file panel_eeschema_settings_base.h.

◆ m_vPitchCtrl

wxTextCtrl* PANEL_EESCHEMA_SETTINGS_BASE::m_vPitchCtrl
protectedinherited

Definition at line 52 of file panel_eeschema_settings_base.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_vPitchLabel

wxStaticText* PANEL_EESCHEMA_SETTINGS_BASE::m_vPitchLabel
protectedinherited

Definition at line 51 of file panel_eeschema_settings_base.h.

◆ m_vPitchUnits

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: