KiCad PCB EDA Suite
PANEL_EESCHEMA_DISPLAY_OPTIONS Class Reference

#include <panel_eeschema_display_options.h>

Inheritance diagram for PANEL_EESCHEMA_DISPLAY_OPTIONS:
PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE

Public Member Functions

 PANEL_EESCHEMA_DISPLAY_OPTIONS (SCH_EDIT_FRAME *aFrame, wxWindow *aWindow)
 

Protected Attributes

wxBoxSizer * m_galOptionsSizer
 
wxStaticText * m_busWidthLabel
 
wxTextCtrl * m_busWidthCtrl
 
wxStaticText * m_busWidthUnits
 
wxStaticText * m_wireWidthLabel
 
wxTextCtrl * m_wireWidthCtrl
 
wxStaticText * m_wireWidthUnits
 
wxStaticText * m_jctSizeLabel
 
wxTextCtrl * m_jctSizeCtrl
 
wxStaticText * m_jctSizeUnits
 
wxStaticText * m_staticText26
 
wxChoice * m_choiceSeparatorRefId
 
wxCheckBox * m_checkShowHiddenPins
 
wxCheckBox * m_checkPageLimits
 

Private Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 

Private Attributes

SCH_EDIT_FRAMEm_frame
 
GAL_OPTIONS_PANELm_galOptsPanel
 
UNIT_BINDER m_busWidth
 
UNIT_BINDER m_wireWidth
 
UNIT_BINDER m_junctionSize
 

Detailed Description

Definition at line 30 of file panel_eeschema_display_options.h.

Constructor & Destructor Documentation

◆ PANEL_EESCHEMA_DISPLAY_OPTIONS()

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

Definition at line 35 of file panel_eeschema_display_options.cpp.

36  :
38  m_frame( aFrame ),
42 {
44  m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
45 
46  m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
47 }
KIGFX::GAL_DISPLAY_OPTIONS & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL)

References EDA_DRAW_FRAME::GetGalDisplayOptions(), m_frame, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_galOptionsSizer, and m_galOptsPanel.

Member Function Documentation

◆ TransferDataFromWindow()

bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow ( )
overrideprivate

Definition at line 82 of file panel_eeschema_display_options.cpp.

83 {
84  // Reference style one of: "A" ".A" "-A" "_A" ".1" "-1" "_1"
85  int firstRefId, refSeparator;
86 
87  switch( m_choiceSeparatorRefId->GetSelection() )
88  {
89  default:
90  case 0: firstRefId = 'A'; refSeparator = 0; break;
91  case 1: firstRefId = 'A'; refSeparator = '.'; break;
92  case 2: firstRefId = 'A'; refSeparator = '-'; break;
93  case 3: firstRefId = 'A'; refSeparator = '_'; break;
94  case 4: firstRefId = '1'; refSeparator = '.'; break;
95  case 5: firstRefId = '1'; refSeparator = '-'; break;
96  case 6: firstRefId = '1'; refSeparator = '_'; break;
97  }
98 
99  if( refSeparator != LIB_PART::GetSubpartIdSeparator() ||
100  firstRefId != LIB_PART::GetSubpartFirstId() )
101  {
102  LIB_PART::SetSubpartIdNotation( refSeparator, firstRefId );
103  m_frame->SaveProjectSettings( false );
104  }
105 
111 
112  // Update canvas
117  m_frame->GetCanvas()->Refresh();
118 
120 
121  return true;
122 }
KIGFX::SCH_VIEW * GetView() const override
Function GetView() Returns a pointer to the VIEW instance used in the panel.
void SetDefaultWireThickness(int aThickness)
void SetDefaultBusThickness(int aThickness)
void UpdateAllItems(int aUpdateFlags)
Updates all items in the view according to the given flags.
Definition: view.cpp:1444
KIGFX::SCH_RENDER_SETTINGS * GetRenderSettings()
void SaveProjectSettings(bool aAskForSave) override
Save changes to the project settings to the project (.pro) file.
static void SetSymbolSize(int aSize)
Definition: sch_junction.h:55
static int GetSubpartIdSeparator()
Item is being added to the view.
Definition: view_item.h:60
static int GetSubpartFirstId()
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...
static void SetSubpartIdNotation(int aSep, int aFirstId)
Set the separator char between the subpart id and the reference 0 (no separator) or '.
virtual long long int GetValue()
Function GetValue Returns the current value in Internal Units.
void SetShowPageLimits(bool aShow)
void MarkDirty()
Function MarkDirty() Forces redraw of view on the next rendering.
Definition: view.h:610
void SetShowAllPins(bool aEnable)
void SetShowPageLimits(bool aDraw)
Definition: painter.h:188
bool TransferDataFromWindow() override
Read the options set in the UI into the given options object.

References SCH_BASE_FRAME::GetCanvas(), SCH_BASE_FRAME::GetRenderSettings(), LIB_PART::GetSubpartFirstId(), LIB_PART::GetSubpartIdSeparator(), UNIT_BINDER::GetValue(), SCH_DRAW_PANEL::GetView(), m_busWidth, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkPageLimits, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkShowHiddenPins, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_choiceSeparatorRefId, m_frame, m_galOptsPanel, m_junctionSize, KIGFX::SCH_RENDER_SETTINGS::m_ShowHiddenPins, m_wireWidth, KIGFX::VIEW::MarkDirty(), EDA_DRAW_PANEL_GAL::Refresh(), KIGFX::REPAINT, SCH_EDIT_FRAME::SaveProjectSettings(), SetDefaultBusThickness(), SetDefaultWireThickness(), SCH_EDIT_FRAME::SetShowAllPins(), KIGFX::RENDER_SETTINGS::SetShowPageLimits(), EDA_DRAW_FRAME::SetShowPageLimits(), LIB_PART::SetSubpartIdNotation(), SCH_JUNCTION::SetSymbolSize(), GAL_OPTIONS_PANEL::TransferDataFromWindow(), and KIGFX::VIEW::UpdateAllItems().

◆ TransferDataToWindow()

bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow ( )
overrideprivate

Definition at line 50 of file panel_eeschema_display_options.cpp.

51 {
52  // Reference style one of: "A" ".A" "-A" "_A" ".1" "-1" "_1"
53  int refStyleSelection;
54 
56  {
57  default:
58  case 0: refStyleSelection = 0; break;
59  case '.': refStyleSelection = LIB_PART::GetSubpartFirstId() == '1' ? 4 : 1; break;
60  case '-': refStyleSelection = LIB_PART::GetSubpartFirstId() == '1' ? 5 : 2; break;
61  case '_': refStyleSelection = LIB_PART::GetSubpartFirstId() == '1' ? 6 : 3; break;
62  }
63 
64  m_choiceSeparatorRefId->SetSelection( refStyleSelection );
65 
66  m_busWidth.SetUnits( INCHES, true );
67  m_wireWidth.SetUnits( INCHES, true );
69 
75 
77 
78  return true;
79 }
int GetDefaultWireThickness()
Default line thickness used to draw/plot wires.
virtual void SetUnits(EDA_UNITS_T aUnits, bool aUseMils=false)
Function SetUnits Normally not needed (as the UNIT_BINDER inherits from the parent frame),...
Definition: unit_binder.cpp:68
bool ShowPageLimits() const
static int GetSubpartIdSeparator()
bool TransferDataToWindow() override
Load the panel controls from the given opt.
static int GetSubpartFirstId()
Definition: common.h:134
virtual void SetValue(int aValue)
Function SetValue Sets new value (in Internal Units) for the text field, taking care of units convers...
static int GetSymbolSize()
Definition: sch_junction.h:54
int GetDefaultBusThickness()
Default line thickness used to draw/plot busses.
bool GetShowAllPins() const override
Allow some frames to show/hide hidden pins.

References GetDefaultBusThickness(), GetDefaultWireThickness(), SCH_EDIT_FRAME::GetShowAllPins(), LIB_PART::GetSubpartFirstId(), LIB_PART::GetSubpartIdSeparator(), SCH_JUNCTION::GetSymbolSize(), INCHES, m_busWidth, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkPageLimits, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkShowHiddenPins, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_choiceSeparatorRefId, m_frame, m_galOptsPanel, m_junctionSize, m_wireWidth, UNIT_BINDER::SetUnits(), UNIT_BINDER::SetValue(), EDA_DRAW_FRAME::ShowPageLimits(), and GAL_OPTIONS_PANEL::TransferDataToWindow().

Member Data Documentation

◆ m_busWidth

UNIT_BINDER PANEL_EESCHEMA_DISPLAY_OPTIONS::m_busWidth
private

◆ m_busWidthCtrl

wxTextCtrl* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_busWidthCtrl
protectedinherited

◆ m_busWidthLabel

wxStaticText* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_busWidthLabel
protectedinherited

◆ m_busWidthUnits

wxStaticText* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_busWidthUnits
protectedinherited

◆ m_checkPageLimits

wxCheckBox* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkPageLimits
protectedinherited

◆ m_checkShowHiddenPins

wxCheckBox* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkShowHiddenPins
protectedinherited

◆ m_choiceSeparatorRefId

wxChoice* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_choiceSeparatorRefId
protectedinherited

◆ m_frame

SCH_EDIT_FRAME* PANEL_EESCHEMA_DISPLAY_OPTIONS::m_frame
private

◆ m_galOptionsSizer

wxBoxSizer* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_galOptionsSizer
protectedinherited

◆ m_galOptsPanel

GAL_OPTIONS_PANEL* PANEL_EESCHEMA_DISPLAY_OPTIONS::m_galOptsPanel
private

◆ m_jctSizeCtrl

wxTextCtrl* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_jctSizeCtrl
protectedinherited

◆ m_jctSizeLabel

wxStaticText* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_jctSizeLabel
protectedinherited

◆ m_jctSizeUnits

wxStaticText* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_jctSizeUnits
protectedinherited

◆ m_junctionSize

UNIT_BINDER PANEL_EESCHEMA_DISPLAY_OPTIONS::m_junctionSize
private

◆ m_staticText26

wxStaticText* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_staticText26
protectedinherited

◆ m_wireWidth

UNIT_BINDER PANEL_EESCHEMA_DISPLAY_OPTIONS::m_wireWidth
private

◆ m_wireWidthCtrl

wxTextCtrl* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_wireWidthCtrl
protectedinherited

◆ m_wireWidthLabel

wxStaticText* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_wireWidthLabel
protectedinherited

◆ m_wireWidthUnits

wxStaticText* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_wireWidthUnits
protectedinherited

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