From: Jörg Buchwald Date: Tue, 29 Aug 2006 13:56:57 +0000 (+0000) Subject: added halflife unit X-Git-Tag: v3.80.2~58 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=7b1e3c971c167a98e4b6bb84719dc8a6a19607e8;p=libqmvoc.git added halflife unit svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=578509 --- diff --git a/libscience/data/isotopes.xml b/libscience/data/isotopes.xml index 7f78a59..ce9af97 100644 --- a/libscience/data/isotopes.xml +++ b/libscience/data/isotopes.xml @@ -14,7 +14,7 @@ - + @@ -7242,7 +7242,7 @@ 138.906653 - ±0.9 + 0.9 11892096 0.27 58 @@ -7256,7 +7256,7 @@ 140.9082763 7/2- - ±0.97 + 0.97 2808086.4 0.581 58 @@ -7772,7 +7772,7 @@ 148.918334 - ±3.3 + 3.3 191160 1.073 61 @@ -9257,7 +9257,7 @@ 174.9412765 7/2- - ±0.3 + 0.3 244224 0.467 70 @@ -10687,7 +10687,7 @@ 194.9650346 - ±0.148 + 0.148 16078176 0.230 79 @@ -12480,7 +12480,7 @@ 231.035884 100 3/2- - ±2.01 + 2.01 32760 5.148 91 diff --git a/libscience/isotopeparser.cpp b/libscience/isotopeparser.cpp index 7f78ea4..5a8f6f2 100644 --- a/libscience/isotopeparser.cpp +++ b/libscience/isotopeparser.cpp @@ -116,6 +116,18 @@ bool IsotopeParser::startElement(const QString&, const QString &localName, const 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 ); + continue; + } + else + { + d->currentUnit = ChemicalDataObject::noUnit; + } + } d->inHalfLife = true; //X if ( d->currentUnit != ChemicalDataObject::noUnit ) //X d->currentDataObject->setUnit( d->currentUnit );