-rw-r--r-- | noncore/apps/oxygen/dataTable.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp index e027c16..20c2985 100644 --- a/noncore/apps/oxygen/dataTable.cpp +++ b/noncore/apps/oxygen/dataTable.cpp | |||
@@ -34,53 +34,52 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent) | |||
34 | middle = new QLabel( hbox ); | 34 | middle = new QLabel( hbox ); |
35 | right = new QLabel( hbox ); | 35 | right = new QLabel( hbox ); |
36 | 36 | ||
37 | right->setAlignment( AlignRight ); | 37 | right->setAlignment( AlignRight ); |
38 | middle->setAlignment( AlignHCenter ); | 38 | middle->setAlignment( AlignHCenter ); |
39 | 39 | ||
40 | QFont bf; | 40 | QFont bf; |
41 | bf.setBold( true ); | 41 | bf.setBold( true ); |
42 | bf.setPointSize( bf.pointSize()+2 ); | 42 | bf.setPointSize( bf.pointSize()+2 ); |
43 | middle->setFont( bf ); | 43 | middle->setFont( bf ); |
44 | 44 | ||
45 | DataTable = new OxydataTable( 9,2, this ); | 45 | DataTable = new OxydataTable( 9,2, this ); |
46 | // DataTable->setColumnWidth ( 1 , 118 ); | 46 | DataTable->setColumnWidth ( 1 , ( parent->width()) ); |
47 | // DataTable->setColumnWidth ( 0 , 118 ); | 47 | DataTable->setColumnWidth ( 0 , ( parent->width()) ); |
48 | setTable(); | 48 | setTable(); |
49 | 49 | ||
50 | qgrid->addWidget( hbox,0,0 ); | 50 | qgrid->addWidget( hbox,0,0 ); |
51 | qgrid->addWidget( DataTable,1,0 ); | 51 | qgrid->addWidget( DataTable,1,0 ); |
52 | } | 52 | } |
53 | 53 | ||
54 | void OxydataWidget::setElement( int el ) | 54 | void OxydataWidget::setElement( int el ) |
55 | { | 55 | { |
56 | Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File ); | 56 | Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File ); |
57 | 57 | ||
58 | configobj.setGroup( QString::number( el+1 )); | 58 | configobj.setGroup( QString::number( el+1 )); |
59 | 59 | ||
60 | left->setText( configobj.readEntry( "Symbol" ) ); | 60 | left->setText( configobj.readEntry( "Symbol" ) ); |
61 | middle->setText( configobj.readEntry( "Name" ) ); | 61 | middle->setText( configobj.readEntry( "Name" ) ); |
62 | right->setText( QString::number( el+1 ) ); | 62 | right->setText( QString::number( el+1 ) ); |
63 | 63 | ||
64 | 64 | ||
65 | DataTable->setText( 0,1,configobj.readEntry( "Weight" ) ); | 65 | DataTable->setText( 0,1,( configobj.readEntry( "Weight" ) )+" u" ); |
66 | DataTable->setText( 1,1,configobj.readEntry( "Block" ) ); | 66 | DataTable->setText( 1,1,configobj.readEntry( "Block" ) ); |
67 | DataTable->setText( 2,1,configobj.readEntry( "Group" ) ); | 67 | DataTable->setText( 2,1,configobj.readEntry( "Group" ) ); |
68 | DataTable->setText( 3,1,configobj.readEntry( "EN" ) ); | 68 | DataTable->setText( 3,1,( configobj.readEntry( "EN" ) )+" J" ); |
69 | DataTable->setText( 4,1,configobj.readEntry( "AR" ) ) ; | 69 | DataTable->setText( 4,1,configobj.readEntry( "AR" )+" nm" ) ; |
70 | DataTable->setText( 5,1,configobj.readEntry( "IE" ) ); | 70 | DataTable->setText( 5,1,configobj.readEntry( "IE" )+" J" ); |
71 | DataTable->setText( 6,1,configobj.readEntry( "Density" ) ); | 71 | DataTable->setText( 6,1,configobj.readEntry( "Density" ) ); |
72 | DataTable->setText( 7,1,configobj.readEntry( "BP" ) ); | 72 | DataTable->setText( 7,1,configobj.readEntry( "BP" )+" K" ); |
73 | DataTable->setText( 8,1,configobj.readEntry( "MP" ) ); | 73 | DataTable->setText( 8,1,configobj.readEntry( "MP" )+" K" ); |
74 | |||
75 | } | 74 | } |
76 | 75 | ||
77 | void OxydataWidget::setTable() const | 76 | void OxydataWidget::setTable() const |
78 | { | 77 | { |
79 | DataTable->setText( 0,0, tr( "Weight:" ) ); | 78 | DataTable->setText( 0,0, tr( "Weight:" ) ); |
80 | DataTable->setText( 1,0, tr( "Block" )) ; | 79 | DataTable->setText( 1,0, tr( "Block" )) ; |
81 | DataTable->setText( 2,0, tr( "Group" )) ; | 80 | DataTable->setText( 2,0, tr( "Group" )) ; |
82 | DataTable->setText( 3,0, tr( "Electronegativity" )) ; | 81 | DataTable->setText( 3,0, tr( "Electronegativity" )) ; |
83 | DataTable->setText( 4,0, tr( "Atomic radius" )) ; | 82 | DataTable->setText( 4,0, tr( "Atomic radius" )) ; |
84 | DataTable->setText( 5,0, tr( "Ionizationenergie" )) ; | 83 | DataTable->setText( 5,0, tr( "Ionizationenergie" )) ; |
85 | DataTable->setText( 6,0, tr( "Density" )) ; | 84 | DataTable->setText( 6,0, tr( "Density" )) ; |
86 | DataTable->setText( 7,0, tr( "Boilingpoint" ) ); | 85 | DataTable->setText( 7,0, tr( "Boilingpoint" ) ); |