From: Jörg Buchwald Date: Mon, 31 Jul 2006 12:01:59 +0000 (+0000) Subject: added relative abundance X-Git-Tag: v3.80.2~61 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=9d5f77cb71c13ec74738ca312a0bbb0669ec89db;p=libqmvoc.git added relative abundance svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=568173 --- diff --git a/libscience/isotope.cpp b/libscience/isotope.cpp index 7d4ac40..942f45f 100644 --- a/libscience/isotope.cpp +++ b/libscience/isotope.cpp @@ -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; diff --git a/libscience/isotope.h b/libscience/isotope.h index 77438b9..c00c16c 100644 --- a/libscience/isotope.h +++ b/libscience/isotope.h @@ -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 */