author | cniehaus <cniehaus> | 2002-09-20 19:24:32 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-09-20 19:24:32 (UTC) |
commit | 681e6e75efaa5577d376d0bb191afdf323cb4e75 (patch) (unidiff) | |
tree | d35ee106655e5b288e73491a2701ddc0141f4fde /noncore/apps/oxygen/datawidgetui.cpp | |
parent | c958d7cb5069e06b5cf9e9df6e78bcb644ce26a2 (diff) | |
download | opie-681e6e75efaa5577d376d0bb191afdf323cb4e75.zip opie-681e6e75efaa5577d376d0bb191afdf323cb4e75.tar.gz opie-681e6e75efaa5577d376d0bb191afdf323cb4e75.tar.bz2 |
before starting to hack QTableItem I wanted to have a safe point in cvs
Diffstat (limited to 'noncore/apps/oxygen/datawidgetui.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/datawidgetui.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/noncore/apps/oxygen/datawidgetui.cpp b/noncore/apps/oxygen/datawidgetui.cpp index 2e99c0b..4dab109 100644 --- a/noncore/apps/oxygen/datawidgetui.cpp +++ b/noncore/apps/oxygen/datawidgetui.cpp | |||
@@ -1,4 +1,12 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | application: : Oxygen | ||
3 | |||
4 | begin : September 2002 | ||
5 | copyright : ( C ) 2002 by Carsten Niehaus | ||
6 | email : cniehaus@handhelds.org | ||
7 | **************************************************************************/ | ||
8 | |||
9 | /*************************************************************************** | ||
2 | * * | 10 | * * |
3 | * 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 * |
4 | * 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 * |
@@ -8,6 +16,7 @@ | |||
8 | **************************************************************************/ | 16 | **************************************************************************/ |
9 | 17 | ||
10 | #include "datawidgetui.h" | 18 | #include "datawidgetui.h" |
19 | #include "dataTable.h" | ||
11 | 20 | ||
12 | #include <qpe/config.h> | 21 | #include <qpe/config.h> |
13 | #include <qstring.h> | 22 | #include <qstring.h> |
@@ -19,24 +28,24 @@ | |||
19 | dataWidgetUI::dataWidgetUI() : QWidget() | 28 | dataWidgetUI::dataWidgetUI() : QWidget() |
20 | { | 29 | { |
21 | this->setCaption( tr( "Chemical Data" )); | 30 | this->setCaption( tr( "Chemical Data" )); |
22 | |||
23 | QGridLayout *qgrid = new QGridLayout( this, 2,1 ); | 31 | QGridLayout *qgrid = new QGridLayout( this, 2,1 ); |
24 | 32 | ||
25 | dataCombo = new QComboBox( this ); | 33 | dataCombo = new QComboBox( this ); |
26 | OxydataWidget *oxyDW = new OxydataWidget(this); | ||
27 | oxyDW->setElement( 1 ); | ||
28 | qgrid->addWidget( dataCombo, 0,0); | ||
29 | qgrid->addWidget( oxyDW , 1,0 ); | ||
30 | |||
31 | connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) ); | ||
32 | Config configobj( "oxygendata" ); | ||
33 | 34 | ||
34 | //read in all names of the 118 elements | 35 | //read in all names of the 118 elements |
36 | Config configobj( "oxygendata" ); | ||
35 | for ( int i = 1 ; i < 119 ; i++ ) | 37 | for ( int i = 1 ; i < 119 ; i++ ) |
36 | { | 38 | { |
37 | configobj.setGroup( QString::number( i ) ); | 39 | configobj.setGroup( QString::number( i ) ); |
38 | QString foo = configobj.readEntry( "Name" ); | 40 | QString foo = configobj.readEntry( "Name" ); |
39 | dataCombo->insertItem( foo ); | 41 | dataCombo->insertItem( foo ); |
40 | } | 42 | } |
43 | |||
44 | OxydataWidget *oxyDW = new OxydataWidget(this); | ||
45 | connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) ); | ||
46 | oxyDW->setElement( 1 ); | ||
47 | |||
48 | qgrid->addWidget( dataCombo, 0,0); | ||
49 | qgrid->addWidget( oxyDW , 1,0 ); | ||
41 | } | 50 | } |
42 | 51 | ||