From: Jörg Buchwald Date: Sun, 17 Jul 2005 14:23:56 +0000 (+0000) Subject: convert magmoment to QString X-Git-Tag: v3.80.2~300^2~64 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=88860e13fc9e3338036cd94f48d925221c75e267;p=libqmvoc.git convert magmoment to QString svn path=/trunk/KDE/kdeedu/kalzium/src/element.cpp; revision=435578 --- diff --git a/kalzium/src/element.cpp b/kalzium/src/element.cpp index bc41ca5..c193d46 100644 --- a/kalzium/src/element.cpp +++ b/kalzium/src/element.cpp @@ -610,8 +610,8 @@ EList KalziumDataObject::readData( QDomDocument &dataDocument ) QString ecdecay = iso.attributeNode( "ecdecay" ).value(); double decayenergy = iso.attributeNode( "decayenergy" ).value().toDouble(); QString spin = iso.attributeNode( "spin" ).value(); - double magmoment = iso.attributeNode( "magmoment" ).value().toDouble(); - + QString magmoment = iso.attributeNode( "magmoment" ).value(); + bool alphadecay_ = false, betaminusdecay_ = false, betaplusdecay_ = false, ecdecay_ = false; if ( betaplusdecay == "true" ) betaplusdecay_ = true; if ( betaminusdecay == "true" ) betaminusdecay_ = true; @@ -683,7 +683,7 @@ const int KalziumDataObject::numberOfElements() const return m_numOfElements; } -Isotope::Isotope( int neutrons, double percentage, double weight, double halflife, QString format, bool alphadecay, bool betaplusdecay, bool betaminusdecay, bool ecdecay, double decayenergy, QString spin, double magmoment ) +Isotope::Isotope( int neutrons, double percentage, double weight, double halflife, QString format, bool alphadecay, bool betaplusdecay, bool betaminusdecay, bool ecdecay, double decayenergy, QString spin, QString magmoment ) { m_neutrons = neutrons; m_percentage = percentage; diff --git a/kalzium/src/element.h b/kalzium/src/element.h index 7d919ce..a158800 100644 --- a/kalzium/src/element.h +++ b/kalzium/src/element.h @@ -45,7 +45,7 @@ typedef QValueList doubleList; class Isotope { public: - Isotope( int neutrons, double percentage, double weight, double halflife, QString format, bool alphadecay, bool betaplusdecay, bool betaminusdecay, bool ecdecay, double decayenergy, QString spin, double magmoment); + Isotope( int neutrons, double percentage, double weight, double halflife, QString format, bool alphadecay, bool betaplusdecay, bool betaminusdecay, bool ecdecay, double decayenergy, QString spin, QString magmoment); bool seconds() const{ if ( m_format == "seconds" ) @@ -101,7 +101,7 @@ class Isotope return m_spin; } - double magmoment() const{ + QString magmoment() const{ return m_magmoment; } @@ -156,7 +156,7 @@ class Isotope /** * magnetic moment */ - double m_magmoment; + QString m_magmoment; }; /**