]> Git trees. - libqmvoc.git/commitdiff
adding m_protones
authorMartin Pfeiffer <hubipete@gmx.net>
Sun, 24 Jul 2005 19:41:20 +0000 (19:41 +0000)
committerMartin Pfeiffer <hubipete@gmx.net>
Sun, 24 Jul 2005 19:41:20 +0000 (19:41 +0000)
svn path=/trunk/KDE/kdeedu/kalzium/src/isotope.h; revision=438266

kalzium/src/isotope.cpp
kalzium/src/isotope.h

index 802fdf3d556005bac2d22e1dc149cc1c1675bf29..b77bf6770278500dadb9ba46cc203fd603fa724b 100644 (file)
 #include <kdebug.h>
 #include <klocale.h>
 
-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;
index 59696695de3c5de9151db8400084b6bee633688f..a612e750b1bea2c4522a23fe10478ef66e6e7974 100644 (file)
@@ -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