***************************************************************************/
#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>
if ( o->type() == type )
return *o;
}
- ChemicalDataObject cdo;
- return cdo;
+ ChemicalDataObject *cdo;
+ return *cdo;
}
QVariant Element::dataAsVariant( 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
//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 {
//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 )
* 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>
class Spectrum;
class Isotope;
-class Element;
-
-typedef QList<Element*> EList;
/**
* In this class all information about an element are stored. This means that
* @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
*/
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
*/
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
}
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" )
{
* 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);
}
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" )
{
* 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);
Spectrum* SpectrumParser::loadSpectrum( QFile*file, const QString& id )
{
+ Q_UNUSED( file );
+ Q_UNUSED( id );
+ return 0;
}
void SpectrumParser::saveSpectrum( Spectrum *spectrum )