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, alphadecay, betaplusdecay, betaminusdecay, ecdecay );
+ QString alphadecay = iso.attributeNode( "alphadecay" ).value();
+ QString betaplusdecay = iso.attributeNode( "betaplusdecay" ).value();
+ QString betaminusdecay = iso.attributeNode( "betaminusdecay" ).value();
+ QString ecdecay = iso.attributeNode( "ecdecay" ).value();
+ double decayenergy = iso.attributeNode( "decayenergy" ).value().toDouble();
+ QString spin = iso.attributeNode( "spin" ).value();
+ double moment = iso.attributeNode( "moment" ).value().toDouble();
+
+ Isotope *isotope = new Isotope( neutrons, percentage, weight, halflife, format, alphadecay, betaplusdecay, betaminusdecay, ecdecay, decayenergy, spin, moment );
isolist.append( isotope );
}
return m_numOfElements;
}
-Isotope::Isotope( int neutrons, double percentage, double weight, double halflife, QString format, double alphadecay, double betaplusdecay, double betaminusdecay, double ecdecay )
+Isotope::Isotope( int neutrons, double percentage, double weight, double halflife, QString format, QString alphadecay, QString betaplusdecay, QString betaminusdecay, QString ecdecay, double decayenergy, QString spin, double moment )
{
m_neutrons = neutrons;
m_percentage = percentage;
m_betaplusdecay = betaplusdecay;
m_betaminusdecay = betaminusdecay;
m_ecdecay = ecdecay;
+ m_decayenergy = decayenergy;
+ m_spin = spin;
+ m_moment = moment;
}
QString Isotope::halflifeToHtml() const
class Isotope
{
public:
- Isotope( int neutrons, double percentage, double weight, double halflife, QString format, double alphadecay, double betaplusdecay, double betaminusdecay, double ecdecay);
+ Isotope( int neutrons, double percentage, double weight, double halflife, QString format, QString alphadecay, QString betaplusdecay, QString betaminusdecay, QString ecdecay, double decayenergy, QString spin, double moment);
bool seconds() const{
if ( m_format == "seconds" )
return m_weight;
}
- double alphadecay() const{
- return m_alphadecay;
+ bool alphadecay() const{
+ if ( m_alphadecay == "true" )
+ return true;
+ else
+ return false;
}
- double betaplusdecay() const{
- return m_betaplusdecay;
+ bool betaplusdecay() const{
+ if ( m_betaplusdecay == "true" )
+ return true;
+ else
+ return false;
+ }
+
+ bool betaminusdecay() const{
+ if ( m_betaminusdecay == "true" )
+ return true;
+ else
+ return false;
}
- double betaminusdecay() const{
- return m_betaminusdecay;
+ bool ecdecay() const{
+ if ( m_ecdecay == "true" )
+ return true;
+ else
+ return false;
}
- double ecdecay() const{
- return m_ecdecay;
+ double decayenergy() const{
+ return m_decayenergy;
+ }
+ QString spin() const{
+ return m_spin;
+ }
+ double moment() const{
+ return m_moment;
}
QString halflifeToHtml() const;
int m_neutrons;
/**
- * Thees variables specify the kind of decay
- * their values specify the decay-energy
+ * Theese variables specify the kind of decay
+ * and the decay-energy
+ */
+ QString m_alphadecay;
+ QString m_betaplusdecay;
+ QString m_betaminusdecay;
+ QString m_ecdecay;
+ double m_decayenergy;
+
+ /**
+ *spin and parity
+ */
+ QString m_spin;
+
+ /**
+ * magnetic moment
*/
- double m_alphadecay;
- double m_betaplusdecay;
- double m_betaminusdecay;
- double m_ecdecay;
+ double m_moment;
};
/**