summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/oxygen/calcdlg.ui92
-rw-r--r--noncore/apps/oxygen/calcdlgui.cpp1
-rw-r--r--noncore/apps/oxygen/dataTable.cpp4
-rw-r--r--noncore/apps/oxygen/oxygen.cpp45
-rw-r--r--noncore/apps/oxygen/oxygen.h8
5 files changed, 33 insertions, 117 deletions
diff --git a/noncore/apps/oxygen/calcdlg.ui b/noncore/apps/oxygen/calcdlg.ui
index b4e54f1..2d30164 100644
--- a/noncore/apps/oxygen/calcdlg.ui
+++ b/noncore/apps/oxygen/calcdlg.ui
@@ -11,87 +11,52 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>253</width> 14 <width>245</width>
15 <height>352</height> 15 <height>318</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Calculations</string> 20 <string>Form1</string>
21 </property>
22 <property>
23 <name>layoutMargin</name>
24 </property>
25 <property>
26 <name>layoutSpacing</name>
27 </property> 21 </property>
28 <widget> 22 <widget>
29 <class>QTabWidget</class> 23 <class>QTabWidget</class>
30 <property stdset="1"> 24 <property stdset="1">
31 <name>name</name> 25 <name>name</name>
32 <cstring>TabWidgetMain</cstring> 26 <cstring>TabWidget3</cstring>
33 </property> 27 </property>
34 <property stdset="1"> 28 <property stdset="1">
35 <name>geometry</name> 29 <name>geometry</name>
36 <rect> 30 <rect>
37 <x>0</x> 31 <x>0</x>
38 <y>0</y> 32 <y>0</y>
39 <width>250</width> 33 <width>240</width>
40 <height>350</height> 34 <height>320</height>
41 </rect> 35 </rect>
42 </property> 36 </property>
43 <property>
44 <name>layoutMargin</name>
45 </property>
46 <property>
47 <name>layoutSpacing</name>
48 </property>
49 <widget> 37 <widget>
50 <class>QWidget</class> 38 <class>QWidget</class>
51 <property stdset="1"> 39 <property stdset="1">
52 <name>name</name> 40 <name>name</name>
53 <cstring>tabMain</cstring> 41 <cstring>tab</cstring>
54 </property> 42 </property>
55 <attribute> 43 <attribute>
56 <name>title</name> 44 <name>title</name>
57 <string>Molweight</string> 45 <string>Tab 1</string>
58 </attribute> 46 </attribute>
59 <widget> 47 <widget>
60 <class>QFrame</class>
61 <property stdset="1">
62 <name>name</name>
63 <cstring>FrameSystemTime</cstring>
64 </property>
65 <property stdset="1">
66 <name>geometry</name>
67 <rect>
68 <x>0</x>
69 <y>0</y>
70 <width>240</width>
71 <height>310</height>
72 </rect>
73 </property>
74 <property stdset="1">
75 <name>frameShape</name>
76 <enum>StyledPanel</enum>
77 </property>
78 <property stdset="1">
79 <name>frameShadow</name>
80 <enum>Raised</enum>
81 </property>
82 <widget>
83 <class>QLayoutWidget</class> 48 <class>QLayoutWidget</class>
84 <property stdset="1"> 49 <property stdset="1">
85 <name>name</name> 50 <name>name</name>
86 <cstring>Layout7</cstring> 51 <cstring>Layout6</cstring>
87 </property> 52 </property>
88 <property stdset="1"> 53 <property stdset="1">
89 <name>geometry</name> 54 <name>geometry</name>
90 <rect> 55 <rect>
91 <x>0</x> 56 <x>0</x>
92 <y>0</y> 57 <y>0</y>
93 <width>240</width> 58 <width>230</width>
94 <height>310</height> 59 <height>290</height>
95 </rect> 60 </rect>
96 </property> 61 </property>
97 <vbox> 62 <vbox>
@@ -107,11 +72,11 @@
107 <class>QLabel</class> 72 <class>QLabel</class>
108 <property stdset="1"> 73 <property stdset="1">
109 <name>name</name> 74 <name>name</name>
110 <cstring>TextLabel1_4</cstring> 75 <cstring>TextLabel2</cstring>
111 </property> 76 </property>
112 <property stdset="1"> 77 <property stdset="1">
113 <name>text</name> 78 <name>text</name>
114 <string>Formula:</string> 79 <string>TextLabel2</string>
115 </property> 80 </property>
116 </widget> 81 </widget>
117 <widget> 82 <widget>
@@ -125,7 +90,7 @@
125 <class>QLayoutWidget</class> 90 <class>QLayoutWidget</class>
126 <property stdset="1"> 91 <property stdset="1">
127 <name>name</name> 92 <name>name</name>
128 <cstring>Layout7</cstring> 93 <cstring>Layout3</cstring>
129 </property> 94 </property>
130 <hbox> 95 <hbox>
131 <property stdset="1"> 96 <property stdset="1">
@@ -144,7 +109,7 @@
144 </property> 109 </property>
145 <property stdset="1"> 110 <property stdset="1">
146 <name>text</name> 111 <name>text</name>
147 <string>Calculate</string> 112 <string>PushButton3</string>
148 </property> 113 </property>
149 </widget> 114 </widget>
150 <widget> 115 <widget>
@@ -155,7 +120,7 @@
155 </property> 120 </property>
156 <property stdset="1"> 121 <property stdset="1">
157 <name>text</name> 122 <name>text</name>
158 <string>Clear</string> 123 <string>PushButton4</string>
159 </property> 124 </property>
160 </widget> 125 </widget>
161 </hbox> 126 </hbox>
@@ -164,11 +129,11 @@
164 <class>QLabel</class> 129 <class>QLabel</class>
165 <property stdset="1"> 130 <property stdset="1">
166 <name>name</name> 131 <name>name</name>
167 <cstring>TextLabel2_4</cstring> 132 <cstring>TextLabel3</cstring>
168 </property> 133 </property>
169 <property stdset="1"> 134 <property stdset="1">
170 <name>text</name> 135 <name>text</name>
171 <string>Result:</string> 136 <string>TextLabel3</string>
172 </property> 137 </property>
173 </widget> 138 </widget>
174 <widget> 139 <widget>
@@ -186,7 +151,7 @@
186 </property> 151 </property>
187 <property stdset="1"> 152 <property stdset="1">
188 <name>text</name> 153 <name>text</name>
189 <string>Elemental composition (%):</string> 154 <string>TextLabel1</string>
190 </property> 155 </property>
191 </widget> 156 </widget>
192 <widget> 157 <widget>
@@ -195,35 +160,20 @@
195 <name>name</name> 160 <name>name</name>
196 <cstring>anal_display</cstring> 161 <cstring>anal_display</cstring>
197 </property> 162 </property>
198 <property stdset="1">
199 <name>readOnly</name>
200 <bool>true</bool>
201 </property>
202 </widget> 163 </widget>
203 </vbox> 164 </vbox>
204 </widget> 165 </widget>
205 </widget> 166 </widget>
206 </widget>
207 <widget> 167 <widget>
208 <class>QWidget</class> 168 <class>QWidget</class>
209 <property stdset="1"> 169 <property stdset="1">
210 <name>name</name> 170 <name>name</name>
211 <cstring>tabNtp</cstring> 171 <cstring>tab</cstring>
212 </property> 172 </property>
213 <attribute> 173 <attribute>
214 <name>title</name> 174 <name>title</name>
215 <string>Nernst</string> 175 <string>Tab 2</string>
216 </attribute> 176 </attribute>
217 <grid>
218 <property stdset="1">
219 <name>margin</name>
220 <number>1</number>
221 </property>
222 <property stdset="1">
223 <name>spacing</name>
224 <number>2</number>
225 </property>
226 </grid>
227 </widget> 177 </widget>
228 </widget> 178 </widget>
229</widget> 179</widget>
diff --git a/noncore/apps/oxygen/calcdlgui.cpp b/noncore/apps/oxygen/calcdlgui.cpp
index b6dfff3..ca3a9f2 100644
--- a/noncore/apps/oxygen/calcdlgui.cpp
+++ b/noncore/apps/oxygen/calcdlgui.cpp
@@ -24,7 +24,6 @@
24 24
25calcDlgUI::calcDlgUI() : CalcDlg() 25calcDlgUI::calcDlgUI() : CalcDlg()
26{ 26{
27 this->showMaximized();
28 kmolcalc = new KMolCalc; 27 kmolcalc = new KMolCalc;
29 connect( calculate, SIGNAL( clicked() ), this, SLOT( calc() ) ); 28 connect( calculate, SIGNAL( clicked() ), this, SLOT( calc() ) );
30 connect( clear_fields, SIGNAL( clicked() ), this, SLOT( clear() ) ); 29 connect( clear_fields, SIGNAL( clicked() ), this, SLOT( clear() ) );
diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp
index 45c2ffd..e027c16 100644
--- a/noncore/apps/oxygen/dataTable.cpp
+++ b/noncore/apps/oxygen/dataTable.cpp
@@ -43,8 +43,8 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent)
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 , 118 ); 46// DataTable->setColumnWidth ( 1 , 118 );
47 DataTable->setColumnWidth ( 0 , 118 ); 47// DataTable->setColumnWidth ( 0 , 118 );
48 setTable(); 48 setTable();
49 49
50 qgrid->addWidget( hbox,0,0 ); 50 qgrid->addWidget( hbox,0,0 );
diff --git a/noncore/apps/oxygen/oxygen.cpp b/noncore/apps/oxygen/oxygen.cpp
index b3392e1..bc99d89 100644
--- a/noncore/apps/oxygen/oxygen.cpp
+++ b/noncore/apps/oxygen/oxygen.cpp
@@ -20,48 +20,23 @@
20#include <qapplication.h> 20#include <qapplication.h>
21#include <qpushbutton.h> 21#include <qpushbutton.h>
22#include <qvbox.h> 22#include <qvbox.h>
23#include <qtabwidget.h>
23#include "calcdlg.h" 24#include "calcdlg.h"
24#include "calcdlgui.h" 25#include "calcdlgui.h"
25#include "datawidgetui.h" 26#include "datawidgetui.h"
26#include "psewidget.h" 27#include "psewidget.h"
27 28
28Oxygen::Oxygen() 29Oxygen::Oxygen() : QMainWindow()
29 : QMainWindow()
30{ 30{
31 this->setCaption( tr( "Oxygen" ) ); 31 PSEWidget *pse = new PSEWidget();
32 vbox = new QVBox( this );
33 QPushButton *dataButton = new QPushButton( "Data", vbox );
34 connect ( dataButton, SIGNAL( clicked() ), this, SLOT( slotData() ) );
35 QPushButton *calcButton = new QPushButton( "Calculations", vbox );
36 connect ( calcButton, SIGNAL( clicked() ), this, SLOT( slotCalculations() ) );
37 QPushButton *pseButton = new QPushButton( "PSE", vbox );
38 connect ( pseButton, SIGNAL( clicked() ), this, SLOT( slotPSE() ) );
39
40 setCentralWidget( vbox );
41}
42
43
44void Oxygen::close() const
45{
46 QApplication::exit();
47}
48
49//SLOTS
50
51void Oxygen::slotCalculations() const{
52 calcDlgUI *CalcDlgUI = new calcDlgUI(); 32 calcDlgUI *CalcDlgUI = new calcDlgUI();
53 CalcDlgUI->show();
54};
55
56void Oxygen::slotData() const{
57 dataWidgetUI *DataWidgetUI = new dataWidgetUI(); 33 dataWidgetUI *DataWidgetUI = new dataWidgetUI();
58 DataWidgetUI->showMaximized();
59 DataWidgetUI->show();
60};
61 34
62void Oxygen::slotPSE() const{ 35 this->setCaption( tr( "Oxygen" ) );
63 PSEWidget *pse = new PSEWidget();
64 pse->showMaximized();
65 pse->show();
66};
67 36
37 QTabWidget *tabw = new QTabWidget( this , "qtab" );
38 tabw->addTab( pse, tr( "PSE" ));
39 tabw->addTab( DataWidgetUI , tr( "Data" ) );
40 tabw->addTab( CalcDlgUI, tr( "Calculations" ) );
41 setCentralWidget( tabw );
42}
diff --git a/noncore/apps/oxygen/oxygen.h b/noncore/apps/oxygen/oxygen.h
index 2a10666..782cc3e 100644
--- a/noncore/apps/oxygen/oxygen.h
+++ b/noncore/apps/oxygen/oxygen.h
@@ -9,18 +9,10 @@
9 9
10#include <qmainwindow.h> 10#include <qmainwindow.h>
11 11
12class QVBox;
13
14class Oxygen : public QMainWindow 12class Oxygen : public QMainWindow
15{ 13{
16 Q_OBJECT 14 Q_OBJECT
17 15
18 public: 16 public:
19 Oxygen(); 17 Oxygen();
20 QVBox *vbox;
21 private slots:
22 void slotCalculations() const;
23 void slotData() const;
24 void slotPSE() const;
25 void close() const;
26}; 18};