KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_galvanic_corrosion.h
Go to the documentation of this file.
1
/*
2
* This program source code file is part of KICAD, a free EDA CAD application.
3
*
4
* Copyright (C) 1992-2022 Kicad Developers, see AUTHORS.txt for contributors.
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 3
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef PANEL_CORROSION_H
21
#define PANEL_CORROSION_H
22
23
#include "
panel_galvanic_corrosion_base.h
"
24
#include <vector>
25
26
class
PCB_CALCULATOR_SETTINGS
;
27
28
class
CORROSION_TABLE_ENTRY
29
{
30
public
:
31
CORROSION_TABLE_ENTRY
(
const
wxString& aName,
const
wxString& aSymbol,
double
aPotential );
33
wxString
m_name
;
35
wxString
m_symbol
;
37
double
m_potential
;
38
};
39
40
class
PANEL_GALVANIC_CORROSION
:
public
PANEL_GALVANIC_CORROSION_BASE
41
{
42
public
:
43
PANEL_GALVANIC_CORROSION
( wxWindow* parent, wxWindowID
id
= wxID_ANY,
44
const
wxPoint& pos = wxDefaultPosition,
45
const
wxSize& size = wxDefaultSize,
46
long
style = wxTAB_TRAVERSAL,
const
wxString&
name
= wxEmptyString );
47
~PANEL_GALVANIC_CORROSION
();
48
49
std::vector<CORROSION_TABLE_ENTRY>
m_entries
;
50
// Methods from CALCULATOR_PANEL that must be overriden
51
void
LoadSettings
(
PCB_CALCULATOR_SETTINGS
* aCfg )
override
;
52
void
SaveSettings
(
PCB_CALCULATOR_SETTINGS
* aCfg )
override
;
53
void
ThemeChanged
()
override
;
54
void
OnNomenclatureChange
( wxCommandEvent& aEvent )
override
;
55
void
OnCorFilterChange
( wxCommandEvent& aEvent )
override
;
56
57
private
:
58
void
fillTable
();
59
60
private
:
61
bool
m_symbolicStatus
;
62
double
m_corFilterValue
;
63
};
64
65
#endif
name
const char * name
Definition:
DXF_plotter.cpp:57
CORROSION_TABLE_ENTRY
Definition:
panel_galvanic_corrosion.h:29
CORROSION_TABLE_ENTRY::m_symbol
wxString m_symbol
Chemical symbol (Cu), not translatable.
Definition:
panel_galvanic_corrosion.h:35
CORROSION_TABLE_ENTRY::m_name
wxString m_name
Translatable name ( Copper )
Definition:
panel_galvanic_corrosion.h:33
CORROSION_TABLE_ENTRY::m_potential
double m_potential
potential in volts, relative to copper
Definition:
panel_galvanic_corrosion.h:37
PANEL_GALVANIC_CORROSION_BASE
Class PANEL_GALVANIC_CORROSION_BASE.
Definition:
panel_galvanic_corrosion_base.h:37
PANEL_GALVANIC_CORROSION
Definition:
panel_galvanic_corrosion.h:41
PANEL_GALVANIC_CORROSION::m_symbolicStatus
bool m_symbolicStatus
Definition:
panel_galvanic_corrosion.h:61
PANEL_GALVANIC_CORROSION::OnNomenclatureChange
void OnNomenclatureChange(wxCommandEvent &aEvent) override
Definition:
panel_galvanic_corrosion.cpp:121
PANEL_GALVANIC_CORROSION::~PANEL_GALVANIC_CORROSION
~PANEL_GALVANIC_CORROSION()
Definition:
panel_galvanic_corrosion.cpp:89
PANEL_GALVANIC_CORROSION::m_corFilterValue
double m_corFilterValue
Definition:
panel_galvanic_corrosion.h:62
PANEL_GALVANIC_CORROSION::m_entries
std::vector< CORROSION_TABLE_ENTRY > m_entries
Definition:
panel_galvanic_corrosion.h:49
PANEL_GALVANIC_CORROSION::ThemeChanged
void ThemeChanged() override
Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appr...
Definition:
panel_galvanic_corrosion.cpp:93
PANEL_GALVANIC_CORROSION::OnCorFilterChange
void OnCorFilterChange(wxCommandEvent &aEvent) override
Definition:
panel_galvanic_corrosion.cpp:137
PANEL_GALVANIC_CORROSION::LoadSettings
void LoadSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Load the settings into the panel.
Definition:
panel_galvanic_corrosion.cpp:100
PANEL_GALVANIC_CORROSION::fillTable
void fillTable()
Definition:
panel_galvanic_corrosion.cpp:144
PANEL_GALVANIC_CORROSION::SaveSettings
void SaveSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Save the settings from the panel.
Definition:
panel_galvanic_corrosion.cpp:115
PCB_CALCULATOR_SETTINGS
Definition:
pcb_calculator_settings.h:43
panel_galvanic_corrosion_base.h
src
pcb_calculator
calculator_panels
panel_galvanic_corrosion.h
Generated on Fri Nov 22 2024 00:04:55 for KiCad PCB EDA Suite by
1.9.6