From 4803eda2177c14599207ff40345773e2b160b7dc Mon Sep 17 00:00:00 2001 From: Martin Pfeiffer Date: Sun, 24 Jul 2005 19:41:20 +0000 Subject: [PATCH] adding m_protones svn path=/trunk/KDE/kdeedu/kalzium/src/isotope.h; revision=438266 --- kalzium/src/isotope.cpp | 3 ++- kalzium/src/isotope.h | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/kalzium/src/isotope.cpp b/kalzium/src/isotope.cpp index 802fdf3..b77bf67 100644 --- a/kalzium/src/isotope.cpp +++ b/kalzium/src/isotope.cpp @@ -22,9 +22,10 @@ #include #include -Isotope::Isotope( int neutrons, double percentage, double weight, double halflife, const QString& format, bool alphadecay, bool betaplusdecay, bool betaminusdecay, double alphapercentage, double betaminuspercentage, double betapluspercentage, bool ecdecay, double decayenergy, const QString& spin, const QString& magmoment) +Isotope::Isotope( int neutrons, int protones, double percentage, double weight, double halflife, QString format, bool alphadecay, bool betaplusdecay, bool betaminusdecay, double alphapercentage, double betaminuspercentage, double betapluspercentage, bool ecdecay, double decayenergy, QString spin, QString magmoment) { m_neutrons = neutrons; + m_protones = protones; m_percentage = percentage; m_halflife = halflife; m_format = format; diff --git a/kalzium/src/isotope.h b/kalzium/src/isotope.h index 5969669..a612e75 100644 --- a/kalzium/src/isotope.h +++ b/kalzium/src/isotope.h @@ -31,7 +31,7 @@ class Isotope { public: - Isotope( int neutrons, double percentage, double weight, double halflife, const QString& format, bool alphadecay, bool betaplusdecay, bool betaminusdecay, double alphapercentage, double betaminuspercentage, double betapluspercentage, bool ecdecay, double decayenergy, const QString& spin, const QString& magmoment); + Isotope( int neutrons, int protones, double percentage, double weight, double halflife, QString format, bool alphadecay, bool betaplusdecay, bool betaminusdecay, double alphapercentage, double betaminuspercentage, double betapluspercentage, bool ecdecay, double decayenergy, QString spin, QString magmoment); bool seconds() const{ if ( m_format == "seconds" ) @@ -59,6 +59,13 @@ class Isotope return m_neutrons; } + /** + * @return the number of protones the isotope has + */ + int protones() const{ + return m_protones; + } + /** * the weight of the isotope */ @@ -160,7 +167,12 @@ class Isotope * the number of neutrons */ int m_neutrons; - + + /** + * the number of protones + */ + int m_protones; + ///Specify if the decay is of this kind bool m_alphadecay; ///Specify if the decay is of this kind -- 2.47.3