pcb_calculator, panel_corrosion.cpp: fix typos and clean code.
Make material names translatable.
This commit is contained in:
parent
46016cfc61
commit
6f7730a34f
|
@ -20,14 +20,10 @@
|
|||
#include <calculator_panels/panel_corrosion.h>
|
||||
#include <pcb_calculator_settings.h>
|
||||
#include <widgets/unit_selector.h>
|
||||
#include <math/util.h> // for KiROUND
|
||||
#include <math/util.h> // for KiROUND
|
||||
|
||||
extern double DoubleFromString( const wxString& TextValue );
|
||||
|
||||
#define CORROSION_VOLTAGE_1 0.3
|
||||
#define CORROSION_VOLTAGE_2 0.5
|
||||
#define CORROSION_VOLTAGE_3 0.8
|
||||
|
||||
|
||||
CORROSION_TABLE_ENTRY::CORROSION_TABLE_ENTRY( wxString aName, wxString aSymbol, double aPot )
|
||||
{
|
||||
|
@ -41,30 +37,30 @@ PANEL_CORROSION::PANEL_CORROSION( wxWindow* parent, wxWindowID id, const wxPoint
|
|||
PANEL_CORROSION_BASE( parent, id, pos, size, style, name )
|
||||
{
|
||||
m_entries.clear();
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Platinum" ), "Pt", -0.57 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Gold" ), "Au", -0.44 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Titanium" ), "Ti", -0.32 ) );
|
||||
m_entries.emplace_back(
|
||||
CORROSION_TABLE_ENTRY( wxT( "Stainless steel 18-9" ), "X8CrNiS18-9", -0.32 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Silver" ), "Ag", -0.22 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Mercury" ), "Hg", -0.22 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Nickel" ), "Ni", -0.14 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Copper" ), "Cu", 0.0 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Copper-Aluminium" ), "CuAl10", 0.03 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Brass" ), "CuZn39Pb", 0.08 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Bronze" ), "CuSn12", 0.2 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Tin" ), "CuSn12", 0.23 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Lead" ), "Pb", 0.27 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Aluminium-Copper" ), "AlCu4Mg", 0.37 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Cast iron" ), "", 0.38 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Carbon steel" ), "", 0.43 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Aluminium" ), "Al", 0.52 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Cadmium" ), "Al", 0.53 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Iron" ), "Fe", 0.535 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Chrome" ), "Fe", 0.63 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Zinc" ), "Zn", 0.83 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Manganese" ), "Mn", 0.9 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( wxT( "Magnesium" ), "Mg", 1.38 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Platinum" ), "Pt", -0.57 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Gold" ), "Au", -0.44 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Titanium" ), "Ti", -0.32 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Stainless steel 18-9" ), "X8CrNiS18-9",
|
||||
-0.32 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Silver" ), "Ag", -0.22 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Mercury" ), "Hg", -0.22 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Nickel" ), "Ni", -0.14 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Copper" ), "Cu", 0.0 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Copper-Aluminium" ), "CuAl10", 0.03 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Brass" ), "CuZn39Pb", 0.08 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Bronze" ), "CuSn12", 0.2 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Tin" ), "Sn", 0.23 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Lead" ), "Pb", 0.27 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Aluminium-Copper" ), "AlCu4Mg", 0.37 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Cast iron" ), "", 0.38 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Carbon steel" ), "", 0.43 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Aluminium" ), "Al", 0.52 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Cadmium" ), "Cd", 0.53 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Iron" ), "Fe", 0.535 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Chrome" ), "Cr", 0.63 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Zinc" ), "Zn", 0.83 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Manganese" ), "Mn", 0.9 ) );
|
||||
m_entries.emplace_back( CORROSION_TABLE_ENTRY( _( "Magnesium" ), "Mg", 1.38 ) );
|
||||
|
||||
// Resize the table
|
||||
|
||||
|
|
Loading…
Reference in New Issue