]> Git trees. - libqmvoc.git/commitdiff
remove some unuseful stuff and kill compilation warnings
authorPino Toscano <pino@kde.org>
Fri, 28 Oct 2005 13:00:00 +0000 (13:00 +0000)
committerPino Toscano <pino@kde.org>
Fri, 28 Oct 2005 13:00:00 +0000 (13:00 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=475180

libscience/element.cpp
libscience/element.h
libscience/elementparser.cpp
libscience/elementparser.h
libscience/isotopeparser.cpp
libscience/isotopeparser.h
libscience/spectrumparser.cpp

index 4d4741483b04202fdb8d15b0df4eb9c064a39b25..b9367fe6285e13e7751e42d28469146d6fbf4141 100644 (file)
  ***************************************************************************/
 
 #include "element.h"
-#include "tempunit.h"
-#include "chemicaldataobject.h"
 
-#include <kdebug.h>
-#include <klocale.h>
-#include <kurl.h>
-#include <kstandarddirs.h>
+#include "chemicaldataobject.h"
 
 #include <QVariant>
 
@@ -39,8 +34,8 @@ ChemicalDataObject& Element::data(ChemicalDataObject::BlueObelisk type) const
                if ( o->type() == type )
                        return *o;
        }
-       ChemicalDataObject cdo;
-       return cdo;
+       ChemicalDataObject *cdo;
+       return *cdo;
 }
 
 QVariant Element::dataAsVariant( ChemicalDataObject::BlueObelisk type ) const
@@ -58,15 +53,16 @@ QString Element::dataAsString(ChemicalDataObject::BlueObelisk type) const
                if ( o->type() == type )
                        return o->valueAsString();
        }
-       return "";
+       return QString();
 }
 
 Element::~Element()
 {
 }
 
-const QString Element::adjustRadius( RADIUSTYPE rtype )
+const QString Element::adjustRadius( int rtype )
 {
+       Q_UNUSED( rtype );
 //X    double val = 0.0;
 //X    QString v;
 //X 
@@ -91,10 +87,13 @@ const QString Element::adjustRadius( RADIUSTYPE rtype )
 //X    else
 //X            v = i18n( "%1 is a length, eg: 12.3 pm", "%1 pm" ).arg( QString::number( val ) );
 //X    return v;
+       return QString();
 }
 
 const QString Element::adjustUnits( const int type, double value )
 {
+       Q_UNUSED( type );
+       Q_UNUSED( value );
 //X    QString v;
 //X    if ( type == IE  ) //an ionization energy
 //X    {
@@ -111,14 +110,18 @@ const QString Element::adjustUnits( const int type, double value )
 //X            }
 //X    }
 //X    return v;
+       return QString();
 }
 
 const QString Element::adjustUnits( const int type )
 {
+       Q_UNUSED( type );
        QString v = QString::null;
 
+/*
        double val = 0.0; //the value to convert
        
+*/
 //X    if ( type == BOILINGPOINT || type == MELTINGPOINT ) // convert a temperature
 //X    {
 //X            if ( type == BOILINGPOINT )
index 3cbcf9785f4a58f86371a5207e7dd9257a5e0638..2c9e91036f786240fa15da2d6cfd9859fad667e0 100644 (file)
  *   Free Software Foundation, Inc.,                                       *
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.          *
  ***************************************************************************/
+
 #ifndef ELEMENT_H
 #define ELEMENT_H
 
-#include <QColor>
 #include <QList>
 #include <QVariant>
 
@@ -28,9 +28,6 @@
 
 class Spectrum;
 class Isotope;
-class Element;
-
-typedef QList<Element*> EList;
 
 /**
  * In this class all information about an element are stored. This means that
@@ -39,20 +36,13 @@ typedef QList<Element*> EList;
  * @short This class is the represention of a chemical element
  * @author Carsten Niehaus
 */
-class Element{
+class Element
+{
        public:
                Element();
 
                virtual ~Element();
                
-               enum RADIUSTYPE
-               {
-                       ATOMIC = 0,
-                       IONIC,
-                       VDW /**< van der Waals radius */,
-                       COVALENT
-               };
-
                /**
                 * adjusts the units for the data. The user can
                 * for example define if Fahrenheit, Kelvin or 
@@ -64,7 +54,7 @@ class Element{
                 */
                const QString adjustUnits( const int type );
 
-               const QString adjustRadius( RADIUSTYPE rtype );
+               const QString adjustRadius( int rtype );
 
                /**
                 * adjusts the units for the data. The user can
@@ -79,26 +69,6 @@ class Element{
                 */
                const QString adjustUnits( const int type, double value );
 
-               /**
-                * types of datas
-                */
-               enum TYPE
-               {
-                       NOGRADIENT = 0,
-                       ATOMICRADIUS,
-                       COVALENTRADIUS,
-                       VDWRADIUS,
-                       MASS,
-                       DENSITY,
-                       BOILINGPOINT,
-                       MELTINGPOINT,
-                       EN,
-                       EA,
-                       DATE,
-                       IE,
-                       IONICRADIUS
-               };
-
                /**
                 * Sdd the ChemicalDataObject @p o to this Element
                 * @param o the ChemicalDataObject to be added
index bc888f362b8fb3e71c7629c1b5b7d6ec6a5f46c6..ff76c4428e485e71fa32a3e6e41ebebdfbe91be1 100644 (file)
@@ -96,8 +96,8 @@ bool ElementSaxParser::startElement(const QString&, const QString &localName, co
        }
        return true;
 }
-               
-bool ElementSaxParser::endElement (  const QString & namespaceURI, const QString & localName, const QString & qName )
+
+bool ElementSaxParser::endElement( const QString &, const QString& localName, const QString& )
 {
        if ( localName == "elementType" )
        {
index 655b8808737a88f603cf3673877c588b0549fcd5..9c80df769808a9bdeed99ee78d8324070bc5df5e 100644 (file)
@@ -32,9 +32,9 @@ class ElementSaxParser : public QXmlDefaultHandler
                 * Constructor
                 */
                ElementSaxParser();
-               bool startElement(const QString&, const QString &localName, const QString&, const QXmlAttributes &attrs);
+               bool startElement( const QString&, const QString &localName, const QString&, const QXmlAttributes &attrs );
 
-               bool endElement (  const QString & namespaceURI, const QString & localName, const QString & qName );
+               bool endElement( const QString& namespaceURI, const QString &localName, const QString& qName );
                
                bool characters(const QString &ch);
 
index 50a25e6f5892a0382d7c3351b3017ec7fdf61273..3aecc9c322faf3592d506249858ce472a7c757a7 100644 (file)
@@ -61,8 +61,8 @@ bool IsotopeParser::startElement(const QString&, const QString &localName, const
        }
        return true;
 }
-               
-bool IsotopeParser::endElement (  const QString & namespaceURI, const QString & localName, const QString & qName )
+
+bool IsotopeParser::endElement( const QString&, const QString& localName, const QString& )
 {
        if ( localName == "isotope" )
        {
index f2c58b6b76c8f41490f5e43ced633106cd7d244c..ea6e8004b3f1471c8d6f2fa305fadfe803584059 100644 (file)
@@ -31,9 +31,9 @@ class IsotopeParser : public QXmlDefaultHandler
                 * Constructor
                 */
                IsotopeParser();
-               bool startElement(const QString&, const QString &localName, const QString&, const QXmlAttributes &attrs);
+               bool startElement( const QString&, const QString &localName, const QString&, const QXmlAttributes &attrs );
 
-               bool endElement (  const QString & namespaceURI, const QString & localName, const QString & qName );
+               bool endElement( const QString& namespaceURI, const QString &localName, const QString& qName );
                
                bool characters(const QString &ch);
 
index 8a526a64953975853e1efa3ae5efd2f679d2fe5e..12917a6c56b311fe6626567141e20d1716947a20 100644 (file)
@@ -24,6 +24,9 @@ email                : cniehaus@kde.org
 
 Spectrum* SpectrumParser::loadSpectrum( QFile*file, const QString& id )
 {
+       Q_UNUSED( file );
+       Q_UNUSED( id );
+       return 0;
 }
 
 void SpectrumParser::saveSpectrum( Spectrum *spectrum )