-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,4 +1,6 @@ calcdlg.h calcdlg.cpp +datawidget.h +datawidget.cpp moc_* *.moc 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 @@ -12,6 +12,6 @@ <x>0</x> <y>0</y> - <width>271</width> - <height>357</height> + <width>253</width> + <height>352</height> </rect> </property> @@ -37,5 +37,5 @@ <x>0</x> <y>0</y> - <width>270</width> + <width>250</width> <height>350</height> </rect> @@ -68,6 +68,6 @@ <x>0</x> <y>0</y> - <width>260</width> - <height>320</height> + <width>240</width> + <height>310</height> </rect> </property> @@ -91,6 +91,6 @@ <x>0</x> <y>0</y> - <width>260</width> - <height>320</height> + <width>240</width> + <height>310</height> </rect> </property> 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 @@ +<!DOCTYPE UI><UI> +<class>dataWidget</class> +<widget> + <class>QDialog</class> + <property stdset="1"> + <name>name</name> + <cstring>dataWidget</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>0</x> + <y>0</y> + <width>249</width> + <height>276</height> + </rect> + </property> + <property stdset="1"> + <name>caption</name> + <string>Chemical Data</string> + </property> + <widget> + <class>QComboBox</class> + <item> + <property> + <name>text</name> + <string>Helium</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>Carbon</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>Oxygen</string> + </property> + </item> + <property stdset="1"> + <name>name</name> + <cstring>ComboBox2</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>10</x> + <y>10</y> + <width>230</width> + <height>50</height> + </rect> + </property> + </widget> + <widget> + <class>QTable</class> + <property stdset="1"> + <name>name</name> + <cstring>dataTable</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>0</x> + <y>80</y> + <width>240</width> + <height>190</height> + </rect> + </property> + <property stdset="1"> + <name>numRows</name> + <number>6</number> + </property> + <property stdset="1"> + <name>numCols</name> + <number>2</number> + </property> + <property stdset="1"> + <name>showGrid</name> + <bool>false</bool> + </property> + </widget> +</widget> +</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 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * ( at your option ) any later version. * + * * + **************************************************************************/ +#include "oxygen.h" + +#include <qpe/config.h> +#include "datawidgetui.h" +#include <qtable.h> +#include <qstring.h> + +dataWidgetUI::dataWidgetUI() : dataWidget() +{ + Config test( "oxygendata" ); + test.setGroup( "1" ); + + if ( test.hasKey( "Name" ) ) + { + qDebug ( "geht" ); + }else qDebug( "geht nicht" ); + + QString foo = test.readEntry( "Name" ); + //test.writeEntry( "Name", "test123" ); + + qDebug( "hier sollte was kommen" ); + qDebug( foo ); + + dataTable->horizontalHeader()->hide(); + dataTable->verticalHeader()->hide(); + dataTable->setTopMargin( 0 ); + dataTable->setLeftMargin( 0 ); + dataTable->setText( 0,0,"Atomic Radius" ); + dataTable->setText( 0,1,"17 nm" ); + dataTable->setText( 1,0,"Elec. neg." ); + dataTable->setText( 1,1,"234 Joule" ); +} 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 @@ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * ( at your option ) any later version. * + * * + **************************************************************************/ +#include "datawidget.h" + +class QTable; + +class dataWidgetUI : public dataWidget +{ + Q_OBJECT + + public: + dataWidgetUI(); +}; 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 @@ -6,18 +6,14 @@ * ( at your option ) any later version. * * * - * ***********************************************************************/ + **************************************************************************/ #include "oxygen.h" -#include <qmenubar.h> -#include <qstatusbar.h> -#include <qpopupmenu.h> #include <qlabel.h> #include <qapplication.h> #include <qpushbutton.h> -#include <qfile.h> -#include <qdir.h> #include <qvbox.h> #include "calcdlg.h" #include "calcdlgui.h" +#include "datawidgetui.h" Oxygen::Oxygen() @@ -28,4 +24,6 @@ Oxygen::Oxygen() QPushButton *setButton = new QPushButton( "Settings", vbox ); connect ( setButton, SIGNAL( clicked() ), this, SLOT( slotSettings() ) ); + 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() ) ); @@ -49,4 +47,9 @@ void Oxygen::slotCalculations(){ }; +void Oxygen::slotData(){ + dataWidgetUI *DataWidgetUI = new dataWidgetUI(); + DataWidgetUI->show(); +}; + void Oxygen::slotSettings(){ }; void Oxygen::slotPSE(){ }; 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,8 +1,12 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * ( at your option ) any later version. * + * * + **************************************************************************/ -#include <qpe/resource.h> #include <qmainwindow.h> -#include <qtoolbar.h> -#include <qstring.h> -#include <qpopupmenu.h> class QVBox; @@ -18,4 +22,5 @@ class Oxygen : public QMainWindow void slotCalculations(); void slotSettings(); + void slotData(); void slotPSE(); void close(); 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 @@ -4,5 +4,6 @@ HEADERS = oxygen.h \ kmolcalc.h \ kmolelements.h \ - calcdlgui.h + calcdlgui.h \ + datawidgetui.h SOURCES = main.cpp \ @@ -10,9 +11,11 @@ SOURCES = main.cpp \ kmolcalc.cpp \ calcdlgui.cpp \ - kmolelements.cpp + kmolelements.cpp \ + datawidgetui.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -INTERFACES = calcdlg.ui +INTERFACES = calcdlg.ui \ + datawidget.ui TARGET = oxygen DESTDIR = $(OPIEDIR)/bin |