summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen/dataTable.cpp
Unidiff
Diffstat (limited to 'noncore/apps/oxygen/dataTable.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/oxygen/dataTable.cpp4
1 files changed, 3 insertions, 1 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
@@ -14,24 +14,25 @@
14 * ( at your option ) any later version. * 14 * ( at your option ) any later version. *
15 * * 15 * *
16 **************************************************************************/ 16 **************************************************************************/
17 17
18#include <qpe/config.h> 18#include <qpe/config.h>
19 19
20#include "dataTable.h" 20#include "dataTable.h"
21#include <qwidget.h> 21#include <qwidget.h>
22#include <qhbox.h> 22#include <qhbox.h>
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qfont.h> 24#include <qfont.h>
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qpe/qpeapplication.h>
26 27
27OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent) 28OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent)
28{ 29{
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 );
32 left = new QLabel( hbox ); 33 left = new QLabel( hbox );
33 middle = new QLabel( hbox ); 34 middle = new QLabel( hbox );
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 );
@@ -43,25 +44,26 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent)
43 44
44 DataTable = new OxydataTable( 9,2, this ); 45 DataTable = new OxydataTable( 9,2, this );
45 DataTable->setColumnWidth ( 1 , 118 ); 46 DataTable->setColumnWidth ( 1 , 118 );
46 DataTable->setColumnWidth ( 0 , 118 ); 47 DataTable->setColumnWidth ( 0 , 118 );
47 setTable(); 48 setTable();
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}
52 53
53void OxydataWidget::setElement( int el ) 54void 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" ) );
59 middle->setText( configobj.readEntry( "Name" ) ); 61 middle->setText( configobj.readEntry( "Name" ) );
60 right->setText( QString::number( el+1 ) ); 62 right->setText( QString::number( el+1 ) );
61 63
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" ) ) ;