summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/.cvsignore2
-rw-r--r--noncore/apps/oxygen/calcdlg.ui14
-rw-r--r--noncore/apps/oxygen/datawidget.ui85
-rw-r--r--noncore/apps/oxygen/datawidgetui.cpp40
-rw-r--r--noncore/apps/oxygen/datawidgetui.h20
-rw-r--r--noncore/apps/oxygen/oxygen.cpp15
-rw-r--r--noncore/apps/oxygen/oxygen.h13
-rw-r--r--noncore/apps/oxygen/oxygen.pro9
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
@@ -11,8 +11,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>271</width>
- <height>357</height>
+ <width>253</width>
+ <height>352</height>
</rect>
</property>
<property stdset="1">
@@ -36,7 +36,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>270</width>
+ <width>250</width>
<height>350</height>
</rect>
</property>
@@ -67,8 +67,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>260</width>
- <height>320</height>
+ <width>240</width>
+ <height>310</height>
</rect>
</property>
<property stdset="1">
@@ -90,8 +90,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>260</width>
- <height>320</height>
+ <width>240</width>
+ <height>310</height>
</rect>
</property>
<vbox>
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
@@ -5,20 +5,16 @@
* 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()
@@ -27,6 +23,8 @@ Oxygen::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 );
@@ -48,6 +46,11 @@ void Oxygen::slotCalculations(){
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,9 +1,13 @@
+/***************************************************************************
+ * *
+ * 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;
@@ -17,6 +21,7 @@ class Oxygen : public QMainWindow
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
@@ -3,17 +3,20 @@ 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