else
v = QString::number( val );
}
- else if ( type == RADIUS || type == IONICRADIUS ) // its a length
- {
- if ( type == RADIUS )
- val = radius();
- else if ( type == IONICRADIUS )
- val = ionicValue();
-
- if ( val <= 0 )
- v = i18n( "Value unknown" );
- else
- {
- switch ( Prefs::units() )
- {
- case 0://use SI-values (meter for length)
- v = i18n( "%1 10<sup>-12</sup> m" ).arg( QString::number( val ) );
- break;
- case 1://use picometer, the most common unit for radii
- v = i18n( "%1 pm" ).arg( QString::number( val ) );
- break;
- }
- }
- }
+//X else if ( type == RADIUS || type == IONICRADIUS ) // its a length
+//X {
+//X if ( type == RADIUS )
+//X val = radius();
+//X else if ( type == IONICRADIUS )
+//X val = ionicValue();
+//X
+//X if ( val <= 0 )
+//X v = i18n( "Value unknown" );
+//X else
+//X {
+//X switch ( Prefs::units() )
+//X {
+//X case 0://use SI-values (meter for length)
+//X v = i18n( "%1 10<sup>-12</sup> m" ).arg( QString::number( val ) );
+//X break;
+//X case 1://use picometer, the most common unit for radii
+//X v = i18n( "%1 pm" ).arg( QString::number( val ) );
+//X break;
+//X }
+//X }
+//X }
else if ( type == MASS ) // its a mass
{
val = mass();
y = posYRegular[m_number-1];
}
+void Element::setRadius( RADIUSTYPE type, double value, const QString& name )
+{
+
+}
+
KalziumDataObject::KalziumDataObject()
{
QDomDocument doc( "datadocument" );
double mp = domElement.namedItem( "meltingpoint" ).toElement().text().toDouble();
double bp = domElement.namedItem( "boilingpoint" ).toElement().text().toDouble();
double density = domElement.namedItem( "density" ).toElement().text().toDouble();
- double atomic_radius = domElement.namedItem( "radius" ).namedItem( "atomic" ).toElement().text().toDouble();
- double ionic_radius = domElement.namedItem( "radius" ).namedItem( "ionic" ).toElement().text().toDouble();
- QString ionic_charge = domElement.namedItem( "radius" ).namedItem( "ionic" ).toElement().attributeNode( "charge" ).value();
-
- kdDebug() << "Charge: " << ionic_charge << " Value: " << ionic_radius << endl;
+//X double covalent_radius = domElement.namedItem( "radius" ).namedItem( "covalent" ).toElement().text().toDouble();
+//X double ionic_radius = domElement.namedItem( "radius" ).namedItem( "ionic" ).toElement().text().toDouble();
+//X QString ionic_charge = domElement.namedItem( "radius" ).namedItem( "ionic" ).toElement().attributeNode( "charge" ).value();
int bio = domElement.namedItem( "biologicalmeaning" ).toElement().text().toInt();
int az = domElement.namedItem( "aggregation" ).toElement().text().toInt();
e->setBiologicalMeaning(bio);
e->setAggregation(az);
e->setNumber( number );
- e->setIonicValues( ionic_radius, ionic_charge );
+// e->setIonicValues( ionic_radius, ionic_charge );
e->setScientist(scientist);
e->setCrysatalstructure( crystal );
e->setMeltingpoint( mp );
e->setBoilingpoint( bp );
e->setDensity( density );
- e->setAtomicRadius( atomic_radius );
+// e->setCovalentRadius( covalent_radius );
e->setupXY();
Element();
virtual ~Element();
+
+ enum RADIUSTYPE
+ {
+ ATOMIC = 0,
+ IONIC,
+ VDW, //van der Waals forces
+ COVALENT
+ };
+
/**
* @return the number of the element
return m_number;
}
- void setIonicValues(double v, const QString& c){
- m_ionic_value = v;
- m_ionic_charge = c;
- }
-
- QString ionicCharge() const{
- return m_ionic_charge;
- }
-
- double ionicValue() const{
- return m_ionic_value;
- }
-
QString nameOrigin() const{
return m_origin;
}
void setMeltingpoint( double value ) { m_MP = value; }
void setBoilingpoint( double value ) { m_BP = value; }
void setDensity( double value ) { m_Density = value; }
- void setAtomicRadius( double value ) { m_AR = value; }
+
+ /**
+ * set the radius of the radiustype @p type to the value @p value.
+ * The ionicradius also has a name @p name. This will store the charge of
+ * the ion (for example, +2 or -3 )
+ */
+ void setRadius( RADIUSTYPE type, double value, const QString& name = 0 );
void setDate( int date ) { m_date = date; }
void setBiologicalMeaning( int value ) { m_biological = value; }
/**
* @return the radius of the element in picometers
*/
- double radius() const {
- return m_AR;
- }
+ double radius( RADIUSTYPE type );
/**
* @return the meanmass of the element
{
NOGRADIENT = 0,
RADIUS,
- IONICRADIUS,
MASS,
DENSITY,
BOILINGPOINT,
IE
};
-
/**
* calculate the 4-digit value of the value @p w
*/
m_MP,
m_BP,
m_EN,
- m_Density,
- m_AR,
- m_ionic_value;
+ m_Density;
int m_number,
m_date,
m_orbits,
m_isotopes,
m_scientist,
- m_crystalstructure,
- m_ionic_charge;
+ m_crystalstructure;
doubleList m_ionenergies;