From f4a389bf66404f7c7474c4ef27491f5910da550b Mon Sep 17 00:00:00 2001 From: cniehaus Date: Sat, 21 Sep 2002 21:45:32 +0000 Subject: Now that I understand Harlekin I like his idea: Tabs --- 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,219 +11,169 @@ 0 0 - 253 - 352 + 245 + 318 caption - Calculations - - - layoutMargin - - - layoutSpacing + Form1 QTabWidget name - TabWidgetMain + TabWidget3 geometry 0 0 - 250 - 350 + 240 + 320 - - layoutMargin - - - layoutSpacing - QWidget name - tabMain + tab title - Molweight + Tab 1 - QFrame + QLayoutWidget name - FrameSystemTime + Layout6 geometry 0 0 - 240 - 310 + 230 + 290 - - frameShape - StyledPanel - - - frameShadow - Raised - - - QLayoutWidget + - name - Layout7 + margin + 0 - geometry - - 0 - 0 - 240 - 310 - + spacing + 6 - + + QLabel - margin - 0 + name + TextLabel2 - spacing - 6 + text + TextLabel2 - - QLabel - - name - TextLabel1_4 - - - text - Formula: - - - - QLineEdit + + + QLineEdit + + name + formula + + + + QLayoutWidget + + name + Layout3 + + - name - formula + margin + 0 - - - QLayoutWidget - name - Layout7 + spacing + 6 - + + QPushButton - margin - 0 + name + calculate - spacing - 6 + text + PushButton3 - - QPushButton - - name - calculate - - - text - Calculate - - - - QPushButton - - name - clear_fields - - - text - Clear - - - - - - QLabel - - name - TextLabel2_4 - - - text - Result: - - - - QLineEdit - - name - result - - - - QLabel - - name - TextLabel1 - - - text - Elemental composition (%): - - - - QMultiLineEdit - - name - anal_display - - - readOnly - true - - - - + + + QPushButton + + name + clear_fields + + + text + PushButton4 + + + + + + QLabel + + name + TextLabel3 + + + text + TextLabel3 + + + + QLineEdit + + name + result + + + + QLabel + + name + TextLabel1 + + + text + TextLabel1 + + + + QMultiLineEdit + + name + anal_display + + + QWidget name - tabNtp + tab title - Nernst + Tab 2 - - - margin - 1 - - - spacing - 2 - - 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 @@ calcDlgUI::calcDlgUI() : CalcDlg() { - this->showMaximized(); kmolcalc = new KMolCalc; connect( calculate, SIGNAL( clicked() ), this, SLOT( calc() ) ); 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) middle->setFont( bf ); DataTable = new OxydataTable( 9,2, this ); - DataTable->setColumnWidth ( 1 , 118 ); - DataTable->setColumnWidth ( 0 , 118 ); +// DataTable->setColumnWidth ( 1 , 118 ); +// DataTable->setColumnWidth ( 0 , 118 ); setTable(); 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 @@ #include #include #include +#include #include "calcdlg.h" #include "calcdlgui.h" #include "datawidgetui.h" #include "psewidget.h" -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 @@ -9,18 +9,10 @@ #include -class QVBox; - class Oxygen : public QMainWindow { Q_OBJECT public: Oxygen(); - QVBox *vbox; - private slots: - void slotCalculations() const; - void slotData() const; - void slotPSE() const; - void close() const; }; -- cgit v0.9.0.2