summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen/datawidgetui.cpp
Unidiff
Diffstat (limited to 'noncore/apps/oxygen/datawidgetui.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/datawidgetui.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/apps/oxygen/datawidgetui.cpp b/noncore/apps/oxygen/datawidgetui.cpp
index c7afa32..99c4fd7 100644
--- a/noncore/apps/oxygen/datawidgetui.cpp
+++ b/noncore/apps/oxygen/datawidgetui.cpp
@@ -1,52 +1,53 @@
1/*************************************************************************** 1/***************************************************************************
2 application: : Oxygen 2 application: : Oxygen
3 3
4 begin : September 2002 4 begin : September 2002
5 copyright : ( C ) 2002 by Carsten Niehaus 5 copyright : ( C ) 2002 by Carsten Niehaus
6 email : cniehaus@handhelds.org 6 email : cniehaus@handhelds.org
7 **************************************************************************/ 7 **************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * ( at your option ) any later version. * 14 * ( at your option ) any later version. *
15 * * 15 * *
16 **************************************************************************/ 16 **************************************************************************/
17 17
18#include "datawidgetui.h" 18#include "datawidgetui.h"
19#include "dataTable.h" 19#include "dataTable.h"
20 20
21#include <qpe/config.h> 21#include <qpe/config.h>
22#include <qstring.h> 22#include <qstring.h>
23#include <qcombobox.h> 23#include <qcombobox.h>
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qhbox.h> 25#include <qhbox.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
28 28
29dataWidgetUI::dataWidgetUI() : QWidget() 29dataWidgetUI::dataWidgetUI() : QWidget()
30{ 30{
31 this->setCaption( tr( "Chemical Data" )); 31 this->setCaption( tr( "Chemical Data" ));
32 QGridLayout *qgrid = new QGridLayout( this, 2,1 ); 32 QGridLayout *qgrid = new QGridLayout( this, 2,1 );
33 33
34 dataCombo = new QComboBox( this ); 34 dataCombo = new QComboBox( this );
35 35
36 //read in all names of the 118 elements 36 //read in all names of the 118 elements
37 Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File ); 37 Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File );
38 for ( int i = 1 ; i < 119 ; i++ ) 38 for ( int i = 1 ; i < 119 ; i++ )
39 { 39 {
40 configobj.setGroup( QString::number( i ) ); 40 configobj.setGroup( QString::number( i ) );
41 QString foo = configobj.readEntry( "Name" ); 41 QString foo = configobj.readEntry( "Name" );
42 dataCombo->insertItem( QString::number( i )+" - "+foo ); 42 dataCombo->insertItem( QString::number( i )+" - "+foo );
43 } 43 }
44 44
45 OxydataWidget *oxyDW = new OxydataWidget(this); 45 OxydataWidget *oxyDW = new OxydataWidget(this);
46 connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) ); 46 connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) );
47 oxyDW->setElement( 0 ); 47 oxyDW->setElement( 0 );
48 oxyDW->setLayout();
48 49
49 qgrid->addWidget( dataCombo, 0,0); 50 qgrid->addWidget( dataCombo, 0,0);
50 qgrid->addWidget( oxyDW , 1,0 ); 51 qgrid->addWidget( oxyDW , 1,0 );
51} 52}
52 53