]> Git trees. - libqmvoc.git/commitdiff
* change to word weight to mass.
authorCarsten Niehaus <cniehaus@gmx.de>
Sun, 29 May 2005 08:54:17 +0000 (08:54 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Sun, 29 May 2005 08:54:17 +0000 (08:54 +0000)
* some work on the plottingdialog (see TODO)

svn path=/trunk/KDE/kdeedu/kalzium/src/element.cpp; revision=419334

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

index f5f5d2c299a2335b535a249e1b31a00ae8af3e69..593d36815fcc756848a84981709dbe7f9dd95fc1 100644 (file)
@@ -55,7 +55,7 @@ QString Element::parsedOrbits()
 }
 
 
-double Element::strippedWeight( double num )
+double Element::strippedMass( double num )
 {
        if ( !finite( num ) )
                return num;
@@ -78,9 +78,9 @@ Element::~Element()
 
 
 
-double Element::meanweight()
+double Element::meanmass()
 {
-       return m_weight/m_number;
+       return m_mass/m_number;
 }
 
 const QString Element::adjustUnits( const int type, double value )
@@ -169,9 +169,9 @@ const QString Element::adjustUnits( const int type )
                        }
                }
        }
-       else if ( type == WEIGHT ) // its a weight
+       else if ( type == WEIGHT ) // its a mass
        {
-               val = weight();
+               val = mass();
                if ( val == -1 )
                        v = i18n( "Value unknown" );
                else
@@ -316,7 +316,7 @@ void Element::drawStateOfMatter( QPainter* p, double temp )
 
        //top left
        p->setPen( Qt::black );
-       text = QString::number( strippedWeight( weight( ) ) );
+       text = QString::number( strippedMass( mass( ) ) );
        p->drawText( X+5,Y+2 ,ELEMENTSIZE-2,h_small,Qt::AlignLeft, text );
 
        text = QString::number( number() );
@@ -448,7 +448,7 @@ void Element::drawSelf( QPainter* p )
 
        //top left
        p->setPen( Qt::black );
-       text = QString::number( strippedWeight( weight( ) ) );
+       text = QString::number( strippedMass( mass( ) ) );
        p->drawText( X+5,Y+2 ,ELEMENTSIZE+4,h_small,Qt::AlignLeft, text );
 
        text = QString::number( number() );
@@ -540,7 +540,7 @@ EList KalziumDataObject::readData(  QDomDocument &dataDocument )
        {//iterate through all elements
                domElement = ( const QDomElement& ) elementNodes.item( i ).toElement();
 
-               double weight = domElement.namedItem( "weight" ).toElement().text().toDouble();
+               double mass = domElement.namedItem( "mass" ).toElement().text().toDouble();
                double en = domElement.namedItem( "electronegativity" ).toElement().text().toDouble();
                double mp = domElement.namedItem( "meltingpoint" ).toElement().text().toDouble();
                double bp = domElement.namedItem( "boilingpoint" ).toElement().text().toDouble();
@@ -590,7 +590,7 @@ EList KalziumDataObject::readData(  QDomDocument &dataDocument )
                e->setIsotopes(isotopes);
                e->setIonisationList( ionlist );
                
-               e->setWeight( weight ); 
+               e->setMass( mass );     
                e->setEN( en );
                e->setMeltingpoint( mp );
                e->setBoilingpoint( bp );
index c7f4214bcf58535cf3f3fc34083d15e1ce3093db..63de255ed4d87333a02b46d2ae0c2fa7ce55f90a 100644 (file)
@@ -84,7 +84,7 @@ class Element{
                        return m_number;
                }
                
-               void setWeight( double value ) { m_weight = value; }
+               void setMass( double value ) { m_mass = value; }
                void setEN( double value ) { m_EN = value; }
                void setMeltingpoint( double value ) { m_MP = value; }
                void setBoilingpoint( double value ) { m_BP = value; }
@@ -245,10 +245,10 @@ class Element{
                }
                
                /**
-                * @return the atomic weight of the element in units
+                * @return the atomic mass of the element in units
                 */
-               double weight() const {
-                       return m_weight;
+               double mass() const {
+                       return m_mass;
                }
                
                /**
@@ -266,9 +266,9 @@ class Element{
                }
                
                /**
-                * @return the meanweight of the element
+                * @return the meanmass of the element
                 */
-               double meanweight();
+               double meanmass();
 
                int x, y; //for the RegularPSE
 
@@ -308,7 +308,7 @@ class Element{
                /**
                 * calculate the 4-digit value of the value @p w
                 */
-               double strippedWeight( double w );
+               double strippedMass( double w );
 
 
     /**
@@ -335,7 +335,7 @@ class Element{
                        return ( y-1 )*ELEMENTSIZE + ELEMENTSIZE;
                }
 
-               double  m_weight,
+               double  m_mass,
                        m_MP, 
                        m_BP, 
                        m_EN,