]> Git trees. - libqmvoc.git/commitdiff
* I removed the density from the database. After a long discussion we (BlueObelisk...
authorCarsten Niehaus <cniehaus@gmx.de>
Wed, 5 Mar 2008 20:01:24 +0000 (20:01 +0000)
committerCarsten Niehaus <cniehaus@gmx.de>
Wed, 5 Mar 2008 20:01:24 +0000 (20:01 +0000)
Example: Carbon exists at least in three forms: graphite, diamond and buckyballs (Fullerene). This means I need at least three (3) values for the density as all three forms of carbon are "carbon". The same applies for S, P and many many other elements.

svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=782700

libscience/chemicaldataobject.cpp
libscience/chemicaldataobject.h
libscience/elementparser.cpp

index b2aeb935c1608816725e18fcb197bcea3c4a2878..736e4553a5ace87eccfbcb9795e65ddb837c30d8 100644 (file)
@@ -276,9 +276,6 @@ QString ChemicalDataObject::dictRef() const
                case crystalstructure:
                        botype ="crystalstructure";
                        break;
-               case density:
-                       botype ="density";
-                       break;
                case dangerSymbol:
                        botype ="dangerSymbol";
                        break;
index c8443395732623ec9e519c54eacfb6c3635251bd..59733feb2b1e2c6eb0ac36e57cacb12792f9c94b 100644 (file)
@@ -64,7 +64,6 @@ class SCIENCE_EXPORT ChemicalDataObject
                        crystalstructure/**< own, bcc, hdp, ccp, hcp, fcc, d, sc, tet, rh, or, mono*/,
                        electronicConfiguration/**< the electronic configuration, for example 1s2 for He*/,
                        group/**< This is a value between 1 and 8*/,
-                       density/**< The density */,
                        nameOrigin/**< the origin of the name */,
                        orbit/**< the quantumorbit of the element */,
                        period/**< the period of the element */,
index 1085869750daddfcde5ed8754073b601f61fbebb..c6f2e2a920e4298039ec7585b03ea91cd565b352 100644 (file)
@@ -47,7 +47,6 @@ class ElementSaxParser::Private
             inFamily( false ),
             inGroup( false ),
             inElectronicconfiguration( false ),
-            inDensity( false ),
             inDangerSymbol( false ),
             inRPhrase( false ),
             inSPhrase( false ),
@@ -89,7 +88,6 @@ class ElementSaxParser::Private
         bool inFamily;
         bool inGroup;
         bool inElectronicconfiguration;
-        bool inDensity;
         bool inDangerSymbol;
         bool inRPhrase;
         bool inSPhrase;
@@ -166,8 +164,6 @@ bool ElementSaxParser::startElement(const QString&, const QString &localName, co
                 d->inGroup = true;
             else if (attrs.value(i) == "bo:electronicConfiguration")
                 d->inElectronicconfiguration = true;
-            else if (attrs.value(i) == "bo:density")
-                d->inDensity = true;
             else if (attrs.value(i) == "bo:dangerSymbol")
                 d->inDangerSymbol = true;
             else if (attrs.value(i) == "bo:RPhrase")
@@ -334,11 +330,6 @@ bool ElementSaxParser::characters(const QString &ch)
         type = ChemicalDataObject::electronicConfiguration; 
         d->inElectronicconfiguration = false;
     }
-    else if (d->inDensity){
-        value = ch.toDouble();
-        type = ChemicalDataObject::density; 
-        d->inDensity = false;
-    }
     else if (d->inDangerSymbol){
         value = ch;
         type = ChemicalDataObject::dangerSymbol;