]> Git trees. - libqmvoc.git/commitdiff
added relative abundance
authorJörg Buchwald <buchwaldj@web.de>
Mon, 31 Jul 2006 12:01:59 +0000 (12:01 +0000)
committerJörg Buchwald <buchwaldj@web.de>
Mon, 31 Jul 2006 12:01:59 +0000 (12:01 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=568173

libscience/isotope.cpp
libscience/isotope.h

index 7d4ac406a7104dbc92fe51b1f447d2f15dca84bf..942f45f801ea1fe30ab9de2c93bc021bcc8235f6 100644 (file)
@@ -24,7 +24,7 @@
 
 Isotope::Isotope()
 : m_parentElementSymbol( 0 ), m_mass( 0 ), m_identifier( 0 ),
-       m_spin( 0 ), m_magmoment( 0 ), m_halflife( 0 ), m_ecdecay( 0 ),
+       m_spin( 0 ), m_magmoment( 0 ), m_abundance( 0 ), m_halflife( 0 ), m_ecdecay( 0 ),
        m_betaplus( 0 ), m_betaminus( 0 ), m_alpha( 0 )
 { 
 }
@@ -45,6 +45,8 @@ void Isotope::addData( ChemicalDataObject* o )
                m_spin = o;
        else if ( o->type() == ChemicalDataObject::magneticMoment )
                m_magmoment = o;
+       else if ( o->type() == ChemicalDataObject::relativeAbundance )
+               m_abundance = o;
        else if ( o->type() == ChemicalDataObject::halfLife )
                m_halflife = o;
 
@@ -83,6 +85,11 @@ QString Isotope::magmoment() const
        return m_magmoment ? m_magmoment->value().toString() : QString();
 }
 
+QString Isotope::abundance() const
+{
+       return m_abundance ? m_abundance->value().toString() : QString();
+}
+
 double Isotope::halflife() const
 {
        return m_halflife ? m_halflife->value().toDouble() : -1.0;
index 77438b93b755ecc8a5b75a609c1c0d3e848915a9..c00c16cb7a7ad9b518a21badef59eeb9078393a4 100644 (file)
@@ -87,6 +87,8 @@ class EDUSCIENCE_EXPORT Isotope
 
                QString magmoment() const;
 
+               QString abundance() const;              
+
                double halflife() const;
                
                /**
@@ -145,6 +147,7 @@ class EDUSCIENCE_EXPORT Isotope
                 */
                Isotope::Nucleons nucleonsAfterDecay( Decay kind );
 
+
        private:
                /**
                 * the symbol of the element the isotope belongs to
@@ -171,6 +174,11 @@ class EDUSCIENCE_EXPORT Isotope
                 */
                ChemicalDataObject* m_magmoment;
                
+               /**
+                * stores the relative abundance of the Isotope
+                */
+               ChemicalDataObject* m_abundance; //added to test
+
                /**
                 * stores the halfLife of the Isotope
                 */