From 5077435a94e94277dc0e78d84d56185e9d1a42f0 Mon Sep 17 00:00:00 2001 From: Carsten Niehaus Date: Wed, 9 Mar 2005 14:46:54 +0000 Subject: [PATCH] * now the EN has always a value and is never -1 * improved the informationdialog * tooltip now contains information, not just dummy-stuff svn path=/trunk/kdeedu/kalzium/src/element.cpp; revision=396091 --- kalzium/src/element.cpp | 11 +++++++++++ kalzium/src/element.h | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/kalzium/src/element.cpp b/kalzium/src/element.cpp index 8a55b3e..481459b 100644 --- a/kalzium/src/element.cpp +++ b/kalzium/src/element.cpp @@ -71,6 +71,9 @@ Element::Element( int num ) QString Element::parsedOrbits() { + if ( m_orbits == "0" ) + return i18n( "structure means orbital configuration in this case", "Unknown structure" ); + QString orbits = m_orbits; QRegExp rxs("([a-z])([0-9]+)"); QRegExp rxb("([a-z]{2}) ",false); @@ -167,6 +170,14 @@ const QString Element::adjustUnits( const int type ) } } } + else if ( type == EN ) //Electronegativity + { + val = electroneg(); + if ( val == -1 ) + v = i18n( "Value not defined" ); + else + v = QString::number( val ); + } else if ( type == RADIUS ) // its a length { val = radius(); diff --git a/kalzium/src/element.h b/kalzium/src/element.h index 43d2005..7a05ae1 100644 --- a/kalzium/src/element.h +++ b/kalzium/src/element.h @@ -255,7 +255,8 @@ class Element{ BOILINGPOINT, MELTINGPOINT, IE, - IE2 + IE2, + EN }; -- 2.47.3