author | cniehaus <cniehaus> | 2002-09-21 21:45:32 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-09-21 21:45:32 (UTC) |
commit | f4a389bf66404f7c7474c4ef27491f5910da550b (patch) (unidiff) | |
tree | 3371d43fb78359eb406797918eeabf85cb59d30a /noncore/apps/oxygen/oxygen.cpp | |
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
Diffstat (limited to 'noncore/apps/oxygen/oxygen.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/oxygen.cpp | 45 |
1 files changed, 10 insertions, 35 deletions
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 @@ | |||
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 | ||
28 | Oxygen::Oxygen() | 29 | Oxygen::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 | |||
44 | void Oxygen::close() const | ||
45 | { | ||
46 | QApplication::exit(); | ||
47 | } | ||
48 | |||
49 | //SLOTS | ||
50 | |||
51 | void Oxygen::slotCalculations() const{ | ||
52 | calcDlgUI *CalcDlgUI = new calcDlgUI(); | 32 | calcDlgUI *CalcDlgUI = new calcDlgUI(); |
53 | CalcDlgUI->show(); | ||
54 | }; | ||
55 | |||
56 | void Oxygen::slotData() const{ | ||
57 | dataWidgetUI *DataWidgetUI = new dataWidgetUI(); | 33 | dataWidgetUI *DataWidgetUI = new dataWidgetUI(); |
58 | DataWidgetUI->showMaximized(); | ||
59 | DataWidgetUI->show(); | ||
60 | }; | ||
61 | 34 | ||
62 | void 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 | } | ||