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) (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
@@ -8,93 +8,58 @@
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
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>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>
98 <property stdset="1"> 63 <property stdset="1">
99 <name>margin</name> 64 <name>margin</name>
100 <number>0</number> 65 <number>0</number>
@@ -104,17 +69,17 @@
104 <number>6</number> 69 <number>6</number>
105 </property> 70 </property>
106 <widget> 71 <widget>
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>
118 <class>QLineEdit</class> 83 <class>QLineEdit</class>
119 <property stdset="1"> 84 <property stdset="1">
120 <name>name</name> 85 <name>name</name>
@@ -122,13 +87,13 @@
122 </property> 87 </property>
123 </widget> 88 </widget>
124 <widget> 89 <widget>
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">
132 <name>margin</name> 97 <name>margin</name>
133 <number>0</number> 98 <number>0</number>
134 </property> 99 </property>
@@ -141,37 +106,37 @@
141 <property stdset="1"> 106 <property stdset="1">
142 <name>name</name> 107 <name>name</name>
143 <cstring>calculate</cstring> 108 <cstring>calculate</cstring>
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>
151 <class>QPushButton</class> 116 <class>QPushButton</class>
152 <property stdset="1"> 117 <property stdset="1">
153 <name>name</name> 118 <name>name</name>
154 <cstring>clear_fields</cstring> 119 <cstring>clear_fields</cstring>
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>
162 </widget> 127 </widget>
163 <widget> 128 <widget>
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>
175 <class>QLineEdit</class> 140 <class>QLineEdit</class>
176 <property stdset="1"> 141 <property stdset="1">
177 <name>name</name> 142 <name>name</name>
@@ -183,48 +148,33 @@
183 <property stdset="1"> 148 <property stdset="1">
184 <name>name</name> 149 <name>name</name>
185 <cstring>TextLabel1</cstring> 150 <cstring>TextLabel1</cstring>
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>
193 <class>QMultiLineEdit</class> 158 <class>QMultiLineEdit</class>
194 <property stdset="1"> 159 <property stdset="1">
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>
230</UI> 180</UI>
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
@@ -21,13 +21,12 @@
21#include <qlineedit.h> 21#include <qlineedit.h>
22#include <qmultilineedit.h> 22#include <qmultilineedit.h>
23#include <qpushbutton.h> 23#include <qpushbutton.h>
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() ) );
31 result->setReadOnly( true ); 30 result->setReadOnly( true );
32} 31}
33 32
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
@@ -40,14 +40,14 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent)
40 QFont bf; 40 QFont bf;
41 bf.setBold( true ); 41 bf.setBold( true );
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 , 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 );
51 qgrid->addWidget( DataTable,1,0 ); 51 qgrid->addWidget( DataTable,1,0 );
52} 52}
53 53
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
@@ -17,51 +17,26 @@
17#include "oxygen.h" 17#include "oxygen.h"
18 18
19#include <qlabel.h> 19#include <qlabel.h>
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
@@ -6,21 +6,13 @@
6 * ( at your option ) any later version. * 6 * ( at your option ) any later version. *
7 * * 7 * *
8 **************************************************************************/ 8 **************************************************************************/
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};