]> Git trees. - libqmvoc.git/commitdiff
* now the EN has always a value and is never -1
authorCarsten Niehaus <cniehaus@gmx.de>
Wed, 9 Mar 2005 14:46:54 +0000 (14:46 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Wed, 9 Mar 2005 14:46:54 +0000 (14:46 +0000)
* 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
kalzium/src/element.h

index 8a55b3e0230219b41060660681de8db097c6fe4d..481459b13d93daa466558143733abccace07a017 100644 (file)
@@ -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();
index 43d20057b7667744f45b23fb1591f1965a8bcfdd..7a05ae127dbcfeab8094cc8921ac173029f1779e 100644 (file)
@@ -255,7 +255,8 @@ class Element{
                        BOILINGPOINT,
                        MELTINGPOINT,
                        IE,
-                       IE2
+                       IE2,
+                       EN
                };