author | cniehaus <cniehaus> | 2002-09-21 13:43:51 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-09-21 13:43:51 (UTC) |
commit | 65cf44292ac6abfb1a60be5f582cab26333cfb0a (patch) (unidiff) | |
tree | 8fec45b6ca9302055dd497fc7857015cf571665d /noncore/apps/oxygen/dataTable.cpp | |
parent | 99d546ce72f40e28b04f09201d92d58294401591 (diff) | |
download | opie-65cf44292ac6abfb1a60be5f582cab26333cfb0a.zip opie-65cf44292ac6abfb1a60be5f582cab26333cfb0a.tar.gz opie-65cf44292ac6abfb1a60be5f582cab26333cfb0a.tar.bz2 |
* moving oxygendata and kmolweights
* fixing the datafile-problems (thanks to Max)
Diffstat (limited to 'noncore/apps/oxygen/dataTable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/dataTable.cpp | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp index f034c45..45c2ffd 100644 --- a/noncore/apps/oxygen/dataTable.cpp +++ b/noncore/apps/oxygen/dataTable.cpp | |||
@@ -25,2 +25,3 @@ | |||
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qpe/qpeapplication.h> | ||
26 | 27 | ||
@@ -29,3 +30,3 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent) | |||
29 | QGridLayout *qgrid = new QGridLayout( this, 2,1 ); | 30 | QGridLayout *qgrid = new QGridLayout( this, 2,1 ); |
30 | 31 | ||
31 | QHBox *hbox = new QHBox( this ); | 32 | QHBox *hbox = new QHBox( this ); |
@@ -34,6 +35,6 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent) | |||
34 | right = new QLabel( hbox ); | 35 | right = new QLabel( hbox ); |
35 | 36 | ||
36 | right->setAlignment( AlignRight ); | 37 | right->setAlignment( AlignRight ); |
37 | middle->setAlignment( AlignHCenter ); | 38 | middle->setAlignment( AlignHCenter ); |
38 | 39 | ||
39 | QFont bf; | 40 | QFont bf; |
@@ -48,4 +49,4 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent) | |||
48 | 49 | ||
49 | qgrid->addWidget( hbox,0,0 ); | 50 | qgrid->addWidget( hbox,0,0 ); |
50 | qgrid->addWidget( DataTable,1,0 ); | 51 | qgrid->addWidget( DataTable,1,0 ); |
51 | } | 52 | } |
@@ -54,5 +55,6 @@ void OxydataWidget::setElement( int el ) | |||
54 | { | 55 | { |
55 | Config configobj( "oxygendata" ); | 56 | Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File ); |
57 | |||
56 | configobj.setGroup( QString::number( el+1 )); | 58 | configobj.setGroup( QString::number( el+1 )); |
57 | 59 | ||
58 | left->setText( configobj.readEntry( "Symbol" ) ); | 60 | left->setText( configobj.readEntry( "Symbol" ) ); |
@@ -62,12 +64,12 @@ void OxydataWidget::setElement( int el ) | |||
62 | 64 | ||
63 | DataTable->setText( 0,1,configobj.readEntry( "Weight" ) ); | 65 | DataTable->setText( 0,1,configobj.readEntry( "Weight" ) ); |
64 | DataTable->setText( 1,1,configobj.readEntry( "Block" ) ); | 66 | DataTable->setText( 1,1,configobj.readEntry( "Block" ) ); |
65 | DataTable->setText( 2,1,configobj.readEntry( "Group" ) ); | 67 | DataTable->setText( 2,1,configobj.readEntry( "Group" ) ); |
66 | DataTable->setText( 3,1,configobj.readEntry( "EN" ) ); | 68 | DataTable->setText( 3,1,configobj.readEntry( "EN" ) ); |
67 | DataTable->setText( 4,1,configobj.readEntry( "AR" ) ) ; | 69 | DataTable->setText( 4,1,configobj.readEntry( "AR" ) ) ; |
68 | DataTable->setText( 5,1,configobj.readEntry( "IE" ) ); | 70 | DataTable->setText( 5,1,configobj.readEntry( "IE" ) ); |
69 | DataTable->setText( 6,1,configobj.readEntry( "Density" ) ); | 71 | DataTable->setText( 6,1,configobj.readEntry( "Density" ) ); |
70 | DataTable->setText( 7,1,configobj.readEntry( "BP" ) ); | 72 | DataTable->setText( 7,1,configobj.readEntry( "BP" ) ); |
71 | DataTable->setText( 8,1,configobj.readEntry( "MP" ) ); | 73 | DataTable->setText( 8,1,configobj.readEntry( "MP" ) ); |
72 | 74 | ||
73 | } | 75 | } |
@@ -85,3 +87,3 @@ void OxydataWidget::setTable() const | |||
85 | DataTable->setText( 8,0, tr( "Meltingpoint" ) ); | 87 | DataTable->setText( 8,0, tr( "Meltingpoint" ) ); |
86 | 88 | ||
87 | } | 89 | } |
@@ -116,3 +118,3 @@ void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, b | |||
116 | QColorGroup colgrp = colorGroup(); | 118 | QColorGroup colgrp = colorGroup(); |
117 | if ( itm ) | 119 | if ( itm ) |
118 | { | 120 | { |
@@ -135,5 +137,5 @@ int OxydataQTI::alignment() const | |||
135 | { | 137 | { |
136 | if ( col()%2 ) | 138 | if ( col()%2 ) |
137 | { | 139 | { |
138 | return AlignRight | AlignVCenter; | 140 | return AlignRight | AlignVCenter; |
139 | }else return AlignLeft | AlignVCenter; | 141 | }else return AlignLeft | AlignVCenter; |