From: Carsten Niehaus Date: Wed, 19 Jan 2005 12:53:29 +0000 (+0000) Subject: respect the energie-unit in HEAD as well X-Git-Tag: v3.80.2~300^2~160 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=534f88b05d85d4f1e8a5fcc85a854c35bb6bc5fa;p=libqmvoc.git respect the energie-unit in HEAD as well svn path=/trunk/kdeedu/kalzium/src/element.cpp; revision=380063 --- diff --git a/kalzium/src/element.cpp b/kalzium/src/element.cpp index a32be67..27df2b6 100644 --- a/kalzium/src/element.cpp +++ b/kalzium/src/element.cpp @@ -98,8 +98,17 @@ const QString Element::adjustUnits( const int type ) v = i18n( "Value unknown" ); else { - v = QString::number( val ); - v.append( "eV" ); + if ( Prefs::energies() == 0 ) + { + val*=96.6; + v = QString::number( val ); + v.append( "kj/mol" ); + } + else // use electronvolt + { + v = QString::number( val ); + v.append( "eV" ); + } } } else if ( type == BOILINGPOINT || type == MELTINGPOINT ) // convert a temperature