From 477a620e5745bd30222fe72d9c9b842785c285ab Mon Sep 17 00:00:00 2001 From: cniehaus Date: Thu, 19 Sep 2002 13:54:25 +0000 Subject: will continue in some hours... The new class Element should work now. Data storage is still lacking --- diff --git a/noncore/apps/oxygen/dataTable.h b/noncore/apps/oxygen/dataTable.h index 624e8bd..bdcaa99 100644 --- a/noncore/apps/oxygen/dataTable.h +++ b/noncore/apps/oxygen/dataTable.h @@ -17,6 +17,15 @@ class QLabel; class OxydataTable; +/* + * A OxydataWidget shows all known data of an element. It can + * be used for both the PSE and the pure Data-Dialog. It is + * a simple QHBox with 2 QStrings in it plus a OxydataTable + * which contains the rest of the data. + * + * Author: Carsten Niehaus + */ + class OxydataWidget : public QWidget { Q_OBJECT diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp index cf55635..4e002d1 100644 --- a/noncore/apps/oxygen/psewidget.cpp +++ b/noncore/apps/oxygen/psewidget.cpp @@ -9,11 +9,21 @@ #include #include +#include #include "psewidget.h" #include "oxyframe.h" + +Element::Element( const QString &name ) +{ +} + PSEWidget::PSEWidget() : QWidget() { + QList elements; + elements.setAutoDelete( TRUE ); + elements.append( new Element( "1" ) ); + maingrid = new QGridLayout( 18 , 10 , -1 , "maingridlayout" ); OxyFrame *configobj = new OxyFrame(this); } diff --git a/noncore/apps/oxygen/psewidget.h b/noncore/apps/oxygen/psewidget.h index a0ab701..9f574ce 100644 --- a/noncore/apps/oxygen/psewidget.h +++ b/noncore/apps/oxygen/psewidget.h @@ -14,6 +14,53 @@ class QGridLayout; +class Element +{ + public: + Element(const QString &elnum); + ~Element(); + + void setName( QString c){ name = c;}; + void setWeight( QString c){ weight = c;}; + void setDensityName( QString c){density = c;}; + void setGroup( QString c){group = c;}; + void setIE( QString c){ie = c;}; + void setNum( QString c){num = c;}; + void setAZ( QString c){az = c;}; + void setDate( QString c){date = c;}; + void setEN( QString c){en = c;}; + void setMP( QString c){mp = c;}; + void setBP( QString c){bp = c;}; + void setAR( QString c){ar = c;}; + + QString elname() const{ return name; }; + QString elweight() const{ return weight; }; + QString eldensity() const{ return density; }; + QString elgroup() const{ return group; }; + QString elie() const{ return ie; }; + QString elnum() const{ return num; }; + QString elaz() const{ return az; }; + QString eldate() const{ return date; }; + QString elen() const{ return en; }; + QString elmp() const{ return mp; }; + QString elbp() const{ return bp; }; + QString elar() const{ return ar; }; + + private: + QString name, // The name of the element + weight, // weight + density, // density + group, // group + ie, // ionisationenergie + num, // number ( e.g. Carbon is 6 ) + az, // state of aggregation + date, // date of discovery + en, // electronegativity + mp, // meltingpoint + bp, // boilingpoint + ar; // atomic radius +}; + class PSEWidget : public QWidget { Q_OBJECT -- cgit v0.9.0.2