]> Git trees. - libqmvoc.git/commitdiff
strip the values in the gradient after the 4th digit.
authorCarsten Niehaus <cniehaus@gmx.de>
Sun, 5 Jun 2005 11:09:23 +0000 (11:09 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Sun, 5 Jun 2005 11:09:23 +0000 (11:09 +0000)
Otherwise they where much to long in some cases

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

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

index 3c19686553cd2e88128dd8cb3bd0734c67c29750..7912289809c32cc6cb982d9f21c94c97f85293c7 100644 (file)
@@ -55,7 +55,7 @@ QString Element::parsedOrbits( bool canBeEmpty )
 }
 
 
-double Element::strippedMass( double num )
+double Element::strippedValue( double num )
 {
        if ( !finite( num ) )
                return num;
@@ -342,7 +342,7 @@ void Element::drawStateOfMatter( QPainter* p, double temp )
 
        //top left
        p->setPen( Qt::black );
-       text = QString::number( strippedMass( mass( ) ) );
+       text = QString::number( strippedValue( mass( ) ) );
        p->drawText( X,Y ,ELEMENTSIZE,h_small,Qt::AlignCenter, text );
 
        text = QString::number( number() );
@@ -444,7 +444,7 @@ void Element::drawSelf( QPainter* p )
 
        //top left
        p->setPen( Qt::black );
-       text = QString::number( strippedMass( mass( ) ) );
+       text = QString::number( strippedValue( mass( ) ) );
        p->drawText( X,Y ,ELEMENTSIZE,h_small,Qt::AlignCenter, text );
 
        text = QString::number( number() );
index c3da100311fffa3665473b8c2d00004b9b5033be..16908144ed2c6560f92c4e92c3e4705e65c539bb 100644 (file)
@@ -347,7 +347,7 @@ class Element{
                /**
                 * calculate the 4-digit value of the value @p w
                 */
-               double strippedMass( double w );
+               static double strippedValue( double w );
 
 
     /**