]> Git trees. - libqmvoc.git/commitdiff
re-added isotope properties
authorJörg Buchwald <buchwaldj@web.de>
Wed, 20 Sep 2006 19:22:08 +0000 (19:22 +0000)
committerJörg Buchwald <buchwaldj@web.de>
Wed, 20 Sep 2006 19:22:08 +0000 (19:22 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=586849

libscience/isotopeparser.cpp

index f830557661a64b659c44606317659d9f13acd0d9..31c67c91660f44bc93c68815c2fb82171cd0df77 100644 (file)
@@ -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;
 }