author | cniehaus <cniehaus> | 2002-09-16 17:25:52 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-09-16 17:25:52 (UTC) |
commit | 14316cddfb621038d95c542c00824f5a6d4a7d35 (patch) (unidiff) | |
tree | 54d841c27846534c5916344222b77fcd287f349e | |
parent | 2586589b1edb3c3b63aaf2fe1252c99162d4d70d (diff) | |
download | opie-14316cddfb621038d95c542c00824f5a6d4a7d35.zip opie-14316cddfb621038d95c542c00824f5a6d4a7d35.tar.gz opie-14316cddfb621038d95c542c00824f5a6d4a7d35.tar.bz2 |
ok, perhaps someone else is able to tell OPIE where my file is. I am sure not...
-rw-r--r-- | noncore/apps/oxygen/.cvsignore | 2 | ||||
-rw-r--r-- | noncore/apps/oxygen/calcdlg.ui | 14 | ||||
-rw-r--r-- | noncore/apps/oxygen/datawidget.ui | 85 | ||||
-rw-r--r-- | noncore/apps/oxygen/datawidgetui.cpp | 40 | ||||
-rw-r--r-- | noncore/apps/oxygen/datawidgetui.h | 20 | ||||
-rw-r--r-- | noncore/apps/oxygen/oxygen.cpp | 15 | ||||
-rw-r--r-- | noncore/apps/oxygen/oxygen.h | 13 | ||||
-rw-r--r-- | noncore/apps/oxygen/oxygen.pro | 9 |
8 files changed, 178 insertions, 20 deletions
diff --git a/noncore/apps/oxygen/.cvsignore b/noncore/apps/oxygen/.cvsignore index af13397..194054e 100644 --- a/noncore/apps/oxygen/.cvsignore +++ b/noncore/apps/oxygen/.cvsignore | |||
@@ -1,5 +1,7 @@ | |||
1 | calcdlg.h | 1 | calcdlg.h |
2 | calcdlg.cpp | 2 | calcdlg.cpp |
3 | datawidget.h | ||
4 | datawidget.cpp | ||
3 | moc_* | 5 | moc_* |
4 | *.moc | 6 | *.moc |
5 | Makefile* | 7 | Makefile* |
diff --git a/noncore/apps/oxygen/calcdlg.ui b/noncore/apps/oxygen/calcdlg.ui index adaa8b0..b4e54f1 100644 --- a/noncore/apps/oxygen/calcdlg.ui +++ b/noncore/apps/oxygen/calcdlg.ui | |||
@@ -6,18 +6,18 @@ | |||
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>CalcDlg</cstring> | 7 | <cstring>CalcDlg</cstring> |
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>271</width> | 14 | <width>253</width> |
15 | <height>357</height> | 15 | <height>352</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>Calculations</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
@@ -31,17 +31,17 @@ | |||
31 | <name>name</name> | 31 | <name>name</name> |
32 | <cstring>TabWidgetMain</cstring> | 32 | <cstring>TabWidgetMain</cstring> |
33 | </property> | 33 | </property> |
34 | <property stdset="1"> | 34 | <property stdset="1"> |
35 | <name>geometry</name> | 35 | <name>geometry</name> |
36 | <rect> | 36 | <rect> |
37 | <x>0</x> | 37 | <x>0</x> |
38 | <y>0</y> | 38 | <y>0</y> |
39 | <width>270</width> | 39 | <width>250</width> |
40 | <height>350</height> | 40 | <height>350</height> |
41 | </rect> | 41 | </rect> |
42 | </property> | 42 | </property> |
43 | <property> | 43 | <property> |
44 | <name>layoutMargin</name> | 44 | <name>layoutMargin</name> |
45 | </property> | 45 | </property> |
46 | <property> | 46 | <property> |
47 | <name>layoutSpacing</name> | 47 | <name>layoutSpacing</name> |
@@ -62,18 +62,18 @@ | |||
62 | <name>name</name> | 62 | <name>name</name> |
63 | <cstring>FrameSystemTime</cstring> | 63 | <cstring>FrameSystemTime</cstring> |
64 | </property> | 64 | </property> |
65 | <property stdset="1"> | 65 | <property stdset="1"> |
66 | <name>geometry</name> | 66 | <name>geometry</name> |
67 | <rect> | 67 | <rect> |
68 | <x>0</x> | 68 | <x>0</x> |
69 | <y>0</y> | 69 | <y>0</y> |
70 | <width>260</width> | 70 | <width>240</width> |
71 | <height>320</height> | 71 | <height>310</height> |
72 | </rect> | 72 | </rect> |
73 | </property> | 73 | </property> |
74 | <property stdset="1"> | 74 | <property stdset="1"> |
75 | <name>frameShape</name> | 75 | <name>frameShape</name> |
76 | <enum>StyledPanel</enum> | 76 | <enum>StyledPanel</enum> |
77 | </property> | 77 | </property> |
78 | <property stdset="1"> | 78 | <property stdset="1"> |
79 | <name>frameShadow</name> | 79 | <name>frameShadow</name> |
@@ -85,18 +85,18 @@ | |||
85 | <name>name</name> | 85 | <name>name</name> |
86 | <cstring>Layout7</cstring> | 86 | <cstring>Layout7</cstring> |
87 | </property> | 87 | </property> |
88 | <property stdset="1"> | 88 | <property stdset="1"> |
89 | <name>geometry</name> | 89 | <name>geometry</name> |
90 | <rect> | 90 | <rect> |
91 | <x>0</x> | 91 | <x>0</x> |
92 | <y>0</y> | 92 | <y>0</y> |
93 | <width>260</width> | 93 | <width>240</width> |
94 | <height>320</height> | 94 | <height>310</height> |
95 | </rect> | 95 | </rect> |
96 | </property> | 96 | </property> |
97 | <vbox> | 97 | <vbox> |
98 | <property stdset="1"> | 98 | <property stdset="1"> |
99 | <name>margin</name> | 99 | <name>margin</name> |
100 | <number>0</number> | 100 | <number>0</number> |
101 | </property> | 101 | </property> |
102 | <property stdset="1"> | 102 | <property stdset="1"> |
diff --git a/noncore/apps/oxygen/datawidget.ui b/noncore/apps/oxygen/datawidget.ui new file mode 100644 index 0000000..a4dcab2 --- a/dev/null +++ b/noncore/apps/oxygen/datawidget.ui | |||
@@ -0,0 +1,85 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>dataWidget</class> | ||
3 | <widget> | ||
4 | <class>QDialog</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>dataWidget</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>249</width> | ||
15 | <height>276</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>Chemical Data</string> | ||
21 | </property> | ||
22 | <widget> | ||
23 | <class>QComboBox</class> | ||
24 | <item> | ||
25 | <property> | ||
26 | <name>text</name> | ||
27 | <string>Helium</string> | ||
28 | </property> | ||
29 | </item> | ||
30 | <item> | ||
31 | <property> | ||
32 | <name>text</name> | ||
33 | <string>Carbon</string> | ||
34 | </property> | ||
35 | </item> | ||
36 | <item> | ||
37 | <property> | ||
38 | <name>text</name> | ||
39 | <string>Oxygen</string> | ||
40 | </property> | ||
41 | </item> | ||
42 | <property stdset="1"> | ||
43 | <name>name</name> | ||
44 | <cstring>ComboBox2</cstring> | ||
45 | </property> | ||
46 | <property stdset="1"> | ||
47 | <name>geometry</name> | ||
48 | <rect> | ||
49 | <x>10</x> | ||
50 | <y>10</y> | ||
51 | <width>230</width> | ||
52 | <height>50</height> | ||
53 | </rect> | ||
54 | </property> | ||
55 | </widget> | ||
56 | <widget> | ||
57 | <class>QTable</class> | ||
58 | <property stdset="1"> | ||
59 | <name>name</name> | ||
60 | <cstring>dataTable</cstring> | ||
61 | </property> | ||
62 | <property stdset="1"> | ||
63 | <name>geometry</name> | ||
64 | <rect> | ||
65 | <x>0</x> | ||
66 | <y>80</y> | ||
67 | <width>240</width> | ||
68 | <height>190</height> | ||
69 | </rect> | ||
70 | </property> | ||
71 | <property stdset="1"> | ||
72 | <name>numRows</name> | ||
73 | <number>6</number> | ||
74 | </property> | ||
75 | <property stdset="1"> | ||
76 | <name>numCols</name> | ||
77 | <number>2</number> | ||
78 | </property> | ||
79 | <property stdset="1"> | ||
80 | <name>showGrid</name> | ||
81 | <bool>false</bool> | ||
82 | </property> | ||
83 | </widget> | ||
84 | </widget> | ||
85 | </UI> | ||
diff --git a/noncore/apps/oxygen/datawidgetui.cpp b/noncore/apps/oxygen/datawidgetui.cpp new file mode 100644 index 0000000..5b34cf5 --- a/dev/null +++ b/noncore/apps/oxygen/datawidgetui.cpp | |||
@@ -0,0 +1,40 @@ | |||
1 | /*************************************************************************** | ||
2 | * * | ||
3 | * This program is free software; you can redistribute it and/or modify * | ||
4 | * it under the terms of the GNU General Public License as published by * | ||
5 | * the Free Software Foundation; either version 2 of the License, or * | ||
6 | * ( at your option ) any later version. * | ||
7 | * * | ||
8 | **************************************************************************/ | ||
9 | #include "oxygen.h" | ||
10 | |||
11 | #include <qpe/config.h> | ||
12 | #include "datawidgetui.h" | ||
13 | #include <qtable.h> | ||
14 | #include <qstring.h> | ||
15 | |||
16 | dataWidgetUI::dataWidgetUI() : dataWidget() | ||
17 | { | ||
18 | Config test( "oxygendata" ); | ||
19 | test.setGroup( "1" ); | ||
20 | |||
21 | if ( test.hasKey( "Name" ) ) | ||
22 | { | ||
23 | qDebug ( "geht" ); | ||
24 | }else qDebug( "geht nicht" ); | ||
25 | |||
26 | QString foo = test.readEntry( "Name" ); | ||
27 | //test.writeEntry( "Name", "test123" ); | ||
28 | |||
29 | qDebug( "hier sollte was kommen" ); | ||
30 | qDebug( foo ); | ||
31 | |||
32 | dataTable->horizontalHeader()->hide(); | ||
33 | dataTable->verticalHeader()->hide(); | ||
34 | dataTable->setTopMargin( 0 ); | ||
35 | dataTable->setLeftMargin( 0 ); | ||
36 | dataTable->setText( 0,0,"Atomic Radius" ); | ||
37 | dataTable->setText( 0,1,"17 nm" ); | ||
38 | dataTable->setText( 1,0,"Elec. neg." ); | ||
39 | dataTable->setText( 1,1,"234 Joule" ); | ||
40 | } | ||
diff --git a/noncore/apps/oxygen/datawidgetui.h b/noncore/apps/oxygen/datawidgetui.h new file mode 100644 index 0000000..47d9698 --- a/dev/null +++ b/noncore/apps/oxygen/datawidgetui.h | |||
@@ -0,0 +1,20 @@ | |||
1 | |||
2 | /*************************************************************************** | ||
3 | * * | ||
4 | * This program is free software; you can redistribute it and/or modify * | ||
5 | * it under the terms of the GNU General Public License as published by * | ||
6 | * the Free Software Foundation; either version 2 of the License, or * | ||
7 | * ( at your option ) any later version. * | ||
8 | * * | ||
9 | **************************************************************************/ | ||
10 | #include "datawidget.h" | ||
11 | |||
12 | class QTable; | ||
13 | |||
14 | class dataWidgetUI : public dataWidget | ||
15 | { | ||
16 | Q_OBJECT | ||
17 | |||
18 | public: | ||
19 | dataWidgetUI(); | ||
20 | }; | ||
diff --git a/noncore/apps/oxygen/oxygen.cpp b/noncore/apps/oxygen/oxygen.cpp index 81897e9..a9c2276 100644 --- a/noncore/apps/oxygen/oxygen.cpp +++ b/noncore/apps/oxygen/oxygen.cpp | |||
@@ -1,37 +1,35 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 3 | * This program is free software; you can redistribute it and/or modify * |
4 | * it under the terms of the GNU General Public License as published by * | 4 | * it under the terms of the GNU General Public License as published by * |
5 | * the Free Software Foundation; either version 2 of the License, or * | 5 | * the Free Software Foundation; either version 2 of the License, or * |
6 | * ( at your option ) any later version. * | 6 | * ( at your option ) any later version. * |
7 | * * | 7 | * * |
8 | * ***********************************************************************/ | 8 | **************************************************************************/ |
9 | #include "oxygen.h" | 9 | #include "oxygen.h" |
10 | 10 | ||
11 | #include <qmenubar.h> | ||
12 | #include <qstatusbar.h> | ||
13 | #include <qpopupmenu.h> | ||
14 | #include <qlabel.h> | 11 | #include <qlabel.h> |
15 | #include <qapplication.h> | 12 | #include <qapplication.h> |
16 | #include <qpushbutton.h> | 13 | #include <qpushbutton.h> |
17 | #include <qfile.h> | ||
18 | #include <qdir.h> | ||
19 | #include <qvbox.h> | 14 | #include <qvbox.h> |
20 | #include "calcdlg.h" | 15 | #include "calcdlg.h" |
21 | #include "calcdlgui.h" | 16 | #include "calcdlgui.h" |
17 | #include "datawidgetui.h" | ||
22 | 18 | ||
23 | Oxygen::Oxygen() | 19 | Oxygen::Oxygen() |
24 | : QMainWindow() | 20 | : QMainWindow() |
25 | { | 21 | { |
26 | this->setCaption( "Oxygen" ); | 22 | this->setCaption( "Oxygen" ); |
27 | vbox = new QVBox( this ); | 23 | vbox = new QVBox( this ); |
28 | QPushButton *setButton = new QPushButton( "Settings", vbox ); | 24 | QPushButton *setButton = new QPushButton( "Settings", vbox ); |
29 | connect ( setButton, SIGNAL( clicked() ), this, SLOT( slotSettings() ) ); | 25 | connect ( setButton, SIGNAL( clicked() ), this, SLOT( slotSettings() ) ); |
26 | QPushButton *dataButton = new QPushButton( "Data", vbox ); | ||
27 | connect ( dataButton, SIGNAL( clicked() ), this, SLOT( slotData() ) ); | ||
30 | QPushButton *calcButton = new QPushButton( "Calculations", vbox ); | 28 | QPushButton *calcButton = new QPushButton( "Calculations", vbox ); |
31 | connect ( calcButton, SIGNAL( clicked() ), this, SLOT( slotCalculations() ) ); | 29 | connect ( calcButton, SIGNAL( clicked() ), this, SLOT( slotCalculations() ) ); |
32 | QPushButton *pseButton = new QPushButton( "PSE", vbox ); | 30 | QPushButton *pseButton = new QPushButton( "PSE", vbox ); |
33 | connect ( pseButton, SIGNAL( clicked() ), this, SLOT( slotPSE() ) ); | 31 | connect ( pseButton, SIGNAL( clicked() ), this, SLOT( slotPSE() ) ); |
34 | 32 | ||
35 | setCentralWidget( vbox ); | 33 | setCentralWidget( vbox ); |
36 | } | 34 | } |
37 | 35 | ||
@@ -43,11 +41,16 @@ void Oxygen::close() | |||
43 | 41 | ||
44 | //SLOTS | 42 | //SLOTS |
45 | 43 | ||
46 | void Oxygen::slotCalculations(){ | 44 | void Oxygen::slotCalculations(){ |
47 | calcDlgUI *CalcDlgUI = new calcDlgUI(); | 45 | calcDlgUI *CalcDlgUI = new calcDlgUI(); |
48 | CalcDlgUI->show(); | 46 | CalcDlgUI->show(); |
49 | }; | 47 | }; |
50 | 48 | ||
49 | void Oxygen::slotData(){ | ||
50 | dataWidgetUI *DataWidgetUI = new dataWidgetUI(); | ||
51 | DataWidgetUI->show(); | ||
52 | }; | ||
53 | |||
51 | void Oxygen::slotSettings(){ }; | 54 | void Oxygen::slotSettings(){ }; |
52 | void Oxygen::slotPSE(){ }; | 55 | void Oxygen::slotPSE(){ }; |
53 | 56 | ||
diff --git a/noncore/apps/oxygen/oxygen.h b/noncore/apps/oxygen/oxygen.h index 1e923ee..71914eb 100644 --- a/noncore/apps/oxygen/oxygen.h +++ b/noncore/apps/oxygen/oxygen.h | |||
@@ -1,22 +1,27 @@ | |||
1 | /*************************************************************************** | ||
2 | * * | ||
3 | * This program is free software; you can redistribute it and/or modify * | ||
4 | * it under the terms of the GNU General Public License as published by * | ||
5 | * the Free Software Foundation; either version 2 of the License, or * | ||
6 | * ( at your option ) any later version. * | ||
7 | * * | ||
8 | **************************************************************************/ | ||
1 | 9 | ||
2 | #include <qpe/resource.h> | ||
3 | #include <qmainwindow.h> | 10 | #include <qmainwindow.h> |
4 | #include <qtoolbar.h> | ||
5 | #include <qstring.h> | ||
6 | #include <qpopupmenu.h> | ||
7 | 11 | ||
8 | class QVBox; | 12 | class QVBox; |
9 | 13 | ||
10 | class Oxygen : public QMainWindow | 14 | class Oxygen : public QMainWindow |
11 | { | 15 | { |
12 | Q_OBJECT | 16 | Q_OBJECT |
13 | 17 | ||
14 | public: | 18 | public: |
15 | Oxygen(); | 19 | Oxygen(); |
16 | QVBox *vbox; | 20 | QVBox *vbox; |
17 | private slots: | 21 | private slots: |
18 | void slotCalculations(); | 22 | void slotCalculations(); |
19 | void slotSettings(); | 23 | void slotSettings(); |
24 | void slotData(); | ||
20 | void slotPSE(); | 25 | void slotPSE(); |
21 | void close(); | 26 | void close(); |
22 | }; | 27 | }; |
diff --git a/noncore/apps/oxygen/oxygen.pro b/noncore/apps/oxygen/oxygen.pro index c5448e7..7736a97 100644 --- a/noncore/apps/oxygen/oxygen.pro +++ b/noncore/apps/oxygen/oxygen.pro | |||
@@ -1,20 +1,23 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on release | 2 | CONFIG = qt warn_on release |
3 | HEADERS = oxygen.h \ | 3 | HEADERS = oxygen.h \ |
4 | kmolcalc.h \ | 4 | kmolcalc.h \ |
5 | kmolelements.h \ | 5 | kmolelements.h \ |
6 | calcdlgui.h | 6 | calcdlgui.h \ |
7 | datawidgetui.h | ||
7 | 8 | ||
8 | SOURCES = main.cpp \ | 9 | SOURCES = main.cpp \ |
9 | oxygen.cpp \ | 10 | oxygen.cpp \ |
10 | kmolcalc.cpp \ | 11 | kmolcalc.cpp \ |
11 | calcdlgui.cpp \ | 12 | calcdlgui.cpp \ |
12 | kmolelements.cpp | 13 | kmolelements.cpp \ |
14 | datawidgetui.cpp | ||
13 | INCLUDEPATH += $(OPIEDIR)/include | 15 | INCLUDEPATH += $(OPIEDIR)/include |
14 | DEPENDPATH += $(OPIEDIR)/include | 16 | DEPENDPATH += $(OPIEDIR)/include |
15 | LIBS += -lqpe | 17 | LIBS += -lqpe |
16 | INTERFACES= calcdlg.ui | 18 | INTERFACES= calcdlg.ui \ |
19 | datawidget.ui | ||
17 | TARGET = oxygen | 20 | TARGET = oxygen |
18 | DESTDIR = $(OPIEDIR)/bin | 21 | DESTDIR = $(OPIEDIR)/bin |
19 | 22 | ||
20 | TRANSLATIONS = ../../../i18n/de/oxygen.ts | 23 | TRANSLATIONS = ../../../i18n/de/oxygen.ts |