summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2002-09-21 21:45:32 (UTC)
committer cniehaus <cniehaus>2002-09-21 21:45:32 (UTC)
commitf4a389bf66404f7c7474c4ef27491f5910da550b (patch) (unidiff)
tree3371d43fb78359eb406797918eeabf85cb59d30a
parent2e6dd40a0ba17ccf5503fa02bec810b0eeb82f8c (diff)
downloadopie-f4a389bf66404f7c7474c4ef27491f5910da550b.zip
opie-f4a389bf66404f7c7474c4ef27491f5910da550b.tar.gz
opie-f4a389bf66404f7c7474c4ef27491f5910da550b.tar.bz2
Now that I understand Harlekin I like his idea: Tabs
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/calcdlg.ui252
-rw-r--r--noncore/apps/oxygen/calcdlgui.cpp1
-rw-r--r--noncore/apps/oxygen/dataTable.cpp4
-rw-r--r--noncore/apps/oxygen/oxygen.cpp49
-rw-r--r--noncore/apps/oxygen/oxygen.h8
5 files changed, 115 insertions, 199 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
@@ -13,4 +13,4 @@
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>
@@ -19,9 +19,3 @@
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>
@@ -31,3 +25,3 @@
31 <name>name</name> 25 <name>name</name>
32 <cstring>TabWidgetMain</cstring> 26 <cstring>TabWidget3</cstring>
33 </property> 27 </property>
@@ -38,12 +32,6 @@
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>
@@ -52,3 +40,3 @@
52 <name>name</name> 40 <name>name</name>
53 <cstring>tabMain</cstring> 41 <cstring>tab</cstring>
54 </property> 42 </property>
@@ -56,9 +44,9 @@
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> 48 <class>QLayoutWidget</class>
61 <property stdset="1"> 49 <property stdset="1">
62 <name>name</name> 50 <name>name</name>
63 <cstring>FrameSystemTime</cstring> 51 <cstring>Layout6</cstring>
64 </property> 52 </property>
@@ -69,137 +57,109 @@
69 <y>0</y> 57 <y>0</y>
70 <width>240</width> 58 <width>230</width>
71 <height>310</height> 59 <height>290</height>
72 </rect> 60 </rect>
73 </property> 61 </property>
74 <property stdset="1"> 62 <vbox>
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>
84 <property stdset="1"> 63 <property stdset="1">
85 <name>name</name> 64 <name>margin</name>
86 <cstring>Layout7</cstring> 65 <number>0</number>
87 </property> 66 </property>
88 <property stdset="1"> 67 <property stdset="1">
89 <name>geometry</name> 68 <name>spacing</name>
90 <rect> 69 <number>6</number>
91 <x>0</x>
92 <y>0</y>
93 <width>240</width>
94 <height>310</height>
95 </rect>
96 </property> 70 </property>
97 <vbox> 71 <widget>
72 <class>QLabel</class>
98 <property stdset="1"> 73 <property stdset="1">
99 <name>margin</name> 74 <name>name</name>
100 <number>0</number> 75 <cstring>TextLabel2</cstring>
101 </property> 76 </property>
102 <property stdset="1"> 77 <property stdset="1">
103 <name>spacing</name> 78 <name>text</name>
104 <number>6</number> 79 <string>TextLabel2</string>
105 </property> 80 </property>
106 <widget> 81 </widget>
107 <class>QLabel</class> 82 <widget>
108 <property stdset="1"> 83 <class>QLineEdit</class>
109 <name>name</name> 84 <property stdset="1">
110 <cstring>TextLabel1_4</cstring> 85 <name>name</name>
111 </property> 86 <cstring>formula</cstring>
112 <property stdset="1"> 87 </property>
113 <name>text</name> 88 </widget>
114 <string>Formula:</string> 89 <widget>
115 </property> 90 <class>QLayoutWidget</class>
116 </widget> 91 <property stdset="1">
117 <widget> 92 <name>name</name>
118 <class>QLineEdit</class> 93 <cstring>Layout3</cstring>
94 </property>
95 <hbox>
119 <property stdset="1"> 96 <property stdset="1">
120 <name>name</name> 97 <name>margin</name>
121 <cstring>formula</cstring> 98 <number>0</number>
122 </property> 99 </property>
123 </widget>
124 <widget>
125 <class>QLayoutWidget</class>
126 <property stdset="1"> 100 <property stdset="1">
127 <name>name</name> 101 <name>spacing</name>
128 <cstring>Layout7</cstring> 102 <number>6</number>
129 </property> 103 </property>
130 <hbox> 104 <widget>
105 <class>QPushButton</class>
131 <property stdset="1"> 106 <property stdset="1">
132 <name>margin</name> 107 <name>name</name>
133 <number>0</number> 108 <cstring>calculate</cstring>
134 </property> 109 </property>
135 <property stdset="1"> 110 <property stdset="1">
136 <name>spacing</name> 111 <name>text</name>
137 <number>6</number> 112 <string>PushButton3</string>
138 </property> 113 </property>
139 <widget> 114 </widget>
140 <class>QPushButton</class> 115 <widget>
141 <property stdset="1"> 116 <class>QPushButton</class>
142 <name>name</name> 117 <property stdset="1">
143 <cstring>calculate</cstring> 118 <name>name</name>
144 </property> 119 <cstring>clear_fields</cstring>
145 <property stdset="1"> 120 </property>
146 <name>text</name> 121 <property stdset="1">
147 <string>Calculate</string> 122 <name>text</name>
148 </property> 123 <string>PushButton4</string>
149 </widget> 124 </property>
150 <widget> 125 </widget>
151 <class>QPushButton</class> 126 </hbox>
152 <property stdset="1"> 127 </widget>
153 <name>name</name> 128 <widget>
154 <cstring>clear_fields</cstring> 129 <class>QLabel</class>
155 </property> 130 <property stdset="1">
156 <property stdset="1"> 131 <name>name</name>
157 <name>text</name> 132 <cstring>TextLabel3</cstring>
158 <string>Clear</string> 133 </property>
159 </property> 134 <property stdset="1">
160 </widget> 135 <name>text</name>
161 </hbox> 136 <string>TextLabel3</string>
162 </widget> 137 </property>
163 <widget> 138 </widget>
164 <class>QLabel</class> 139 <widget>
165 <property stdset="1"> 140 <class>QLineEdit</class>
166 <name>name</name> 141 <property stdset="1">
167 <cstring>TextLabel2_4</cstring> 142 <name>name</name>
168 </property> 143 <cstring>result</cstring>
169 <property stdset="1"> 144 </property>
170 <name>text</name> 145 </widget>
171 <string>Result:</string> 146 <widget>
172 </property> 147 <class>QLabel</class>
173 </widget> 148 <property stdset="1">
174 <widget> 149 <name>name</name>
175 <class>QLineEdit</class> 150 <cstring>TextLabel1</cstring>
176 <property stdset="1"> 151 </property>
177 <name>name</name> 152 <property stdset="1">
178 <cstring>result</cstring> 153 <name>text</name>
179 </property> 154 <string>TextLabel1</string>
180 </widget> 155 </property>
181 <widget> 156 </widget>
182 <class>QLabel</class> 157 <widget>
183 <property stdset="1"> 158 <class>QMultiLineEdit</class>
184 <name>name</name> 159 <property stdset="1">
185 <cstring>TextLabel1</cstring> 160 <name>name</name>
186 </property> 161 <cstring>anal_display</cstring>
187 <property stdset="1"> 162 </property>
188 <name>text</name> 163 </widget>
189 <string>Elemental composition (%):</string> 164 </vbox>
190 </property>
191 </widget>
192 <widget>
193 <class>QMultiLineEdit</class>
194 <property stdset="1">
195 <name>name</name>
196 <cstring>anal_display</cstring>
197 </property>
198 <property stdset="1">
199 <name>readOnly</name>
200 <bool>true</bool>
201 </property>
202 </widget>
203 </vbox>
204 </widget>
205 </widget> 165 </widget>
@@ -210,3 +170,3 @@
210 <name>name</name> 170 <name>name</name>
211 <cstring>tabNtp</cstring> 171 <cstring>tab</cstring>
212 </property> 172 </property>
@@ -214,14 +174,4 @@
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>
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
@@ -26,3 +26,2 @@ calcDlgUI::calcDlgUI() : CalcDlg()
26{ 26{
27 this->showMaximized();
28 kmolcalc = new KMolCalc; 27 kmolcalc = new KMolCalc;
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
@@ -45,4 +45,4 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent)
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();
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
@@ -22,2 +22,3 @@
22#include <qvbox.h> 22#include <qvbox.h>
23#include <qtabwidget.h>
23#include "calcdlg.h" 24#include "calcdlg.h"
@@ -27,41 +28,15 @@
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(); 34
59 DataWidgetUI->show(); 35 this->setCaption( tr( "Oxygen" ) );
60}; 36
61 37 QTabWidget *tabw = new QTabWidget( this , "qtab" );
62void Oxygen::slotPSE() const{ 38 tabw->addTab( pse, tr( "PSE" ));
63 PSEWidget *pse = new PSEWidget(); 39 tabw->addTab( DataWidgetUI , tr( "Data" ) );
64 pse->showMaximized(); 40 tabw->addTab( CalcDlgUI, tr( "Calculations" ) );
65 pse->show(); 41 setCentralWidget( tabw );
66}; 42}
67
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
@@ -11,4 +11,2 @@
11 11
12class QVBox;
13
14class Oxygen : public QMainWindow 12class Oxygen : public QMainWindow
@@ -19,8 +17,2 @@ class Oxygen : public QMainWindow
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};