KiCad PCB EDA Suite
panel_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
24#include <vector>
25
27
29{
30public:
31 CORROSION_TABLE_ENTRY( wxString aName, wxString aSymbol, double aPot );
33 wxString m_name;
35 wxString m_symbol;
38};
39
41{
42public:
43 PANEL_CORROSION( wxWindow* parent, wxWindowID id = wxID_ANY,
44 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
45 long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
47
48 std::vector<CORROSION_TABLE_ENTRY> m_entries;
49 // Methods from CALCULATOR_PANEL that must be overriden
50 void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
51 void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
52 void ThemeChanged() override;
53 void OnCorFilterChange( wxCommandEvent& aEvent ) override;
54private:
56 void FillTable();
57};
58
59#endif
const char * name
Definition: DXF_plotter.cpp:56
wxString m_symbol
Chemical symbol (Cu), not translatable.
CORROSION_TABLE_ENTRY(wxString aName, wxString aSymbol, double aPot)
wxString m_name
Translatable name ( Copper )
double m_potential
potential in volts, relative to copper
Class PANEL_CORROSION_BASE.
void ThemeChanged() override
Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appr...
std::vector< CORROSION_TABLE_ENTRY > m_entries
PANEL_CORROSION(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void OnCorFilterChange(wxCommandEvent &aEvent) override
void LoadSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Load the settings into the panel.
void SaveSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Save the settings from the panel.