summaryrefslogtreecommitdiff
path: root/noncore/apps
authorcniehaus <cniehaus>2002-09-21 21:45:32 (UTC)
committer cniehaus <cniehaus>2002-09-21 21:45:32 (UTC)
commitf4a389bf66404f7c7474c4ef27491f5910da550b (patch) (unidiff)
tree3371d43fb78359eb406797918eeabf85cb59d30a /noncore/apps
parent2e6dd40a0ba17ccf5503fa02bec810b0eeb82f8c (diff)
downloadopie-f4a389bf66404f7c7474c4ef27491f5910da550b.zip
opie-f4a389bf66404f7c7474c4ef27491f5910da550b.tar.gz
opie-f4a389bf66404f7c7474c4ef27491f5910da550b.tar.bz2
Now that I understand Harlekin I like his idea: Tabs
Diffstat (limited to 'noncore/apps') (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
@@ -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,28 +44,5 @@
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>
@@ -85,3 +50,3 @@
85 <name>name</name> 50 <name>name</name>
86 <cstring>Layout7</cstring> 51 <cstring>Layout6</cstring>
87 </property> 52 </property>
@@ -92,4 +57,4 @@
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>
@@ -109,3 +74,3 @@
109 <name>name</name> 74 <name>name</name>
110 <cstring>TextLabel1_4</cstring> 75 <cstring>TextLabel2</cstring>
111 </property> 76 </property>
@@ -113,3 +78,3 @@
113 <name>text</name> 78 <name>text</name>
114 <string>Formula:</string> 79 <string>TextLabel2</string>
115 </property> 80 </property>
@@ -127,3 +92,3 @@
127 <name>name</name> 92 <name>name</name>
128 <cstring>Layout7</cstring> 93 <cstring>Layout3</cstring>
129 </property> 94 </property>
@@ -146,3 +111,3 @@
146 <name>text</name> 111 <name>text</name>
147 <string>Calculate</string> 112 <string>PushButton3</string>
148 </property> 113 </property>
@@ -157,3 +122,3 @@
157 <name>text</name> 122 <name>text</name>
158 <string>Clear</string> 123 <string>PushButton4</string>
159 </property> 124 </property>
@@ -166,3 +131,3 @@
166 <name>name</name> 131 <name>name</name>
167 <cstring>TextLabel2_4</cstring> 132 <cstring>TextLabel3</cstring>
168 </property> 133 </property>
@@ -170,3 +135,3 @@
170 <name>text</name> 135 <name>text</name>
171 <string>Result:</string> 136 <string>TextLabel3</string>
172 </property> 137 </property>
@@ -188,3 +153,3 @@
188 <name>text</name> 153 <name>text</name>
189 <string>Elemental composition (%):</string> 154 <string>TextLabel1</string>
190 </property> 155 </property>
@@ -197,6 +162,2 @@
197 </property> 162 </property>
198 <property stdset="1">
199 <name>readOnly</name>
200 <bool>true</bool>
201 </property>
202 </widget> 163 </widget>
@@ -205,3 +166,2 @@
205 </widget> 166 </widget>
206 </widget>
207 <widget> 167 <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();
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
@@ -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};