KiCad PCB EDA Suite
PANEL_BOARD_CLASS_BASE Class Referenceabstract

Class PANEL_BOARD_CLASS_BASE. More...

#include <panel_board_class_base.h>

Inheritance diagram for PANEL_BOARD_CLASS_BASE:
CALCULATOR_PANEL PANEL_BOARD_CLASS

Public Member Functions

 PANEL_BOARD_CLASS_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(701, 347), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_BOARD_CLASS_BASE ()
 
virtual void LoadSettings (PCB_CALCULATOR_SETTINGS *aCfg)=0
 Load the settings into the panel. More...
 
virtual void SaveSettings (PCB_CALCULATOR_SETTINGS *aCfg)=0
 Save the settings from the panel. More...
 
virtual void ThemeChanged ()=0
 Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appropriate for the new theme. More...
 

Protected Member Functions

virtual void OnBoardClassesUnitsSelection (wxCommandEvent &event)
 

Protected Attributes

UNIT_SELECTOR_LENm_BoardClassesUnitsSelector
 
wxStaticText * m_staticTextBrdClass
 
wxGrid * m_gridClassesValuesDisplay
 
wxPanel * m_panelShowClassPrms
 

Detailed Description

Class PANEL_BOARD_CLASS_BASE.

Definition at line 33 of file panel_board_class_base.h.

Constructor & Destructor Documentation

◆ PANEL_BOARD_CLASS_BASE()

PANEL_BOARD_CLASS_BASE::PANEL_BOARD_CLASS_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize( 701,347 ),
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

Definition at line 14 of file panel_board_class_base.cpp.

14  : CALCULATOR_PANEL( parent, id, pos, size, style, name )
15 {
16  wxBoxSizer* bSizerBoardClass;
17  bSizerBoardClass = new wxBoxSizer( wxHORIZONTAL );
18 
19  wxBoxSizer* bSizerUnitsMargins;
20  bSizerUnitsMargins = new wxBoxSizer( wxVERTICAL );
21 
22  wxArrayString m_BoardClassesUnitsSelectorChoices;
23  m_BoardClassesUnitsSelector = new UNIT_SELECTOR_LEN( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_BoardClassesUnitsSelectorChoices, 0 );
24  m_BoardClassesUnitsSelector->SetSelection( 0 );
25  bSizerUnitsMargins->Add( m_BoardClassesUnitsSelector, 0, wxTOP|wxBOTTOM|wxRIGHT, 32 );
26 
27 
28  bSizerBoardClass->Add( bSizerUnitsMargins, 0, wxLEFT, 10 );
29 
30  wxBoxSizer* brdclsSizerRight;
31  brdclsSizerRight = new wxBoxSizer( wxVERTICAL );
32 
33  m_staticTextBrdClass = new wxStaticText( this, wxID_ANY, _("Note: Values are minimal values"), wxDefaultPosition, wxDefaultSize, 0 );
34  m_staticTextBrdClass->Wrap( -1 );
35  m_staticTextBrdClass->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
36 
37  brdclsSizerRight->Add( m_staticTextBrdClass, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
38 
39  m_gridClassesValuesDisplay = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
40 
41  // Grid
42  m_gridClassesValuesDisplay->CreateGrid( 5, 6 );
43  m_gridClassesValuesDisplay->EnableEditing( false );
44  m_gridClassesValuesDisplay->EnableGridLines( true );
45  m_gridClassesValuesDisplay->EnableDragGridSize( false );
46  m_gridClassesValuesDisplay->SetMargins( 0, 0 );
47 
48  // Columns
49  m_gridClassesValuesDisplay->SetColSize( 0, 100 );
50  m_gridClassesValuesDisplay->SetColSize( 1, 100 );
51  m_gridClassesValuesDisplay->SetColSize( 2, 100 );
52  m_gridClassesValuesDisplay->SetColSize( 3, 100 );
53  m_gridClassesValuesDisplay->SetColSize( 4, 100 );
54  m_gridClassesValuesDisplay->SetColSize( 5, 100 );
55  m_gridClassesValuesDisplay->EnableDragColMove( false );
56  m_gridClassesValuesDisplay->EnableDragColSize( true );
57  m_gridClassesValuesDisplay->SetColLabelValue( 0, _("Class 1") );
58  m_gridClassesValuesDisplay->SetColLabelValue( 1, _("Class 2") );
59  m_gridClassesValuesDisplay->SetColLabelValue( 2, _("Class 3") );
60  m_gridClassesValuesDisplay->SetColLabelValue( 3, _("Class 4") );
61  m_gridClassesValuesDisplay->SetColLabelValue( 4, _("Class 5") );
62  m_gridClassesValuesDisplay->SetColLabelValue( 5, _("Class 6") );
63  m_gridClassesValuesDisplay->SetColLabelSize( 30 );
64  m_gridClassesValuesDisplay->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
65 
66  // Rows
67  m_gridClassesValuesDisplay->SetRowSize( 0, 24 );
68  m_gridClassesValuesDisplay->SetRowSize( 1, 24 );
69  m_gridClassesValuesDisplay->SetRowSize( 2, 24 );
70  m_gridClassesValuesDisplay->SetRowSize( 3, 24 );
71  m_gridClassesValuesDisplay->SetRowSize( 4, 24 );
72  m_gridClassesValuesDisplay->EnableDragRowSize( false );
73  m_gridClassesValuesDisplay->SetRowLabelValue( 0, _("Lines width") );
74  m_gridClassesValuesDisplay->SetRowLabelValue( 1, _("Min clearance") );
75  m_gridClassesValuesDisplay->SetRowLabelValue( 2, _("Via: (diam - drill)") );
76  m_gridClassesValuesDisplay->SetRowLabelValue( 3, _("Plated Pad: (diam - drill)") );
77  m_gridClassesValuesDisplay->SetRowLabelValue( 4, _("NP Pad: (diam - drill)") );
78  m_gridClassesValuesDisplay->SetRowLabelSize( 160 );
79  m_gridClassesValuesDisplay->SetRowLabelAlignment( wxALIGN_RIGHT, wxALIGN_CENTER );
80 
81  // Label Appearance
82 
83  // Cell Defaults
84  m_gridClassesValuesDisplay->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_TOP );
85  brdclsSizerRight->Add( m_gridClassesValuesDisplay, 0, wxALL|wxEXPAND, 5 );
86 
87  m_panelShowClassPrms = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
88  brdclsSizerRight->Add( m_panelShowClassPrms, 1, wxALL|wxEXPAND, 5 );
89 
90 
91  bSizerBoardClass->Add( brdclsSizerRight, 1, wxEXPAND, 5 );
92 
93 
94  this->SetSizer( bSizerBoardClass );
95  this->Layout();
96 
97  // Connect Events
98  m_BoardClassesUnitsSelector->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_BOARD_CLASS_BASE::OnBoardClassesUnitsSelection ), NULL, this );
99 }
#define _(s)
virtual void OnBoardClassesUnitsSelection(wxCommandEvent &event)
CALCULATOR_PANEL(wxWindow *aParent, wxWindowID aId, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aName)
const char * name
Definition: DXF_plotter.cpp:56
UNIT_SELECTOR_LEN * m_BoardClassesUnitsSelector

References _, m_BoardClassesUnitsSelector, m_gridClassesValuesDisplay, m_panelShowClassPrms, m_staticTextBrdClass, and OnBoardClassesUnitsSelection().

◆ ~PANEL_BOARD_CLASS_BASE()

PANEL_BOARD_CLASS_BASE::~PANEL_BOARD_CLASS_BASE ( )

Definition at line 101 of file panel_board_class_base.cpp.

102 {
103  // Disconnect Events
104  m_BoardClassesUnitsSelector->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_BOARD_CLASS_BASE::OnBoardClassesUnitsSelection ), NULL, this );
105 
106 }
virtual void OnBoardClassesUnitsSelection(wxCommandEvent &event)
UNIT_SELECTOR_LEN * m_BoardClassesUnitsSelector

References m_BoardClassesUnitsSelector, and OnBoardClassesUnitsSelection().

Member Function Documentation

◆ LoadSettings()

virtual void CALCULATOR_PANEL::LoadSettings ( PCB_CALCULATOR_SETTINGS aCfg)
pure virtualinherited

Load the settings into the panel.

Parameters
aCfgis the settings structure to load from

Implemented in PANEL_REGULATOR, PANEL_ATTENUATORS, PANEL_COLOR_CODE, PANEL_TRANSLINE, PANEL_BOARD_CLASS, PANEL_ELECTRICAL_SPACING, PANEL_E_SERIE, PANEL_TRACK_WIDTH, and PANEL_VIA_SIZE.

◆ OnBoardClassesUnitsSelection()

virtual void PANEL_BOARD_CLASS_BASE::OnBoardClassesUnitsSelection ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_BOARD_CLASS.

Definition at line 44 of file panel_board_class_base.h.

44 { event.Skip(); }

Referenced by PANEL_BOARD_CLASS_BASE(), and ~PANEL_BOARD_CLASS_BASE().

◆ SaveSettings()

virtual void CALCULATOR_PANEL::SaveSettings ( PCB_CALCULATOR_SETTINGS aCfg)
pure virtualinherited

Save the settings from the panel.

Parameters
aCfgis the settings structure to save to

Implemented in PANEL_REGULATOR, PANEL_ATTENUATORS, PANEL_COLOR_CODE, PANEL_TRANSLINE, PANEL_BOARD_CLASS, PANEL_ELECTRICAL_SPACING, PANEL_E_SERIE, PANEL_TRACK_WIDTH, and PANEL_VIA_SIZE.

◆ ThemeChanged()

virtual void CALCULATOR_PANEL::ThemeChanged ( )
pure virtualinherited

Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appropriate for the new theme.

Implemented in PANEL_REGULATOR, PANEL_ATTENUATORS, PANEL_COLOR_CODE, PANEL_TRANSLINE, PANEL_BOARD_CLASS, PANEL_ELECTRICAL_SPACING, PANEL_E_SERIE, PANEL_TRACK_WIDTH, and PANEL_VIA_SIZE.

Member Data Documentation

◆ m_BoardClassesUnitsSelector

◆ m_gridClassesValuesDisplay

wxGrid* PANEL_BOARD_CLASS_BASE::m_gridClassesValuesDisplay
protected

◆ m_panelShowClassPrms

wxPanel* PANEL_BOARD_CLASS_BASE::m_panelShowClassPrms
protected

Definition at line 41 of file panel_board_class_base.h.

Referenced by PANEL_BOARD_CLASS_BASE().

◆ m_staticTextBrdClass

wxStaticText* PANEL_BOARD_CLASS_BASE::m_staticTextBrdClass
protected

Definition at line 39 of file panel_board_class_base.h.

Referenced by PANEL_BOARD_CLASS_BASE().


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