summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen/datawidgetui.cpp
authorcniehaus <cniehaus>2002-09-19 10:29:38 (UTC)
committer cniehaus <cniehaus>2002-09-19 10:29:38 (UTC)
commit7bf6b71e9d7eadc9311af6a839b3425297346c2c (patch) (unidiff)
tree2b9a08cfec6ace06c6c4321cfb4c6f654b809287 /noncore/apps/oxygen/datawidgetui.cpp
parentacf131576d76536872a6999274db19a20cb76a4d (diff)
downloadopie-7bf6b71e9d7eadc9311af6a839b3425297346c2c.zip
opie-7bf6b71e9d7eadc9311af6a839b3425297346c2c.tar.gz
opie-7bf6b71e9d7eadc9311af6a839b3425297346c2c.tar.bz2
* nothing is hardcoded anylonger (thanks Max for the .conf-hint)
* removing obsolete includes * making the PSE-data-widget a QWidget instead of a QDialog * removing one obsolete slot * making oxyDW private
Diffstat (limited to 'noncore/apps/oxygen/datawidgetui.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/datawidgetui.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/noncore/apps/oxygen/datawidgetui.cpp b/noncore/apps/oxygen/datawidgetui.cpp
index fa3f40d..8188515 100644
--- a/noncore/apps/oxygen/datawidgetui.cpp
+++ b/noncore/apps/oxygen/datawidgetui.cpp
@@ -3,46 +3,40 @@
3 * This program is free software; you can redistribute it and/or modify * 3 * This program is free software; you can redistribute it and/or modify *
4 * it under the terms of the GNU General Public License as published by * 4 * it under the terms of the GNU General Public License as published by *
5 * the Free Software Foundation; either version 2 of the License, or * 5 * the Free Software Foundation; either version 2 of the License, or *
6 * ( at your option ) any later version. * 6 * ( at your option ) any later version. *
7 * * 7 * *
8 **************************************************************************/ 8 **************************************************************************/
9#include "oxygen.h" 9
10#include "datawidgetui.h" 10#include "datawidgetui.h"
11 11
12#include <qpe/config.h> 12#include <qpe/config.h>
13#include <qstring.h> 13#include <qstring.h>
14#include <qcombobox.h> 14#include <qcombobox.h>
15#include <qlayout.h> 15#include <qlayout.h>
16#include <qtable.h>
17#include <qhbox.h> 16#include <qhbox.h>
18#include <qlabel.h> 17#include <qlabel.h>
19 18
20dataWidgetUI::dataWidgetUI() : QDialog() 19dataWidgetUI::dataWidgetUI() : QWidget()
21{ 20{
22 this->setCaption("Chemical Data"); 21 this->setCaption("Chemical Data");
23 22
24 QGridLayout *qgrid = new QGridLayout( this, 2,1 ); 23 QGridLayout *qgrid = new QGridLayout( this, 2,1 );
25 24
26 dataCombo = new QComboBox( this ); 25 dataCombo = new QComboBox( this );
27 OxydataWidget *oxyDW = new OxydataWidget(this); 26 OxydataWidget *oxyDW = new OxydataWidget(this);
28 oxyDW->setElement( 1 ); 27 oxyDW->setElement( 1 );
29 qgrid->addWidget( dataCombo, 0,0); 28 qgrid->addWidget( dataCombo, 0,0);
30 qgrid->addWidget( oxyDW , 1,0 ); 29 qgrid->addWidget( oxyDW , 1,0 );
31 30
32 connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) ); 31 connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) );
33 Config test( "/home/opie/Settings/oxygendata", Config::File ); 32 Config configobj( "oxygendata" );
34 33
35 //read in all names of the 118 elements 34 //read in all names of the 118 elements
36 for ( int i = 1 ; i < 119 ; i++ ) 35 for ( int i = 1 ; i < 119 ; i++ )
37 { 36 {
38 test.setGroup( QString::number( i ) ); 37 configobj.setGroup( QString::number( i ) );
39 QString foo = test.readEntry( "Name" ); 38 QString foo = configobj.readEntry( "Name" );
40 dataCombo->insertItem( foo ); 39 dataCombo->insertItem( foo );
41 } 40 }
42} 41}
43 42
44
45
46void dataWidgetUI::slotShowData(int number){
47 oxyDW->setElement( 6 );
48}