From: Jörg Buchwald Date: Wed, 20 Sep 2006 19:22:08 +0000 (+0000) Subject: re-added isotope properties X-Git-Tag: v3.80.2~33 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=7d8f1c2bb9a2a31ddf6c06a6472b450a95f739d6;p=libqmvoc.git re-added isotope properties svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=586849 --- diff --git a/libscience/isotopeparser.cpp b/libscience/isotopeparser.cpp index f830557..31c67c9 100644 --- a/libscience/isotopeparser.cpp +++ b/libscience/isotopeparser.cpp @@ -110,42 +110,6 @@ bool IsotopeParser::startElement(const QString&, const QString &localName, const if ( attrs.localName( i ) == "number" ) d->currentIsotope->setNucleons( attrs.value( i ).toInt() ); } - } else if (d->inIsotope && localName == "spin") { -//X kDebug() << "bo:spin" << endl; - d->inSpin = true; - } else if (d->inIsotope && localName == "magmoment") { -//X kDebug() << "bo:magneticMoment" << endl; - d->inMagMoment = true; -// }else if (d->inIsotope && localName == "halflife") { -//X kDebug() << "bo:halfLife" << endl; -// for (int i = 0; i < attrs.length(); ++i) -// { -// if ( attrs.localName( i ) == "unit" ) -// { -// d->currentDataObject->setUnit( d->currentUnit ); -// } -// else -// { -// d->currentUnit = ChemicalDataObject::noUnit; -// } -// } -// d->inHalfLife = true; -//X if ( d->currentUnit != ChemicalDataObject::noUnit ) -//X d->currentDataObject->setUnit( d->currentUnit ); - -//X d->currentUnit = ChemicalDataObject::noUnit; - } else if (d->inIsotope && localName == "alphadecay"){ -//X kDebug() << "bo:alphaDecay" << endl; - d->inAlphaDecay = true; - } else if (d->inIsotope && localName == "betaplusdecay"){ -//X kDebug() << "bo:betaplusDecay" << endl; - d->inBetaplusDecay = true; - } else if (d->inIsotope && localName == "betaminusdecay"){ -//X kDebug() << "bo:betaminusDecay" << endl; - d->inBetaminusDecay = true; - } else if (d->inIsotope && localName == "ecdecay"){ -//X kDebug() << "bo:ecDecay" << endl; - d->inECDecay = true; } else if (d->inIsotope && localName == "scalar") { for (int i = 0; i < attrs.length(); ++i) @@ -174,12 +138,22 @@ bool IsotopeParser::startElement(const QString&, const QString &localName, const } d->inHalfLife = true; } - } - } - else if (d->inIsotope && localName == "bo:relativeAbundance") { -//X kDebug() << "bo:relativeAbundance" << endl; - d->inAbundance = true; - } + else if (attrs.value(i) == "bo:alphaDecay") + d->inAlphaDecay = true; + else if (attrs.value(i) == "bo:ecDecay") + d->inECDecay = true; + else if (attrs.value(i) == "bo:betaminusDecay") + d->inBetaminusDecay = true; + else if (attrs.value(i) == "bo:betaplusDecay") + d->inBetaplusDecay = true; + else if (attrs.value(i) == "bo:spin") + d->inSpin = true; + else if (attrs.value(i) == "bo:magneticMoment") + d->inMagMoment = true; + else if (attrs.value(i) == "bo:relativeAbundance") + d->inAbundance = true; + } + } return true; }