summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/dataTable.cpp27
-rw-r--r--noncore/apps/oxygen/datawidgetui.cpp16
-rw-r--r--noncore/apps/oxygen/datawidgetui.h8
-rw-r--r--noncore/apps/oxygen/psewidget.cpp2
4 files changed, 21 insertions, 32 deletions
diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp
index 642a8be..5c7b35c 100644
--- a/noncore/apps/oxygen/dataTable.cpp
+++ b/noncore/apps/oxygen/dataTable.cpp
@@ -12,7 +12,6 @@
12#include "dataTable.h" 12#include "dataTable.h"
13#include <qwidget.h> 13#include <qwidget.h>
14#include <qhbox.h> 14#include <qhbox.h>
15#include <qvbox.h>
16#include <qlabel.h> 15#include <qlabel.h>
17#include <qfont.h> 16#include <qfont.h>
18#include <qlayout.h> 17#include <qlayout.h>
@@ -40,30 +39,30 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent)
40 39
41void OxydataWidget::setElement( int el ) 40void OxydataWidget::setElement( int el )
42{ 41{
43 Config test( "/home/opie/Settings/oxygendata", Config::File ); 42 Config configobj( "oxygendata" );
44 test.setGroup( QString::number( el+1 )); 43 configobj.setGroup( QString::number( el+1 ));
45 44
46 left->setText( test.readEntry( "Symbol" ) ); 45 left->setText( configobj.readEntry( "Symbol" ) );
47 middle->setText( test.readEntry( "Name" ) ); 46 middle->setText( configobj.readEntry( "Name" ) );
48 right->setText( QString::number( el+1 ) ); 47 right->setText( QString::number( el+1 ) );
49 48
50 QString weight = test.readEntry( "Weight" ); 49 QString weight = configobj.readEntry( "Weight" );
51 DataTable->setText( 0,1,weight ); 50 DataTable->setText( 0,1,weight );
52 QString block = test.readEntry( "Block" ); 51 QString block = configobj.readEntry( "Block" );
53 DataTable->setText( 1,1,block ); 52 DataTable->setText( 1,1,block );
54 QString grp = test.readEntry( "Group" ); 53 QString grp = configobj.readEntry( "Group" );
55 DataTable->setText( 2,1,grp ); 54 DataTable->setText( 2,1,grp );
56 QString en = test.readEntry( "EN" ); 55 QString en = configobj.readEntry( "EN" );
57 DataTable->setText( 3,1,en ); 56 DataTable->setText( 3,1,en );
58 QString ar = test.readEntry( "AR" ); 57 QString ar = configobj.readEntry( "AR" );
59 DataTable->setText( 4,1,ar ) ; 58 DataTable->setText( 4,1,ar ) ;
60 QString ion = test.readEntry( "IE" ); 59 QString ion = configobj.readEntry( "IE" );
61 DataTable->setText( 5,1,ion ); 60 DataTable->setText( 5,1,ion );
62 QString dens = test.readEntry( "Density" ); 61 QString dens = configobj.readEntry( "Density" );
63 DataTable->setText( 6,1,dens ); 62 DataTable->setText( 6,1,dens );
64 QString bp = test.readEntry( "BP" ); 63 QString bp = configobj.readEntry( "BP" );
65 DataTable->setText( 7,1,bp ); 64 DataTable->setText( 7,1,bp );
66 QString mp = test.readEntry( "MP" ); 65 QString mp = configobj.readEntry( "MP" );
67 DataTable->setText( 8,1,mp ); 66 DataTable->setText( 8,1,mp );
68} 67}
69 68
diff --git a/noncore/apps/oxygen/datawidgetui.cpp b/noncore/apps/oxygen/datawidgetui.cpp
index fa3f40d..8188515 100644
--- a/noncore/apps/oxygen/datawidgetui.cpp
+++ b/noncore/apps/oxygen/datawidgetui.cpp
@@ -6,18 +6,17 @@
6 * ( at your option ) any later version. * 6 * ( at your option ) any later version. *
7 * * 7 * *
8 **************************************************************************/ 8 **************************************************************************/
9#include "oxygen.h" 9
10#include "datawidgetui.h" 10#include "datawidgetui.h"
11 11
12#include <qpe/config.h> 12#include <qpe/config.h>
13#include <qstring.h> 13#include <qstring.h>
14#include <qcombobox.h> 14#include <qcombobox.h>
15#include <qlayout.h> 15#include <qlayout.h>
16#include <qtable.h>
17#include <qhbox.h> 16#include <qhbox.h>
18#include <qlabel.h> 17#include <qlabel.h>
19 18
20dataWidgetUI::dataWidgetUI() : QDialog() 19dataWidgetUI::dataWidgetUI() : QWidget()
21{ 20{
22 this->setCaption("Chemical Data"); 21 this->setCaption("Chemical Data");
23 22
@@ -30,19 +29,14 @@ dataWidgetUI::dataWidgetUI() : QDialog()
30 qgrid->addWidget( oxyDW , 1,0 ); 29 qgrid->addWidget( oxyDW , 1,0 );
31 30
32 connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) ); 31 connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) );
33 Config test( "/home/opie/Settings/oxygendata", Config::File ); 32 Config configobj( "oxygendata" );
34 33
35 //read in all names of the 118 elements 34 //read in all names of the 118 elements
36 for ( int i = 1 ; i < 119 ; i++ ) 35 for ( int i = 1 ; i < 119 ; i++ )
37 { 36 {
38 test.setGroup( QString::number( i ) ); 37 configobj.setGroup( QString::number( i ) );
39 QString foo = test.readEntry( "Name" ); 38 QString foo = configobj.readEntry( "Name" );
40 dataCombo->insertItem( foo ); 39 dataCombo->insertItem( foo );
41 } 40 }
42} 41}
43 42
44
45
46void dataWidgetUI::slotShowData(int number){
47 oxyDW->setElement( 6 );
48}
diff --git a/noncore/apps/oxygen/datawidgetui.h b/noncore/apps/oxygen/datawidgetui.h
index 20622db..5399c81 100644
--- a/noncore/apps/oxygen/datawidgetui.h
+++ b/noncore/apps/oxygen/datawidgetui.h
@@ -8,22 +8,18 @@
8 * * 8 * *
9 **************************************************************************/ 9 **************************************************************************/
10#include "dataTable.h" 10#include "dataTable.h"
11#include <qdialog.h>
12 11
13class QComboBox; 12class QComboBox;
14 13
15class dataWidgetUI : public QDialog 14class dataWidgetUI : public QWidget
16{ 15{
17 Q_OBJECT 16 Q_OBJECT
18 17
19 public: 18 public:
20 dataWidgetUI(); 19 dataWidgetUI();
21 OxydataWidget *oxyDW;
22 20
23 private: 21 private:
24 OxydataTable *DataTable; 22 OxydataTable *DataTable;
25 QComboBox *dataCombo; 23 QComboBox *dataCombo;
26 24 OxydataWidget *oxyDW;
27 private slots:
28 void slotShowData(int);
29}; 25};
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp
index f48cebe..cf55635 100644
--- a/noncore/apps/oxygen/psewidget.cpp
+++ b/noncore/apps/oxygen/psewidget.cpp
@@ -15,5 +15,5 @@
15PSEWidget::PSEWidget() : QWidget() 15PSEWidget::PSEWidget() : QWidget()
16{ 16{
17 maingrid = new QGridLayout( 18 , 10 , -1 , "maingridlayout" ); 17 maingrid = new QGridLayout( 18 , 10 , -1 , "maingridlayout" );
18 OxyFrame *test = new OxyFrame(this); 18 OxyFrame *configobj = new OxyFrame(this);
19} 19}