KiCad PCB EDA Suite
PANEL_GALVANIC_CORROSION_BASE Class Referenceabstract

Class PANEL_GALVANIC_CORROSION_BASE. More...

#include <panel_galvanic_corrosion_base.h>

Inheritance diagram for PANEL_GALVANIC_CORROSION_BASE:
CALCULATOR_PANEL PANEL_GALVANIC_CORROSION

Public Member Functions

 PANEL_GALVANIC_CORROSION_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_GALVANIC_CORROSION_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 OnCorFilterChange (wxCommandEvent &event)
 
virtual void OnNomenclatureChange (wxCommandEvent &event)
 

Protected Attributes

wxBoxSizer * bSizer6
 
wxScrolledWindow * m_scrolledWindow1
 
wxGrid * m_table
 
HTML_WINDOWm_helpText
 
wxStaticText * m_staticText2
 
wxTextCtrl * m_corFilterCtrl
 
wxStaticText * m_staticText3
 
wxStaticLine * m_staticline1
 
wxRadioButton * m_radioBtnSymbol
 
wxRadioButton * m_radioBtnName
 

Detailed Description

Constructor & Destructor Documentation

◆ PANEL_GALVANIC_CORROSION_BASE()

PANEL_GALVANIC_CORROSION_BASE::PANEL_GALVANIC_CORROSION_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 12 of file panel_galvanic_corrosion_base.cpp.

12 : CALCULATOR_PANEL( parent, id, pos, size, style, name )
13{
14 bSizer6 = new wxBoxSizer( wxVERTICAL );
15
16 m_scrolledWindow1 = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL );
17 m_scrolledWindow1->SetScrollRate( 5, 5 );
18 wxBoxSizer* bSizer7;
19 bSizer7 = new wxBoxSizer( wxVERTICAL );
20
21 m_table = new wxGrid( m_scrolledWindow1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
22
23 // Grid
24 m_table->CreateGrid( 1, 1 );
25 m_table->EnableEditing( true );
26 m_table->EnableGridLines( true );
27 m_table->EnableDragGridSize( false );
28 m_table->SetMargins( 0, 0 );
29
30 // Columns
31 m_table->EnableDragColMove( false );
32 m_table->EnableDragColSize( true );
33 m_table->SetColLabelValue( 0, _("Copper (Cu)") );
34 m_table->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
35
36 // Rows
37 m_table->EnableDragRowSize( true );
38 m_table->SetRowLabelValue( 0, _("Copper (Cu)") );
39 m_table->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
40
41 // Label Appearance
42
43 // Cell Defaults
44 m_table->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
45 bSizer7->Add( m_table, 0, 0, 5 );
46
47
48 m_scrolledWindow1->SetSizer( bSizer7 );
49 m_scrolledWindow1->Layout();
50 bSizer7->Fit( m_scrolledWindow1 );
51 bSizer6->Add( m_scrolledWindow1, 1, wxEXPAND|wxALL, 5 );
52
53 m_helpText = new HTML_WINDOW( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
54 m_helpText->SetMinSize( wxSize( 400,110 ) );
55
56 bSizer6->Add( m_helpText, 0, wxALL|wxEXPAND, 5 );
57
58 wxBoxSizer* bSizer5;
59 bSizer5 = new wxBoxSizer( wxHORIZONTAL );
60
61 wxBoxSizer* bSizer3;
62 bSizer3 = new wxBoxSizer( wxHORIZONTAL );
63
64 m_staticText2 = new wxStaticText( this, wxID_ANY, _("Threshold voltage:"), wxDefaultPosition, wxDefaultSize, 0 );
65 m_staticText2->Wrap( -1 );
66 bSizer3->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxTOP, 5 );
67
68 m_corFilterCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
69 m_corFilterCtrl->SetMinSize( wxSize( 100,-1 ) );
70
71 bSizer3->Add( m_corFilterCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
72
73 m_staticText3 = new wxStaticText( this, wxID_ANY, _("mV"), wxDefaultPosition, wxDefaultSize, 0 );
74 m_staticText3->Wrap( -1 );
75 bSizer3->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
76
77 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
78 m_staticline1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
79
80 bSizer3->Add( m_staticline1, 0, wxEXPAND, 5 );
81
82
83 bSizer5->Add( bSizer3, 0, 0, 5 );
84
85 wxBoxSizer* bSizer4;
86 bSizer4 = new wxBoxSizer( wxHORIZONTAL );
87
88 m_radioBtnSymbol = new wxRadioButton( this, wxID_ANY, _("Symbols"), wxDefaultPosition, wxDefaultSize, 0 );
89 bSizer4->Add( m_radioBtnSymbol, 0, 0, 5 );
90
91 m_radioBtnName = new wxRadioButton( this, wxID_ANY, _("Names"), wxDefaultPosition, wxDefaultSize, 0 );
92 bSizer4->Add( m_radioBtnName, 0, 0, 5 );
93
94
95 bSizer5->Add( bSizer4, 0, wxALIGN_CENTER_VERTICAL, 5 );
96
97
98 bSizer6->Add( bSizer5, 0, wxEXPAND, 5 );
99
100
101 this->SetSizer( bSizer6 );
102 this->Layout();
103 bSizer6->Fit( this );
104
105 // Connect Events
106 m_corFilterCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_GALVANIC_CORROSION_BASE::OnCorFilterChange ), NULL, this );
107 m_radioBtnSymbol->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_GALVANIC_CORROSION_BASE::OnNomenclatureChange ), NULL, this );
108 m_radioBtnName->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_GALVANIC_CORROSION_BASE::OnNomenclatureChange ), NULL, this );
109}
const char * name
Definition: DXF_plotter.cpp:56
CALCULATOR_PANEL(wxWindow *aParent, wxWindowID aId, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aName)
Add dark theme support to wxHtmlWindow.
Definition: html_window.h:34
virtual void OnCorFilterChange(wxCommandEvent &event)
virtual void OnNomenclatureChange(wxCommandEvent &event)
#define _(s)

References _, bSizer6, m_corFilterCtrl, m_helpText, m_radioBtnName, m_radioBtnSymbol, m_scrolledWindow1, m_staticline1, m_staticText2, m_staticText3, m_table, OnCorFilterChange(), and OnNomenclatureChange().

◆ ~PANEL_GALVANIC_CORROSION_BASE()

PANEL_GALVANIC_CORROSION_BASE::~PANEL_GALVANIC_CORROSION_BASE ( )

Definition at line 111 of file panel_galvanic_corrosion_base.cpp.

112{
113 // Disconnect Events
114 m_corFilterCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_GALVANIC_CORROSION_BASE::OnCorFilterChange ), NULL, this );
115 m_radioBtnSymbol->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_GALVANIC_CORROSION_BASE::OnNomenclatureChange ), NULL, this );
116 m_radioBtnName->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_GALVANIC_CORROSION_BASE::OnNomenclatureChange ), NULL, this );
117
118}

References m_corFilterCtrl, m_radioBtnName, m_radioBtnSymbol, OnCorFilterChange(), and OnNomenclatureChange().

Member Function Documentation

◆ LoadSettings()

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

◆ OnCorFilterChange()

virtual void PANEL_GALVANIC_CORROSION_BASE::OnCorFilterChange ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_GALVANIC_CORROSION.

Definition at line 53 of file panel_galvanic_corrosion_base.h.

53{ event.Skip(); }

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

◆ OnNomenclatureChange()

virtual void PANEL_GALVANIC_CORROSION_BASE::OnNomenclatureChange ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_GALVANIC_CORROSION.

Definition at line 54 of file panel_galvanic_corrosion_base.h.

54{ event.Skip(); }

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

◆ SaveSettings()

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

◆ 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_BOARD_CLASS, PANEL_CABLE_SIZE, PANEL_COLOR_CODE, PANEL_ELECTRICAL_SPACING, PANEL_E_SERIES, PANEL_FUSING_CURRENT, PANEL_GALVANIC_CORROSION, PANEL_REGULATOR, PANEL_RF_ATTENUATORS, PANEL_TRACK_WIDTH, PANEL_TRANSLINE, PANEL_VIA_SIZE, and PANEL_WAVELENGTH.

Member Data Documentation

◆ bSizer6

wxBoxSizer* PANEL_GALVANIC_CORROSION_BASE::bSizer6
protected

Definition at line 41 of file panel_galvanic_corrosion_base.h.

Referenced by PANEL_GALVANIC_CORROSION_BASE().

◆ m_corFilterCtrl

wxTextCtrl* PANEL_GALVANIC_CORROSION_BASE::m_corFilterCtrl
protected

◆ m_helpText

◆ m_radioBtnName

wxRadioButton* PANEL_GALVANIC_CORROSION_BASE::m_radioBtnName
protected

◆ m_radioBtnSymbol

wxRadioButton* PANEL_GALVANIC_CORROSION_BASE::m_radioBtnSymbol
protected

◆ m_scrolledWindow1

wxScrolledWindow* PANEL_GALVANIC_CORROSION_BASE::m_scrolledWindow1
protected

Definition at line 42 of file panel_galvanic_corrosion_base.h.

Referenced by PANEL_GALVANIC_CORROSION_BASE().

◆ m_staticline1

wxStaticLine* PANEL_GALVANIC_CORROSION_BASE::m_staticline1
protected

Definition at line 48 of file panel_galvanic_corrosion_base.h.

Referenced by PANEL_GALVANIC_CORROSION_BASE().

◆ m_staticText2

wxStaticText* PANEL_GALVANIC_CORROSION_BASE::m_staticText2
protected

Definition at line 45 of file panel_galvanic_corrosion_base.h.

Referenced by PANEL_GALVANIC_CORROSION_BASE().

◆ m_staticText3

wxStaticText* PANEL_GALVANIC_CORROSION_BASE::m_staticText3
protected

Definition at line 47 of file panel_galvanic_corrosion_base.h.

Referenced by PANEL_GALVANIC_CORROSION_BASE().

◆ m_table

wxGrid* PANEL_GALVANIC_CORROSION_BASE::m_table
protected

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