summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen/dataTable.cpp
Side-by-side diff
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
@@ -2,78 +2,80 @@
application: : Oxygen
begin : September 2002
copyright : ( C ) 2002 by Carsten Niehaus
email : cniehaus@handhelds.org
**************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* ( at your option ) any later version. *
* *
**************************************************************************/
#include <qpe/config.h>
#include "dataTable.h"
#include <qwidget.h>
#include <qhbox.h>
#include <qlabel.h>
#include <qfont.h>
#include <qlayout.h>
+#include <qpe/qpeapplication.h>
OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent)
{
QGridLayout *qgrid = new QGridLayout( this, 2,1 );
QHBox *hbox = new QHBox( this );
left = new QLabel( hbox );
middle = new QLabel( hbox );
right = new QLabel( hbox );
right->setAlignment( AlignRight );
middle->setAlignment( AlignHCenter );
QFont bf;
bf.setBold( true );
bf.setPointSize( bf.pointSize()+2 );
middle->setFont( bf );
DataTable = new OxydataTable( 9,2, this );
DataTable->setColumnWidth ( 1 , 118 );
DataTable->setColumnWidth ( 0 , 118 );
setTable();
qgrid->addWidget( hbox,0,0 );
qgrid->addWidget( DataTable,1,0 );
}
void OxydataWidget::setElement( int el )
{
- Config configobj( "oxygendata" );
+ Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File );
+
configobj.setGroup( QString::number( el+1 ));
left->setText( configobj.readEntry( "Symbol" ) );
middle->setText( configobj.readEntry( "Name" ) );
right->setText( QString::number( el+1 ) );
DataTable->setText( 0,1,configobj.readEntry( "Weight" ) );
DataTable->setText( 1,1,configobj.readEntry( "Block" ) );
DataTable->setText( 2,1,configobj.readEntry( "Group" ) );
DataTable->setText( 3,1,configobj.readEntry( "EN" ) );
DataTable->setText( 4,1,configobj.readEntry( "AR" ) ) ;
DataTable->setText( 5,1,configobj.readEntry( "IE" ) );
DataTable->setText( 6,1,configobj.readEntry( "Density" ) );
DataTable->setText( 7,1,configobj.readEntry( "BP" ) );
DataTable->setText( 8,1,configobj.readEntry( "MP" ) );
}
void OxydataWidget::setTable() const
{
DataTable->setText( 0,0, tr( "Weight:" ) );
DataTable->setText( 1,0, tr( "Block" )) ;
DataTable->setText( 2,0, tr( "Group" )) ;