From 81dde7b66650634078aa691dbded36741e3c2939 Mon Sep 17 00:00:00 2001 From: Carsten Niehaus Date: Tue, 4 Mar 2008 16:01:44 +0000 Subject: [PATCH] Now the halflife is displayed. Only the unit remains to be fixed svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=782221 --- libscience/chemicaldataobject.cpp | 2 +- libscience/isotope.cpp | 6 ++++++ libscience/isotope.h | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libscience/chemicaldataobject.cpp b/libscience/chemicaldataobject.cpp index 5f2a52a..b2aeb93 100644 --- a/libscience/chemicaldataobject.cpp +++ b/libscience/chemicaldataobject.cpp @@ -325,7 +325,7 @@ QString ChemicalDataObject::unitAsString() const return "s"; } - bounit = bounit.prepend( "bo:" ); +// bounit = bounit.prepend( "bo:" ); return bounit; } diff --git a/libscience/isotope.cpp b/libscience/isotope.cpp index 3e6c4fd..7445154 100644 --- a/libscience/isotope.cpp +++ b/libscience/isotope.cpp @@ -99,6 +99,12 @@ double Isotope::halflife() const { return m_halflife.value().toDouble(); } + +ChemicalDataObject Isotope::halflifeObject() const +{ + return m_halflife; +} + double Isotope::ecdecay() const { return m_ecdecay.value().toDouble(); diff --git a/libscience/isotope.h b/libscience/isotope.h index 5793c2d..9746512 100644 --- a/libscience/isotope.h +++ b/libscience/isotope.h @@ -88,6 +88,11 @@ class SCIENCE_EXPORT Isotope QString abundance() const; double halflife() const; + + /** + * @return the ChemicalDataObject of the halflife of the Isotope + */ + ChemicalDataObject halflifeObject() const; /** * add the ChemicalDataObject @p o -- 2.47.3