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 );
}
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
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" )
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;
* 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;
};
/**
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;
return m_Color;
}
- QValueList<Isotope*> isotopes() const{
- return m_isotopeList;
- }
-
void setupXY();
private: