#include <kdebug.h>
#include <klocale.h>
-Isotope::Isotope( int neutrons, int protones, double percentage, double weight, double halflife, QString format, double alphadecay, double betaplusdecay, double betaminusdecay, double ecdecay, double alphapercentage, double betapluspercentage, double betaminuspercentage, double ecpercentage, QString spin, QString magmoment)
+Isotope::Isotope( int neutrons, int protones, double percentage, double weight, double halflife, const QString &format, double alphadecay, double betaplusdecay, double betaminusdecay, double ecdecay, double alphapercentage, double betapluspercentage, double betaminuspercentage, double ecpercentage, const QString &spin, const QString &magmoment)
{
m_neutrons = neutrons;
m_protones = protones;
m_ecpercentage = ecpercentage;
}
-QString Isotope::halflifeAsString()
+QString Isotope::halflifeAsString() const
{
QString halflife;
double percentage,
double weight,
double halflife,
- QString format,
+ const QString &format,
double alphadecay,
double betaplusdecay,
double betaminusdecay,
double betapluspercentage,
double betaminuspercentage,
double ecpercentage,
- QString spin,
- QString magmoment);
+ const QString &spin,
+ const QString &magmoment);
bool seconds() const{
if ( m_format == "seconds" )
* appended, for example "seconds" or "years" depending
* on the timeframe
*/
- QString halflifeAsString();
+ QString halflifeAsString() const;
/**
* @return the percentage of the betaminus decay