]> Git trees. - libqmvoc.git/commitdiff
patch of Jörg Buchwald
authorMartin Pfeiffer <hubipete@gmx.net>
Tue, 12 Jul 2005 13:25:20 +0000 (13:25 +0000)
committerMartin Pfeiffer <hubipete@gmx.net>
Tue, 12 Jul 2005 13:25:20 +0000 (13:25 +0000)
svn path=/trunk/KDE/kdeedu/kalzium/src/element.cpp; revision=433983

kalzium/src/element.cpp
kalzium/src/element.h

index 9bb342798d69d4a07a51c166ae3cfe1690df3f22..d9b81c88faea7cd3e890f27877e90d64783a2533 100644 (file)
@@ -626,8 +626,12 @@ EList KalziumDataObject::readData(  QDomDocument &dataDocument )
                        QString format = iso.attributeNode( "halflifeformat" ).value();
                        int neutrons  = iso.attributeNode( "neutron" ).value().toInt();
                        double percentage = iso.attributeNode( "percentage" ).value().toDouble();
+                       double alphadecay = iso.attributeNode( "alphadecay" ).value().toDouble();
+                       double betaplusdecay = iso.attributeNode( "betaplusdecay" ).value().toDouble();
+                       double betaminusdecay = iso.attributeNode( "betaminusdecay" ).value().toDouble();
+                       double ecdecay = iso.attributeNode( "ecdecay" ).value().toDouble();
 
-                       Isotope *isotope = new Isotope( neutrons, percentage, weight, halflife, format );
+                       Isotope *isotope = new Isotope( neutrons, percentage, weight, halflife, format, alphadecay, betaplusdecay, betaminusdecay, ecdecay );
                        isolist.append( isotope );
                }
        
@@ -681,13 +685,17 @@ const int KalziumDataObject::numberOfElements() const
        return m_numOfElements;
 }
 
-Isotope::Isotope(  int neutrons, double percentage, double weight, double halflife, QString format )
+Isotope::Isotope(  int neutrons, double percentage, double weight, double halflife, QString format, double alphadecay, double betaplusdecay, double betaminusdecay, double ecdecay )
 {
        m_neutrons = neutrons;
        m_percentage = percentage;
        m_halflife = halflife;
        m_format = format;
        m_weight = weight;
+       m_alphadecay = alphadecay;
+       m_betaplusdecay = betaplusdecay;
+       m_betaminusdecay = betaminusdecay;
+       m_ecdecay = ecdecay;
 }
 
 QString Isotope::halflifeToHtml() const
index d27960c70f3aaa277b0a292ba6caebc04d739bd0..7b5a69c20ca69ab13f7378ca46cdd46588110eb9 100644 (file)
@@ -39,7 +39,7 @@ typedef QValueList<double> doubleList;
 class Isotope
 {
        public:
-               Isotope( int neutrons, double percentage, double weight, double halflife, QString format );
+               Isotope( int neutrons, double percentage, double weight, double halflife, QString format, double alphadecay, double betaplusdecay, double betaminusdecay, double ecdecay);
 
                bool seconds() const{
                        if ( m_format == "seconds" )
@@ -63,6 +63,22 @@ class Isotope
                double weight() const{
                        return m_weight;
                }
+               
+               double alphadecay() const{
+                       return m_alphadecay;
+               }
+               
+               double betaplusdecay() const{
+                       return m_betaplusdecay;
+               }
+               
+               double betaminusdecay() const{
+                       return m_betaminusdecay;
+               }
+               
+               double ecdecay() const{
+                       return m_ecdecay;
+               }
 
                QString halflifeToHtml() const;
 
@@ -95,6 +111,15 @@ class Isotope
                 * the number of neutrons
                 */
                int m_neutrons;
+               
+               /**
+               * Thees variables specify the kind of decay
+               * their values specify the decay-energy
+               */
+               double m_alphadecay;
+               double m_betaplusdecay;
+               double m_betaminusdecay;
+               double m_ecdecay;
 };
 
 /**
@@ -212,9 +237,9 @@ class Element{
                        m_ionenergies = l;
                }
 
-               QValueList<Isotope*> isotopeList()const{
-                       return m_isotopeList;
-               }
+               QValueList<Isotope*> isotopes() const{
+                        return m_isotopeList;
+                }
 
                void setIsotopeList( QValueList<Isotope*> list ){
                        m_isotopeList = list;
@@ -448,10 +473,6 @@ class Element{
                        return m_Color; 
                }
 
-               QValueList<Isotope*> isotopes() const{
-                       return m_isotopeList;
-               }
-
                void setupXY();
 
        private: