#include "element.h"
-#include "chemicaldataobject.h"
-
-#include <QVariant>
-
Element::Element()
{
}
{
}
-const QString Element::adjustRadius( int rtype )
-{
- Q_UNUSED( rtype );
-//X double val = 0.0;
-//X QString v;
-//X
-//X switch ( rtype )
-//X {
-//X case ATOMIC:
-//X val = m_RadiusAR;
-//X break;
-//X case IONIC:
-//X val = m_RadiusIon;
-//X break;
-//X case COVALENT:
-//X val = m_RadiusCR;
-//X break;
-//X case VDW:
-//X val = m_RadiusVDW;
-//X break;
-//X }
-//X
-//X if ( val <= 0 )
-//X v = i18n( "Value unknown" );
-//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 if ( Prefs::energies() == 0 )
-//X {
-//X value*=96.6;
-//X v = QString::number( value );
-//X v.append( " kJ/mol" );
-//X }
-//X else // use electronvolt
-//X {
-//X v = QString::number( value );
-//X v.append( " eV" );
-//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 )
-//X val = boiling();
-//X else
-//X val = melting();
-//X
-//X if ( val <= 0 )
-//X v = i18n( "Value unknown" );
-//X else
-//X {
-//X double newvalue = TempUnit::convert( val, (int)TempUnit::Kelvin, Prefs::temperature() );
-//X switch (Prefs::temperature()) {
-//X case 0: //Kelvin
-//X v = i18n( "%1 is the temperature in Kelvin", "%1 K" ).arg( newvalue );
-//X break;
-//X case 1://Kelvin to Celsius
-//X v = i18n( "%1 is the temperature in Celsius", "%1 %2C" ).arg( newvalue ).arg( QChar(0xB0) );
-//X break;
-//X case 2: // Kelvin to Fahrenheit
-//X v = i18n( "%1 is the temperature in Fahrenheit", "%1 %2F" ).arg( newvalue ).arg( QChar(0xB0) );
-//X break;
-//X case 3: // Kelvin to Rankine
-//X v = i18n( "%1 is the temperature in Rankine", "%1 %2Ra" ).arg( newvalue ).arg( QChar(0xB0) );
-//X break;
-//X case 4: // Kelvin to Reamur
-//X v = i18n( "%1 is the temperature in Reamur", "%1 %2R" ).arg( newvalue ).arg( QChar(0xB0) );
-//X break;
-//X }
-//X }
-//X }
-//X else if ( type == EN ) //Electronegativity
-//X {
-//X val = electroneg();
-//X if ( val <= 0 )
-//X v = i18n( "Value not defined" );
-//X else
-//X v = QString::number( val );
-//X }
-//X else if ( type == EA ) //Electron affinity
-//X {
-//X val = electroaf();
-//X if ( val == 0.0 )
-//X v = i18n( "Value not defined" );
-//X else
-//X {
-//X if ( Prefs::energies() == 0 )
-//X {
-//X v = i18n( "%1 kJ/mol" ).arg( QString::number( val ) );
-//X }
-//X else // use electronvolt
-//X {
-//X val/=96.6;
-//X v = i18n( "%1 eV" ).arg( QString::number( val ) );
-//X }
-//X }
-//X }
-//X else if ( type == MASS ) // its a mass
-//X {
-//X val = mass();
-//X if ( val <= 0 )
-//X v = i18n( "Value unknown" );
-//X else
-//X v = i18n( "%1 u" ).arg( QString::number( val ) );
-//X }
-//X else if ( type == DENSITY ) // its a density
-//X {
-//X val = density();
-//X
-//X if ( val <= 0 )
-//X v = i18n( "Value unknown" );
-//X else
-//X {
-//X if ( boiling() < 295.0 )//gasoline
-//X {
-//X v = i18n( "%1 g/L" ).arg( QString::number( val ) );
-//X }
-//X else//liquid or solid
-//X {
-//X v = i18n( "%1 g/cm<sup>3</sup>" ).arg( QString::number( val ) );
-//X }
-//X }
-//X }
-//X else if ( type == DATE ) //its a date
-//X {
-//X val = date();
-//X if ( val < 1600 )
-//X {
-//X v = i18n( "This element was known to ancient cultures" );
-//X }
-//X else
-//X {
-//X v = i18n( "This element was discovered in the year %1" ).arg( QString::number( val ) );
-//X }
-//X }
-
- return v;
-}
-
void Element::addData( ChemicalDataObject*o )
{
dataList.append( o );
virtual ~Element();
- /**
- * adjusts the units for the data. The user can
- * for example define if Fahrenheit, Kelvin or
- * Degrees Celsius should be used for the temperature.
- * This method takes care of that and adjust the
- * values.
- * @param type the TYPE of the data
- * @return the adjusted datastring
- */
- const QString adjustUnits( const int type );
-
- const QString adjustRadius( int rtype );
-
- /**
- * adjusts the units for the data. The user can
- * for example define if Fahrenheit, Kelvin or
- * Degrees Celsius should be used for the temperature.
- * This method takes care of that and adjust the
- * values. Depending on @p type a unit will be
- * added to the adjusted value.
- * @param type the TYPE of the data
- * @param value the value of the data.
- * @return the adjusted datastring
- */
- const QString adjustUnits( const int type, double value );
-
/**
* Sdd the ChemicalDataObject @p o to this Element
* @param o the ChemicalDataObject to be added