summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/datawidgetui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/oxygen/datawidgetui.cpp b/noncore/apps/oxygen/datawidgetui.cpp
index b9000fa..68c025f 100644
--- a/noncore/apps/oxygen/datawidgetui.cpp
+++ b/noncore/apps/oxygen/datawidgetui.cpp
@@ -1,107 +1,107 @@
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 names = newQStringList(); 31 names = newQStringList();
32 loadNames(); 32 loadNames();
33 33
34 this->setCaption( tr( "Chemical Data" )); 34 this->setCaption( tr( "Chemical Data" ));
35 QGridLayout *qgrid = new QGridLayout( this, 2,1 ); 35 QGridLayout *qgrid = new QGridLayout( this, 2,1 );
36 36
37 dataCombo = new QComboBox( this ); 37 dataCombo = new QComboBox( this );
38 38
39 //read in all names of the 118 elements 39 //read in all names of the 118 elements
40 int i = 0; 40 int i = 0;
41 for ( QStringList::Iterator it = names->begin() ; it != names->end() ; ++it,i++) 41 for ( QStringList::Iterator it = names->begin() ; it != names->end() ; ++it,i++)
42 { 42 {
43 dataCombo->insertItem( QString::number( i )+" - "+*it ); 43 dataCombo->insertItem( QString::number( i+1 )+" - "+*it );
44 } 44 }
45 45
46 OxydataWidget *oxyDW = new OxydataWidget(this, "OxydataWidget_oxyDW", names); 46 OxydataWidget *oxyDW = new OxydataWidget(this, "OxydataWidget_oxyDW", names);
47 connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) ); 47 connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) );
48 oxyDW->setElement( 0 ); 48 oxyDW->setElement( 0 );
49 oxyDW->setLayout(); 49 oxyDW->setLayout();
50 50
51 qgrid->addWidget( dataCombo, 0,0); 51 qgrid->addWidget( dataCombo, 0,0);
52 qgrid->addWidget( oxyDW , 1,0 ); 52 qgrid->addWidget( oxyDW , 1,0 );
53} 53}
54 54
55void dataWidgetUI::loadNames() 55void dataWidgetUI::loadNames()
56{ 56{
57 names->append( tr("Hydrogen") ); 57 names->append( tr("Hydrogen") );
58 names->append( tr("Helium") ); 58 names->append( tr("Helium") );
59 names->append( tr("Lithium") ); 59 names->append( tr("Lithium") );
60 names->append( tr("Beryllium") ); 60 names->append( tr("Beryllium") );
61 names->append( tr("Boron") ); 61 names->append( tr("Boron") );
62 names->append( tr("Carbon") ); 62 names->append( tr("Carbon") );
63 names->append( tr("Nitrogen") ); 63 names->append( tr("Nitrogen") );
64 names->append( tr("Oxygen") ); 64 names->append( tr("Oxygen") );
65 names->append( tr("Fluorine") ); 65 names->append( tr("Fluorine") );
66 names->append( tr("Neon") ); 66 names->append( tr("Neon") );
67 names->append( tr("Sodium") ); 67 names->append( tr("Sodium") );
68 names->append( tr("Magnesium") ); 68 names->append( tr("Magnesium") );
69 names->append( tr("Aluminum") ); 69 names->append( tr("Aluminum") );
70 names->append( tr("Silicon") ); 70 names->append( tr("Silicon") );
71 names->append( tr("Phosphorus") ); 71 names->append( tr("Phosphorus") );
72 names->append( tr("Sulfur") ); 72 names->append( tr("Sulfur") );
73 names->append( tr("Chlorine") ); 73 names->append( tr("Chlorine") );
74 names->append( tr("Argon") ); 74 names->append( tr("Argon") );
75 names->append( tr("Potassium") ); 75 names->append( tr("Potassium") );
76 names->append( tr("Calcium") ); 76 names->append( tr("Calcium") );
77 names->append( tr("Scandium") ); 77 names->append( tr("Scandium") );
78 names->append( tr("Titanium") ); 78 names->append( tr("Titanium") );
79 names->append( tr("Vanadium") ); 79 names->append( tr("Vanadium") );
80 names->append( tr("Chromium") ); 80 names->append( tr("Chromium") );
81 names->append( tr("Manganese") ); 81 names->append( tr("Manganese") );
82 names->append( tr("Iron") ); 82 names->append( tr("Iron") );
83 names->append( tr("Cobalt") ); 83 names->append( tr("Cobalt") );
84 names->append( tr("Nickel") ); 84 names->append( tr("Nickel") );
85 names->append( tr("Copper") ); 85 names->append( tr("Copper") );
86 names->append( tr("Zinc") ); 86 names->append( tr("Zinc") );
87 names->append( tr("Gallium") ); 87 names->append( tr("Gallium") );
88 names->append( tr("Germanium") ); 88 names->append( tr("Germanium") );
89 names->append( tr("Arsenic") ); 89 names->append( tr("Arsenic") );
90 names->append( tr("Selenium") ); 90 names->append( tr("Selenium") );
91 names->append( tr("Bromine") ); 91 names->append( tr("Bromine") );
92 names->append( tr("Krypton") ); 92 names->append( tr("Krypton") );
93 names->append( tr("Rubidium") ); 93 names->append( tr("Rubidium") );
94 names->append( tr("Strontium") ); 94 names->append( tr("Strontium") );
95 names->append( tr("Yttrium") ); 95 names->append( tr("Yttrium") );
96 names->append( tr("Zirconium") ); 96 names->append( tr("Zirconium") );
97 names->append( tr("Niobium") ); 97 names->append( tr("Niobium") );
98 names->append( tr("Molybdenum") ); 98 names->append( tr("Molybdenum") );
99 names->append( tr("Technetium") ); 99 names->append( tr("Technetium") );
100 names->append( tr("Ruthenium") ); 100 names->append( tr("Ruthenium") );
101 names->append( tr("Rhodium") ); 101 names->append( tr("Rhodium") );
102 names->append( tr("Palladium") ); 102 names->append( tr("Palladium") );
103 names->append( tr("Silver") ); 103 names->append( tr("Silver") );
104 names->append( tr("Cadmium") ); 104 names->append( tr("Cadmium") );
105 names->append( tr("Indium") ); 105 names->append( tr("Indium") );
106 names->append( tr("Tin") ); 106 names->append( tr("Tin") );
107 names->append( tr("Antimony") ); 107 names->append( tr("Antimony") );