]> Git trees. - libqmvoc.git/commitdiff
* fix some bugs with the isotopetable
authorCarsten Niehaus <cniehaus@gmx.de>
Tue, 14 Jun 2005 14:43:57 +0000 (14:43 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Tue, 14 Jun 2005 14:43:57 +0000 (14:43 +0000)
* add more date/fix data

svn path=/trunk/KDE/kdeedu/kalzium/src/element.cpp; revision=425352

kalzium/src/element.cpp

index 9043c63adfa2c0cd8a15f55a7b00e93aeaa04c80..923461252cda76df79f7b0c91885bc66ca99fb34 100644 (file)
@@ -744,16 +744,19 @@ QString Isotope::halflifeToHtml() const
                        halflife = i18n("%1 billion years").arg( m_halflife/1000000000.0 );
                else
                        halflife = i18n("%1 years").arg( m_halflife );
-//             return halflife;
        }
        else
        {
                if ( m_halflife < 120 )
                        halflife = i18n("%1 seconds").arg( m_halflife );
-               else if ( m_halflife > 1200 )
+               else if ( m_halflife > 1000 )
                        halflife = i18n("%1 minutes").arg( m_halflife/60.0 );
-               else if ( m_halflife > 12000 )
-                       halflife = i18n("%1 days").arg( m_halflife/3600.0 );
+               else if ( m_halflife > 3600 )
+                       halflife = i18n("%1 hours").arg( m_halflife/( 60*60 ) );
+               if ( m_halflife > 86400 )   //one day
+                       halflife = i18n("%1 days").arg( m_halflife/( 60*60*24 ) );
+               if ( m_halflife > ( 31536000 * 2 ) ) //two year
+                       halflife = i18n("%1 years").arg( m_halflife/( 3600.0*365 ));
        }
 
        return halflife;