summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/calcdlg.ui29
-rw-r--r--noncore/apps/oxygen/calcdlgui.cpp2
-rw-r--r--noncore/apps/oxygen/dataTable.cpp15
-rw-r--r--noncore/apps/oxygen/datawidgetui.cpp2
-rw-r--r--noncore/apps/oxygen/oxygen.cpp5
5 files changed, 21 insertions, 32 deletions
diff --git a/noncore/apps/oxygen/calcdlg.ui b/noncore/apps/oxygen/calcdlg.ui
index 2d30164..a8ed170 100644
--- a/noncore/apps/oxygen/calcdlg.ui
+++ b/noncore/apps/oxygen/calcdlg.ui
@@ -10,9 +10,9 @@
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>245</width> 14 <width>241</width>
15 <height>318</height> 15 <height>318</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
@@ -41,9 +41,9 @@
41 <cstring>tab</cstring> 41 <cstring>tab</cstring>
42 </property> 42 </property>
43 <attribute> 43 <attribute>
44 <name>title</name> 44 <name>title</name>
45 <string>Tab 1</string> 45 <string>Molecular Weight</string>
46 </attribute> 46 </attribute>
47 <widget> 47 <widget>
48 <class>QLayoutWidget</class> 48 <class>QLayoutWidget</class>
49 <property stdset="1"> 49 <property stdset="1">
@@ -75,9 +75,9 @@
75 <cstring>TextLabel2</cstring> 75 <cstring>TextLabel2</cstring>
76 </property> 76 </property>
77 <property stdset="1"> 77 <property stdset="1">
78 <name>text</name> 78 <name>text</name>
79 <string>TextLabel2</string> 79 <string>chemical Formula</string>
80 </property> 80 </property>
81 </widget> 81 </widget>
82 <widget> 82 <widget>
83 <class>QLineEdit</class> 83 <class>QLineEdit</class>
@@ -108,9 +108,9 @@
108 <cstring>calculate</cstring> 108 <cstring>calculate</cstring>
109 </property> 109 </property>
110 <property stdset="1"> 110 <property stdset="1">
111 <name>text</name> 111 <name>text</name>
112 <string>PushButton3</string> 112 <string>Calculate</string>
113 </property> 113 </property>
114 </widget> 114 </widget>
115 <widget> 115 <widget>
116 <class>QPushButton</class> 116 <class>QPushButton</class>
@@ -119,9 +119,9 @@
119 <cstring>clear_fields</cstring> 119 <cstring>clear_fields</cstring>
120 </property> 120 </property>
121 <property stdset="1"> 121 <property stdset="1">
122 <name>text</name> 122 <name>text</name>
123 <string>PushButton4</string> 123 <string>Clear</string>
124 </property> 124 </property>
125 </widget> 125 </widget>
126 </hbox> 126 </hbox>
127 </widget> 127 </widget>
@@ -132,9 +132,9 @@
132 <cstring>TextLabel3</cstring> 132 <cstring>TextLabel3</cstring>
133 </property> 133 </property>
134 <property stdset="1"> 134 <property stdset="1">
135 <name>text</name> 135 <name>text</name>
136 <string>TextLabel3</string> 136 <string>Molecular Weight (u):</string>
137 </property> 137 </property>
138 </widget> 138 </widget>
139 <widget> 139 <widget>
140 <class>QLineEdit</class> 140 <class>QLineEdit</class>
@@ -150,31 +150,24 @@
150 <cstring>TextLabel1</cstring> 150 <cstring>TextLabel1</cstring>
151 </property> 151 </property>
152 <property stdset="1"> 152 <property stdset="1">
153 <name>text</name> 153 <name>text</name>
154 <string>TextLabel1</string> 154 <string>Elemental Composition (%):</string>
155 </property> 155 </property>
156 </widget> 156 </widget>
157 <widget> 157 <widget>
158 <class>QMultiLineEdit</class> 158 <class>QMultiLineEdit</class>
159 <property stdset="1"> 159 <property stdset="1">
160 <name>name</name> 160 <name>name</name>
161 <cstring>anal_display</cstring> 161 <cstring>anal_display</cstring>
162 </property> 162 </property>
163 <property stdset="1">
164 <name>readOnly</name>
165 <bool>true</bool>
166 </property>
163 </widget> 167 </widget>
164 </vbox> 168 </vbox>
165 </widget> 169 </widget>
166 </widget> 170 </widget>
167 <widget>
168 <class>QWidget</class>
169 <property stdset="1">
170 <name>name</name>
171 <cstring>tab</cstring>
172 </property>
173 <attribute>
174 <name>title</name>
175 <string>Tab 2</string>
176 </attribute>
177 </widget>
178 </widget> 171 </widget>
179</widget> 172</widget>
180</UI> 173</UI>
diff --git a/noncore/apps/oxygen/calcdlgui.cpp b/noncore/apps/oxygen/calcdlgui.cpp
index ca3a9f2..f8dfde5 100644
--- a/noncore/apps/oxygen/calcdlgui.cpp
+++ b/noncore/apps/oxygen/calcdlgui.cpp
@@ -44,9 +44,9 @@ void calcDlgUI::calc()
44 mw.setNum( weight ); 44 mw.setNum( weight );
45 ea = kmolcalc->getEmpFormula() + " :\n" + kmolcalc->getEA(); 45 ea = kmolcalc->getEmpFormula() + " :\n" + kmolcalc->getEA();
46 } else { 46 } else {
47 mw = "???"; 47 mw = "???";
48 ea = tr( "ERROR: \n" ) + errors + "\n"; 48 ea = tr( "ERROR: \n" ).arg( errors )+ "\n";
49 } 49 }
50 result->setText( mw ); 50 result->setText( mw );
51 anal_display->setText( ea ); 51 anal_display->setText( ea );
52} 52}
diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp
index 20c2985..98d3bd8 100644
--- a/noncore/apps/oxygen/dataTable.cpp
+++ b/noncore/apps/oxygen/dataTable.cpp
@@ -42,10 +42,9 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent)
42 bf.setPointSize( bf.pointSize()+2 ); 42 bf.setPointSize( bf.pointSize()+2 );
43 middle->setFont( bf ); 43 middle->setFont( bf );
44 44
45 DataTable = new OxydataTable( 9,2, this ); 45 DataTable = new OxydataTable( 9,2, this );
46 DataTable->setColumnWidth ( 1 , ( parent->width()) ); 46 //DataTable->setColumnWidth ( 1 , ( parent->width())-10 );
47 DataTable->setColumnWidth ( 0 , ( parent->width()) );
48 setTable(); 47 setTable();
49 48
50 qgrid->addWidget( hbox,0,0 ); 49 qgrid->addWidget( hbox,0,0 );
51 qgrid->addWidget( DataTable,1,0 ); 50 qgrid->addWidget( DataTable,1,0 );
@@ -61,17 +60,17 @@ void OxydataWidget::setElement( int el )
61 middle->setText( configobj.readEntry( "Name" ) ); 60 middle->setText( configobj.readEntry( "Name" ) );
62 right->setText( QString::number( el+1 ) ); 61 right->setText( QString::number( el+1 ) );
63 62
64 63
65 DataTable->setText( 0,1,( configobj.readEntry( "Weight" ) )+" u" ); 64 DataTable->setText( 0,1,tr( "%1 u" ).arg( configobj.readEntry( "Weight" ) ) );
66 DataTable->setText( 1,1,configobj.readEntry( "Block" ) ); 65 DataTable->setText( 1,1,configobj.readEntry( "Block" ) );
67 DataTable->setText( 2,1,configobj.readEntry( "Group" ) ); 66 DataTable->setText( 2,1,configobj.readEntry( "Group" ) );
68 DataTable->setText( 3,1,( configobj.readEntry( "EN" ) )+" J" ); 67 DataTable->setText( 3,1,tr( "%1 J").arg( configobj.readEntry( "EN" ) ) );
69 DataTable->setText( 4,1,configobj.readEntry( "AR" )+" nm" ) ; 68 DataTable->setText( 4,1,tr( "%1 nm" ).arg( configobj.readEntry( "AR" ) ) ) ;
70 DataTable->setText( 5,1,configobj.readEntry( "IE" )+" J" ); 69 DataTable->setText( 5,1,tr( "%1 J" ).arg( configobj.readEntry( "IE" ) ) );
71 DataTable->setText( 6,1,configobj.readEntry( "Density" ) ); 70 DataTable->setText( 6,1,configobj.readEntry( "Density" ) );
72 DataTable->setText( 7,1,configobj.readEntry( "BP" )+" K" ); 71 DataTable->setText( 7,1,tr( "%1 K" ).arg( configobj.readEntry( "BP" ) ) );
73 DataTable->setText( 8,1,configobj.readEntry( "MP" )+" K" ); 72 DataTable->setText( 8,1,tr( "%1 K" ).arg( configobj.readEntry( "MP" ) ) );
74} 73}
75 74
76void OxydataWidget::setTable() const 75void OxydataWidget::setTable() const
77{ 76{
diff --git a/noncore/apps/oxygen/datawidgetui.cpp b/noncore/apps/oxygen/datawidgetui.cpp
index 44cc43d..c7afa32 100644
--- a/noncore/apps/oxygen/datawidgetui.cpp
+++ b/noncore/apps/oxygen/datawidgetui.cpp
@@ -38,9 +38,9 @@ dataWidgetUI::dataWidgetUI() : QWidget()
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( 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) ) );
diff --git a/noncore/apps/oxygen/oxygen.cpp b/noncore/apps/oxygen/oxygen.cpp
index bc99d89..a16bc77 100644
--- a/noncore/apps/oxygen/oxygen.cpp
+++ b/noncore/apps/oxygen/oxygen.cpp
@@ -15,12 +15,9 @@
15 * * 15 * *
16 **************************************************************************/ 16 **************************************************************************/
17#include "oxygen.h" 17#include "oxygen.h"
18 18
19#include <qlabel.h>
20#include <qapplication.h> 19#include <qapplication.h>
21#include <qpushbutton.h>
22#include <qvbox.h>
23#include <qtabwidget.h> 20#include <qtabwidget.h>
24#include "calcdlg.h" 21#include "calcdlg.h"
25#include "calcdlgui.h" 22#include "calcdlgui.h"
26#include "datawidgetui.h" 23#include "datawidgetui.h"
@@ -37,6 +34,6 @@ Oxygen::Oxygen() : QMainWindow()
37 QTabWidget *tabw = new QTabWidget( this , "qtab" ); 34 QTabWidget *tabw = new QTabWidget( this , "qtab" );
38 tabw->addTab( pse, tr( "PSE" )); 35 tabw->addTab( pse, tr( "PSE" ));
39 tabw->addTab( DataWidgetUI , tr( "Data" ) ); 36 tabw->addTab( DataWidgetUI , tr( "Data" ) );
40 tabw->addTab( CalcDlgUI, tr( "Calculations" ) ); 37 tabw->addTab( CalcDlgUI, tr( "Calculations" ) );
41 setCentralWidget( tabw ); 38 setCentralWidget( tabw );
42} 39}