KiCad PCB EDA Suite
PANEL_SETUP_BOARD_STACKUP_BASE Class Reference

Class PANEL_SETUP_BOARD_STACKUP_BASE. More...

#include <panel_board_stackup_base.h>

Inheritance diagram for PANEL_SETUP_BOARD_STACKUP_BASE:
PANEL_SETUP_BOARD_STACKUP

Public Member Functions

 PANEL_SETUP_BOARD_STACKUP_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_SETUP_BOARD_STACKUP_BASE ()
 

Protected Member Functions

virtual void onCopperLayersSelCount (wxCommandEvent &event)
 
virtual void onAddDielectricLayer (wxCommandEvent &event)
 
virtual void onRemoveDielectricLayer (wxCommandEvent &event)
 
virtual void onRemoveDielUI (wxUpdateUIEvent &event)
 
virtual void onAdjustDielectricThickness (wxCommandEvent &event)
 
virtual void onExportToClipboard (wxCommandEvent &event)
 

Protected Attributes

wxStaticText * m_lblCopperLayers
 
wxChoice * m_choiceCopperLayers
 
wxCheckBox * m_impedanceControlled
 
wxButton * m_buttonAddDielectricLayer
 
wxButton * m_buttonRemoveDielectricLayer
 
WX_PANELm_panel1
 
wxScrolledWindow * m_scGridWin
 
wxFlexGridSizer * m_fgGridSizer
 
wxStaticText * m_staticTextLayer
 
wxStaticText * m_staticTextLayerId
 
wxStaticText * m_staticTextType
 
wxStaticText * m_staticTextMaterial
 
wxStaticText * m_staticTextThickness
 
wxStaticBitmap * m_bitmapLockThickness
 
wxStaticText * m_staticTextColor
 
wxStaticText * m_staticTextEpsilonR
 
wxStaticText * m_staticTextLossTg
 
wxStaticText * m_staticTextCT
 
wxTextCtrl * m_tcCTValue
 
wxButton * m_buttonAdjust
 
wxButton * m_buttonExport
 

Detailed Description

Constructor & Destructor Documentation

◆ PANEL_SETUP_BOARD_STACKUP_BASE()

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

Definition at line 14 of file panel_board_stackup_base.cpp.

14 : wxPanel( parent, id, pos, size, style, name )
15{
16 wxBoxSizer* bMainSizer;
17 bMainSizer = new wxBoxSizer( wxVERTICAL );
18
19 wxBoxSizer* bTopSizer;
20 bTopSizer = new wxBoxSizer( wxHORIZONTAL );
21
22 m_lblCopperLayers = new wxStaticText( this, wxID_ANY, _("Copper layers:"), wxDefaultPosition, wxDefaultSize, 0 );
23 m_lblCopperLayers->Wrap( -1 );
24 m_lblCopperLayers->SetToolTip( _("Select the number of copper layers in the stackup") );
25
26 bTopSizer->Add( m_lblCopperLayers, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
27
28 wxString m_choiceCopperLayersChoices[] = { _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16"), _("18"), _("20"), _("22"), _("24"), _("26"), _("28"), _("30"), _("32") };
29 int m_choiceCopperLayersNChoices = sizeof( m_choiceCopperLayersChoices ) / sizeof( wxString );
30 m_choiceCopperLayers = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceCopperLayersNChoices, m_choiceCopperLayersChoices, 0 );
31 m_choiceCopperLayers->SetSelection( 0 );
32 m_choiceCopperLayers->SetToolTip( _("Select the number of copper layers in the stackup") );
33
34 bTopSizer->Add( m_choiceCopperLayers, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
35
36
37 bTopSizer->Add( 40, 0, 1, wxEXPAND, 5 );
38
39 m_impedanceControlled = new wxCheckBox( this, wxID_ANY, _("Impedance controlled"), wxDefaultPosition, wxDefaultSize, 0 );
40 m_impedanceControlled->SetToolTip( _("If Impedance Controlled option is set,\nLoss tangent and EpsilonR will be added to constraints.") );
41
42 bTopSizer->Add( m_impedanceControlled, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
43
44
45 bTopSizer->Add( 40, 0, 1, wxEXPAND, 5 );
46
47 m_buttonAddDielectricLayer = new wxButton( this, wxID_ANY, _("Add Dielectric Layer..."), wxDefaultPosition, wxDefaultSize, 0 );
48 bTopSizer->Add( m_buttonAddDielectricLayer, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
49
50 m_buttonRemoveDielectricLayer = new wxButton( this, wxID_ANY, _("Remove Dielectric Layer..."), wxDefaultPosition, wxDefaultSize, 0 );
51 bTopSizer->Add( m_buttonRemoveDielectricLayer, 0, wxEXPAND|wxALL, 5 );
52
53
54 bMainSizer->Add( bTopSizer, 0, wxEXPAND|wxALL, 5 );
55
56 wxBoxSizer* m_sizerStackup;
57 m_sizerStackup = new wxBoxSizer( wxVERTICAL );
58
59 m_panel1 = new WX_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
60 wxBoxSizer* bSizer6;
61 bSizer6 = new wxBoxSizer( wxVERTICAL );
62
63
64 bSizer6->Add( 0, 1, 0, wxEXPAND, 5 );
65
66 m_scGridWin = new wxScrolledWindow( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE|wxHSCROLL|wxVSCROLL );
67 m_scGridWin->SetScrollRate( 5, 5 );
68 wxBoxSizer* bMargins;
69 bMargins = new wxBoxSizer( wxVERTICAL );
70
71 m_fgGridSizer = new wxFlexGridSizer( 0, 9, 0, 4 );
72 m_fgGridSizer->SetFlexibleDirection( wxHORIZONTAL );
73 m_fgGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
74
75 m_staticTextLayer = new wxStaticText( m_scGridWin, wxID_ANY, _("Layer"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
76 m_staticTextLayer->Wrap( -1 );
77 m_fgGridSizer->Add( m_staticTextLayer, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 2 );
78
79 m_staticTextLayerId = new wxStaticText( m_scGridWin, wxID_ANY, _("Id"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
80 m_staticTextLayerId->Wrap( -1 );
81 m_fgGridSizer->Add( m_staticTextLayerId, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
82
83 m_staticTextType = new wxStaticText( m_scGridWin, wxID_ANY, _("Type"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
84 m_staticTextType->Wrap( -1 );
85 m_fgGridSizer->Add( m_staticTextType, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 2 );
86
87 m_staticTextMaterial = new wxStaticText( m_scGridWin, wxID_ANY, _("Material"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
88 m_staticTextMaterial->Wrap( -1 );
89 m_fgGridSizer->Add( m_staticTextMaterial, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 2 );
90
91 m_staticTextThickness = new wxStaticText( m_scGridWin, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
92 m_staticTextThickness->Wrap( -1 );
93 m_fgGridSizer->Add( m_staticTextThickness, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 2 );
94
95 m_bitmapLockThickness = new wxStaticBitmap( m_scGridWin, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
96 m_fgGridSizer->Add( m_bitmapLockThickness, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
97
98 m_staticTextColor = new wxStaticText( m_scGridWin, wxID_ANY, _("Color"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
99 m_staticTextColor->Wrap( -1 );
100 m_fgGridSizer->Add( m_staticTextColor, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 2 );
101
102 m_staticTextEpsilonR = new wxStaticText( m_scGridWin, wxID_ANY, _("Epsilon R"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
103 m_staticTextEpsilonR->Wrap( -1 );
104 m_fgGridSizer->Add( m_staticTextEpsilonR, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 2 );
105
106 m_staticTextLossTg = new wxStaticText( m_scGridWin, wxID_ANY, _("Loss Tan"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
107 m_staticTextLossTg->Wrap( -1 );
108 m_fgGridSizer->Add( m_staticTextLossTg, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 2 );
109
110
111 bMargins->Add( m_fgGridSizer, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
112
113
114 m_scGridWin->SetSizer( bMargins );
115 m_scGridWin->Layout();
116 bMargins->Fit( m_scGridWin );
117 bSizer6->Add( m_scGridWin, 1, wxEXPAND|wxBOTTOM, 2 );
118
119
120 m_panel1->SetSizer( bSizer6 );
121 m_panel1->Layout();
122 bSizer6->Fit( m_panel1 );
123 m_sizerStackup->Add( m_panel1, 1, wxEXPAND, 5 );
124
125
126 bMainSizer->Add( m_sizerStackup, 3, wxEXPAND|wxBOTTOM, 5 );
127
128 wxBoxSizer* bBottomSizer;
129 bBottomSizer = new wxBoxSizer( wxHORIZONTAL );
130
131 m_staticTextCT = new wxStaticText( this, wxID_ANY, _("Board thickness from stackup:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
132 m_staticTextCT->Wrap( -1 );
133 bBottomSizer->Add( m_staticTextCT, 0, wxALIGN_CENTER_VERTICAL, 5 );
134
135 m_tcCTValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
136 bBottomSizer->Add( m_tcCTValue, 0, wxALL|wxALIGN_CENTER_VERTICAL, 2 );
137
138
139 bBottomSizer->Add( 10, 0, 0, wxEXPAND, 5 );
140
141 m_buttonAdjust = new wxButton( this, wxID_ANY, _("Adjust Dielectric Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
142 bBottomSizer->Add( m_buttonAdjust, 0, wxALL|wxALIGN_CENTER_VERTICAL, 2 );
143
144
145 bBottomSizer->Add( 0, 0, 1, wxEXPAND, 5 );
146
147 m_buttonExport = new wxButton( this, wxID_ANY, _("Export to Clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
148 bBottomSizer->Add( m_buttonExport, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 2 );
149
150
151 bMainSizer->Add( bBottomSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
152
153
154 this->SetSizer( bMainSizer );
155 this->Layout();
156 bMainSizer->Fit( this );
157
158 // Connect Events
159 m_choiceCopperLayers->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onCopperLayersSelCount ), NULL, this );
160 m_buttonAddDielectricLayer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onAddDielectricLayer ), NULL, this );
161 m_buttonRemoveDielectricLayer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onRemoveDielectricLayer ), NULL, this );
162 m_buttonRemoveDielectricLayer->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onRemoveDielUI ), NULL, this );
163 m_buttonAdjust->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onAdjustDielectricThickness ), NULL, this );
164 m_buttonExport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onExportToClipboard ), NULL, this );
165}
const char * name
Definition: DXF_plotter.cpp:56
virtual void onAdjustDielectricThickness(wxCommandEvent &event)
virtual void onExportToClipboard(wxCommandEvent &event)
virtual void onRemoveDielectricLayer(wxCommandEvent &event)
virtual void onRemoveDielUI(wxUpdateUIEvent &event)
virtual void onCopperLayersSelCount(wxCommandEvent &event)
virtual void onAddDielectricLayer(wxCommandEvent &event)
#define _(s)

References _, m_bitmapLockThickness, m_buttonAddDielectricLayer, m_buttonAdjust, m_buttonExport, m_buttonRemoveDielectricLayer, m_choiceCopperLayers, m_fgGridSizer, m_impedanceControlled, m_lblCopperLayers, m_panel1, m_scGridWin, m_staticTextColor, m_staticTextCT, m_staticTextEpsilonR, m_staticTextLayer, m_staticTextLayerId, m_staticTextLossTg, m_staticTextMaterial, m_staticTextThickness, m_staticTextType, m_tcCTValue, onAddDielectricLayer(), onAdjustDielectricThickness(), onCopperLayersSelCount(), onExportToClipboard(), onRemoveDielectricLayer(), and onRemoveDielUI().

◆ ~PANEL_SETUP_BOARD_STACKUP_BASE()

PANEL_SETUP_BOARD_STACKUP_BASE::~PANEL_SETUP_BOARD_STACKUP_BASE ( )

Definition at line 167 of file panel_board_stackup_base.cpp.

168{
169 // Disconnect Events
170 m_choiceCopperLayers->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onCopperLayersSelCount ), NULL, this );
171 m_buttonAddDielectricLayer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onAddDielectricLayer ), NULL, this );
172 m_buttonRemoveDielectricLayer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onRemoveDielectricLayer ), NULL, this );
173 m_buttonRemoveDielectricLayer->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onRemoveDielUI ), NULL, this );
174 m_buttonAdjust->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onAdjustDielectricThickness ), NULL, this );
175 m_buttonExport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onExportToClipboard ), NULL, this );
176
177}

References m_buttonAddDielectricLayer, m_buttonAdjust, m_buttonExport, m_buttonRemoveDielectricLayer, m_choiceCopperLayers, onAddDielectricLayer(), onAdjustDielectricThickness(), onCopperLayersSelCount(), onExportToClipboard(), onRemoveDielectricLayer(), and onRemoveDielUI().

Member Function Documentation

◆ onAddDielectricLayer()

virtual void PANEL_SETUP_BOARD_STACKUP_BASE::onAddDielectricLayer ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SETUP_BOARD_STACKUP.

Definition at line 68 of file panel_board_stackup_base.h.

68{ event.Skip(); }

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

◆ onAdjustDielectricThickness()

virtual void PANEL_SETUP_BOARD_STACKUP_BASE::onAdjustDielectricThickness ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SETUP_BOARD_STACKUP.

Definition at line 71 of file panel_board_stackup_base.h.

71{ event.Skip(); }

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

◆ onCopperLayersSelCount()

virtual void PANEL_SETUP_BOARD_STACKUP_BASE::onCopperLayersSelCount ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SETUP_BOARD_STACKUP.

Definition at line 67 of file panel_board_stackup_base.h.

67{ event.Skip(); }

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

◆ onExportToClipboard()

virtual void PANEL_SETUP_BOARD_STACKUP_BASE::onExportToClipboard ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SETUP_BOARD_STACKUP.

Definition at line 72 of file panel_board_stackup_base.h.

72{ event.Skip(); }

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

◆ onRemoveDielectricLayer()

virtual void PANEL_SETUP_BOARD_STACKUP_BASE::onRemoveDielectricLayer ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SETUP_BOARD_STACKUP.

Definition at line 69 of file panel_board_stackup_base.h.

69{ event.Skip(); }

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

◆ onRemoveDielUI()

virtual void PANEL_SETUP_BOARD_STACKUP_BASE::onRemoveDielUI ( wxUpdateUIEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SETUP_BOARD_STACKUP.

Definition at line 70 of file panel_board_stackup_base.h.

70{ event.Skip(); }

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

Member Data Documentation

◆ m_bitmapLockThickness

wxStaticBitmap* PANEL_SETUP_BOARD_STACKUP_BASE::m_bitmapLockThickness
protected

◆ m_buttonAddDielectricLayer

wxButton* PANEL_SETUP_BOARD_STACKUP_BASE::m_buttonAddDielectricLayer
protected

◆ m_buttonAdjust

wxButton* PANEL_SETUP_BOARD_STACKUP_BASE::m_buttonAdjust
protected

◆ m_buttonExport

wxButton* PANEL_SETUP_BOARD_STACKUP_BASE::m_buttonExport
protected

◆ m_buttonRemoveDielectricLayer

wxButton* PANEL_SETUP_BOARD_STACKUP_BASE::m_buttonRemoveDielectricLayer
protected

◆ m_choiceCopperLayers

wxChoice* PANEL_SETUP_BOARD_STACKUP_BASE::m_choiceCopperLayers
protected

◆ m_fgGridSizer

◆ m_impedanceControlled

wxCheckBox* PANEL_SETUP_BOARD_STACKUP_BASE::m_impedanceControlled
protected

◆ m_lblCopperLayers

wxStaticText* PANEL_SETUP_BOARD_STACKUP_BASE::m_lblCopperLayers
protected

Definition at line 44 of file panel_board_stackup_base.h.

Referenced by PANEL_SETUP_BOARD_STACKUP_BASE().

◆ m_panel1

WX_PANEL* PANEL_SETUP_BOARD_STACKUP_BASE::m_panel1
protected

◆ m_scGridWin

◆ m_staticTextColor

wxStaticText* PANEL_SETUP_BOARD_STACKUP_BASE::m_staticTextColor
protected

◆ m_staticTextCT

wxStaticText* PANEL_SETUP_BOARD_STACKUP_BASE::m_staticTextCT
protected

Definition at line 61 of file panel_board_stackup_base.h.

Referenced by PANEL_SETUP_BOARD_STACKUP_BASE().

◆ m_staticTextEpsilonR

wxStaticText* PANEL_SETUP_BOARD_STACKUP_BASE::m_staticTextEpsilonR
protected

◆ m_staticTextLayer

wxStaticText* PANEL_SETUP_BOARD_STACKUP_BASE::m_staticTextLayer
protected

◆ m_staticTextLayerId

wxStaticText* PANEL_SETUP_BOARD_STACKUP_BASE::m_staticTextLayerId
protected

◆ m_staticTextLossTg

wxStaticText* PANEL_SETUP_BOARD_STACKUP_BASE::m_staticTextLossTg
protected

◆ m_staticTextMaterial

wxStaticText* PANEL_SETUP_BOARD_STACKUP_BASE::m_staticTextMaterial
protected

◆ m_staticTextThickness

wxStaticText* PANEL_SETUP_BOARD_STACKUP_BASE::m_staticTextThickness
protected

◆ m_staticTextType

wxStaticText* PANEL_SETUP_BOARD_STACKUP_BASE::m_staticTextType
protected

◆ m_tcCTValue


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