author | cniehaus <cniehaus> | 2002-09-21 21:45:32 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-09-21 21:45:32 (UTC) |
commit | f4a389bf66404f7c7474c4ef27491f5910da550b (patch) (side-by-side diff) | |
tree | 3371d43fb78359eb406797918eeabf85cb59d30a /noncore/apps/oxygen | |
parent | 2e6dd40a0ba17ccf5503fa02bec810b0eeb82f8c (diff) | |
download | opie-f4a389bf66404f7c7474c4ef27491f5910da550b.zip opie-f4a389bf66404f7c7474c4ef27491f5910da550b.tar.gz opie-f4a389bf66404f7c7474c4ef27491f5910da550b.tar.bz2 |
Now that I understand Harlekin I like his idea: Tabs
-rw-r--r-- | noncore/apps/oxygen/calcdlg.ui | 92 | ||||
-rw-r--r-- | noncore/apps/oxygen/calcdlgui.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/oxygen/dataTable.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/oxygen/oxygen.cpp | 45 | ||||
-rw-r--r-- | noncore/apps/oxygen/oxygen.h | 8 |
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 @@ <y>0</y> - <width>253</width> - <height>352</height> + <width>245</width> + <height>318</height> </rect> @@ -19,9 +19,3 @@ <name>caption</name> - <string>Calculations</string> - </property> - <property> - <name>layoutMargin</name> - </property> - <property> - <name>layoutSpacing</name> + <string>Form1</string> </property> @@ -31,3 +25,3 @@ <name>name</name> - <cstring>TabWidgetMain</cstring> + <cstring>TabWidget3</cstring> </property> @@ -38,12 +32,6 @@ <y>0</y> - <width>250</width> - <height>350</height> + <width>240</width> + <height>320</height> </rect> </property> - <property> - <name>layoutMargin</name> - </property> - <property> - <name>layoutSpacing</name> - </property> <widget> @@ -52,3 +40,3 @@ <name>name</name> - <cstring>tabMain</cstring> + <cstring>tab</cstring> </property> @@ -56,28 +44,5 @@ <name>title</name> - <string>Molweight</string> + <string>Tab 1</string> </attribute> <widget> - <class>QFrame</class> - <property stdset="1"> - <name>name</name> - <cstring>FrameSystemTime</cstring> - </property> - <property stdset="1"> - <name>geometry</name> - <rect> - <x>0</x> - <y>0</y> - <width>240</width> - <height>310</height> - </rect> - </property> - <property stdset="1"> - <name>frameShape</name> - <enum>StyledPanel</enum> - </property> - <property stdset="1"> - <name>frameShadow</name> - <enum>Raised</enum> - </property> - <widget> <class>QLayoutWidget</class> @@ -85,3 +50,3 @@ <name>name</name> - <cstring>Layout7</cstring> + <cstring>Layout6</cstring> </property> @@ -92,4 +57,4 @@ <y>0</y> - <width>240</width> - <height>310</height> + <width>230</width> + <height>290</height> </rect> @@ -109,3 +74,3 @@ <name>name</name> - <cstring>TextLabel1_4</cstring> + <cstring>TextLabel2</cstring> </property> @@ -113,3 +78,3 @@ <name>text</name> - <string>Formula:</string> + <string>TextLabel2</string> </property> @@ -127,3 +92,3 @@ <name>name</name> - <cstring>Layout7</cstring> + <cstring>Layout3</cstring> </property> @@ -146,3 +111,3 @@ <name>text</name> - <string>Calculate</string> + <string>PushButton3</string> </property> @@ -157,3 +122,3 @@ <name>text</name> - <string>Clear</string> + <string>PushButton4</string> </property> @@ -166,3 +131,3 @@ <name>name</name> - <cstring>TextLabel2_4</cstring> + <cstring>TextLabel3</cstring> </property> @@ -170,3 +135,3 @@ <name>text</name> - <string>Result:</string> + <string>TextLabel3</string> </property> @@ -188,3 +153,3 @@ <name>text</name> - <string>Elemental composition (%):</string> + <string>TextLabel1</string> </property> @@ -197,6 +162,2 @@ </property> - <property stdset="1"> - <name>readOnly</name> - <bool>true</bool> - </property> </widget> @@ -205,3 +166,2 @@ </widget> - </widget> <widget> @@ -210,3 +170,3 @@ <name>name</name> - <cstring>tabNtp</cstring> + <cstring>tab</cstring> </property> @@ -214,14 +174,4 @@ <name>title</name> - <string>Nernst</string> + <string>Tab 2</string> </attribute> - <grid> - <property stdset="1"> - <name>margin</name> - <number>1</number> - </property> - <property stdset="1"> - <name>spacing</name> - <number>2</number> - </property> - </grid> </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() { - this->showMaximized(); 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) DataTable = new OxydataTable( 9,2, this ); - DataTable->setColumnWidth ( 1 , 118 ); - DataTable->setColumnWidth ( 0 , 118 ); +// DataTable->setColumnWidth ( 1 , 118 ); +// DataTable->setColumnWidth ( 0 , 118 ); 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 @@ #include <qvbox.h> +#include <qtabwidget.h> #include "calcdlg.h" @@ -27,41 +28,15 @@ -Oxygen::Oxygen() - : QMainWindow() +Oxygen::Oxygen() : QMainWindow() { - this->setCaption( tr( "Oxygen" ) ); - vbox = new QVBox( this ); - QPushButton *dataButton = new QPushButton( "Data", vbox ); - connect ( dataButton, SIGNAL( clicked() ), this, SLOT( slotData() ) ); - QPushButton *calcButton = new QPushButton( "Calculations", vbox ); - connect ( calcButton, SIGNAL( clicked() ), this, SLOT( slotCalculations() ) ); - QPushButton *pseButton = new QPushButton( "PSE", vbox ); - connect ( pseButton, SIGNAL( clicked() ), this, SLOT( slotPSE() ) ); - - setCentralWidget( vbox ); -} - - -void Oxygen::close() const -{ - QApplication::exit(); -} - -//SLOTS - -void Oxygen::slotCalculations() const{ + PSEWidget *pse = new PSEWidget(); calcDlgUI *CalcDlgUI = new calcDlgUI(); - CalcDlgUI->show(); -}; - -void Oxygen::slotData() const{ dataWidgetUI *DataWidgetUI = new dataWidgetUI(); - DataWidgetUI->showMaximized(); - DataWidgetUI->show(); -}; -void Oxygen::slotPSE() const{ - PSEWidget *pse = new PSEWidget(); - pse->showMaximized(); - pse->show(); -}; + this->setCaption( tr( "Oxygen" ) ); + QTabWidget *tabw = new QTabWidget( this , "qtab" ); + tabw->addTab( pse, tr( "PSE" )); + tabw->addTab( DataWidgetUI , tr( "Data" ) ); + tabw->addTab( CalcDlgUI, tr( "Calculations" ) ); + setCentralWidget( tabw ); +} 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 @@ -class QVBox; - class Oxygen : public QMainWindow @@ -19,8 +17,2 @@ class Oxygen : public QMainWindow Oxygen(); - QVBox *vbox; - private slots: - void slotCalculations() const; - void slotData() const; - void slotPSE() const; - void close() const; }; |