author | cniehaus <cniehaus> | 2002-09-16 17:25:52 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-09-16 17:25:52 (UTC) |
commit | 14316cddfb621038d95c542c00824f5a6d4a7d35 (patch) (side-by-side diff) | |
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 @@ calcdlg.h calcdlg.cpp +datawidget.h +datawidget.cpp moc_* *.moc 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 @@ -10,10 +10,10 @@ <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>271</width> - <height>357</height> + <width>253</width> + <height>352</height> </rect> </property> <property stdset="1"> <name>caption</name> @@ -35,9 +35,9 @@ <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>270</width> + <width>250</width> <height>350</height> </rect> </property> <property> @@ -66,10 +66,10 @@ <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>260</width> - <height>320</height> + <width>240</width> + <height>310</height> </rect> </property> <property stdset="1"> <name>frameShape</name> @@ -89,10 +89,10 @@ <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>260</width> - <height>320</height> + <width>240</width> + <height>310</height> </rect> </property> <vbox> <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 @@ +<!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 @@ -4,30 +4,28 @@ * 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 <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() : QMainWindow() { this->setCaption( "Oxygen" ); vbox = new QVBox( this ); 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() ) ); QPushButton *pseButton = new QPushButton( "PSE", vbox ); connect ( pseButton, SIGNAL( clicked() ), this, SLOT( slotPSE() ) ); @@ -47,7 +45,12 @@ void Oxygen::slotCalculations(){ calcDlgUI *CalcDlgUI = new calcDlgUI(); CalcDlgUI->show(); }; +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,10 +1,14 @@ +/*************************************************************************** + * * + * 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; class Oxygen : public QMainWindow @@ -16,7 +20,8 @@ class Oxygen : public QMainWindow QVBox *vbox; private slots: 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 @@ -2,19 +2,22 @@ TEMPLATE = app CONFIG = qt warn_on release HEADERS = oxygen.h \ kmolcalc.h \ kmolelements.h \ - calcdlgui.h + calcdlgui.h \ + datawidgetui.h SOURCES = main.cpp \ oxygen.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 TRANSLATIONS = ../../../i18n/de/oxygen.ts |