From 1b606347a3d1f0d79804f0642159b17e27f4b271 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 28 Oct 2005 13:00:00 +0000 Subject: [PATCH] remove some unuseful stuff and kill compilation warnings svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=475180 --- libscience/element.cpp | 23 ++++++++++++--------- libscience/element.h | 38 ++++------------------------------- libscience/elementparser.cpp | 4 ++-- libscience/elementparser.h | 4 ++-- libscience/isotopeparser.cpp | 4 ++-- libscience/isotopeparser.h | 4 ++-- libscience/spectrumparser.cpp | 3 +++ 7 files changed, 28 insertions(+), 52 deletions(-) diff --git a/libscience/element.cpp b/libscience/element.cpp index 4d47414..b9367fe 100644 --- a/libscience/element.cpp +++ b/libscience/element.cpp @@ -19,13 +19,8 @@ ***************************************************************************/ #include "element.h" -#include "tempunit.h" -#include "chemicaldataobject.h" -#include -#include -#include -#include +#include "chemicaldataobject.h" #include @@ -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 ) diff --git a/libscience/element.h b/libscience/element.h index 3cbcf97..2c9e910 100644 --- a/libscience/element.h +++ b/libscience/element.h @@ -17,10 +17,10 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ + #ifndef ELEMENT_H #define ELEMENT_H -#include #include #include @@ -28,9 +28,6 @@ class Spectrum; class Isotope; -class Element; - -typedef QList EList; /** * In this class all information about an element are stored. This means that @@ -39,20 +36,13 @@ typedef QList 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 diff --git a/libscience/elementparser.cpp b/libscience/elementparser.cpp index bc888f3..ff76c44 100644 --- a/libscience/elementparser.cpp +++ b/libscience/elementparser.cpp @@ -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" ) { diff --git a/libscience/elementparser.h b/libscience/elementparser.h index 655b880..9c80df7 100644 --- a/libscience/elementparser.h +++ b/libscience/elementparser.h @@ -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); diff --git a/libscience/isotopeparser.cpp b/libscience/isotopeparser.cpp index 50a25e6..3aecc9c 100644 --- a/libscience/isotopeparser.cpp +++ b/libscience/isotopeparser.cpp @@ -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" ) { diff --git a/libscience/isotopeparser.h b/libscience/isotopeparser.h index f2c58b6..ea6e800 100644 --- a/libscience/isotopeparser.h +++ b/libscience/isotopeparser.h @@ -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); diff --git a/libscience/spectrumparser.cpp b/libscience/spectrumparser.cpp index 8a526a6..12917a6 100644 --- a/libscience/spectrumparser.cpp +++ b/libscience/spectrumparser.cpp @@ -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 ) -- 2.47.3