summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/datawidgetui.cpp27
-rw-r--r--noncore/apps/oxygen/datawidgetui.h2
-rw-r--r--noncore/apps/oxygen/oxygen.cpp9
-rw-r--r--noncore/apps/oxygen/oxygen.pro2
-rw-r--r--noncore/apps/oxygen/psewidget.cpp16
-rw-r--r--noncore/apps/oxygen/psewidget.h29
6 files changed, 82 insertions, 3 deletions
diff --git a/noncore/apps/oxygen/datawidgetui.cpp b/noncore/apps/oxygen/datawidgetui.cpp
index c8492e5..7256777 100644
--- a/noncore/apps/oxygen/datawidgetui.cpp
+++ b/noncore/apps/oxygen/datawidgetui.cpp
@@ -14,4 +14,7 @@
#include <qcombobox.h>
#include <qlayout.h>
+#include <qtable.h>
+#include <qhbox.h>
+#include <qlabel.h>
dataWidgetUI::dataWidgetUI() : QDialog()
@@ -22,8 +25,15 @@ dataWidgetUI::dataWidgetUI() : QDialog()
dataCombo = new QComboBox( this );
- DataTable = new OxydataTable( 7,2, this );
+ DataTable = new OxydataTable( 8,2, this );
DataTable->setShowGrid( false );
+ DataTable->setHScrollBarMode(QScrollView::AlwaysOff);
+
+ QHBox *hbox = new QHBox( this );
+ left = new QLabel( hbox );
+ middle = new QLabel( hbox );
+ right = new QLabel( hbox );
vbox->addWidget( dataCombo );
+ vbox->addWidget( hbox );
vbox->addWidget( DataTable );
@@ -60,5 +70,6 @@ void dataWidgetUI::createTableLayout(){
DataTable->setText( 5,0,"Ionizationenergie" );
DataTable->setText( 6,0,"Density" );
- DataTable->setText( 7,0,"Boilingpoint" );
+ DataTable->setText( 7,0, tr( "Boilingpoint" ) );
+ DataTable->setText( 8,0, tr( "Meltingpoint" ) );
}
@@ -67,4 +78,14 @@ void dataWidgetUI::slotShowData(int number){
Config test( "/home/opie/Settings/oxygendata", Config::File );
test.setGroup( QString::number( number+1 ));
+
+ left->setText( test.readEntry( "Symbol" ) );
+ middle->setText( test.readEntry( "Name" ) );
+ right->setText( QString::number( number+1 ) );
+
+ QFont bf;
+ bf.setBold( true );
+ bf.setPointSize( bf.pointSize()+2 );
+ middle->setFont( bf );
+
QString weight = test.readEntry( "Weight" );
DataTable->setText( 0,1,weight );
@@ -83,3 +104,5 @@ void dataWidgetUI::slotShowData(int number){
QString bp = test.readEntry( "BP" );
DataTable->setText( 7,1,bp );
+ QString mp = test.readEntry( "MP" );
+ DataTable->setText( 7,1,mp );
}
diff --git a/noncore/apps/oxygen/datawidgetui.h b/noncore/apps/oxygen/datawidgetui.h
index 9427adf..64599a7 100644
--- a/noncore/apps/oxygen/datawidgetui.h
+++ b/noncore/apps/oxygen/datawidgetui.h
@@ -13,4 +13,5 @@
class QTable;
class QComboBox;
+class QLabel;
class dataWidgetUI : public QDialog
@@ -25,4 +26,5 @@ class dataWidgetUI : public QDialog
OxydataTable *DataTable;
QComboBox *dataCombo;
+ QLabel *left, *middle, *right;
private slots:
diff --git a/noncore/apps/oxygen/oxygen.cpp b/noncore/apps/oxygen/oxygen.cpp
index a9c2276..2574841 100644
--- a/noncore/apps/oxygen/oxygen.cpp
+++ b/noncore/apps/oxygen/oxygen.cpp
@@ -16,4 +16,5 @@
#include "calcdlgui.h"
#include "datawidgetui.h"
+#include "psewidget.h"
Oxygen::Oxygen()
@@ -49,8 +50,14 @@ void Oxygen::slotCalculations(){
void Oxygen::slotData(){
dataWidgetUI *DataWidgetUI = new dataWidgetUI();
+ DataWidgetUI->showMaximized();
DataWidgetUI->show();
};
void Oxygen::slotSettings(){ };
-void Oxygen::slotPSE(){ };
+
+void Oxygen::slotPSE(){
+ PSEWidget *pse = new PSEWidget();
+ pse->showMaximized();
+ pse->show();
+};
diff --git a/noncore/apps/oxygen/oxygen.pro b/noncore/apps/oxygen/oxygen.pro
index 1bbeb94..c447330 100644
--- a/noncore/apps/oxygen/oxygen.pro
+++ b/noncore/apps/oxygen/oxygen.pro
@@ -6,4 +6,5 @@ HEADERS = oxygen.h \
calcdlgui.h \
dataTable.h \
+ psewidget.h \
datawidgetui.h
@@ -14,4 +15,5 @@ SOURCES = main.cpp \
kmolelements.cpp \
dataTable.cpp \
+ psewidget.cpp \
datawidgetui.cpp
INCLUDEPATH += $(OPIEDIR)/include
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp
new file mode 100644
index 0000000..66450be
--- a/dev/null
+++ b/noncore/apps/oxygen/psewidget.cpp
@@ -0,0 +1,16 @@
+/***************************************************************************
+ * *
+ * 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 "psewidget.h"
+
+PSEWidget::PSEWidget() : QWidget()
+{
+}
diff --git a/noncore/apps/oxygen/psewidget.h b/noncore/apps/oxygen/psewidget.h
new file mode 100644
index 0000000..ebdec94
--- a/dev/null
+++ b/noncore/apps/oxygen/psewidget.h
@@ -0,0 +1,29 @@
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ **************************************************************************/
+#ifndef _PSEWIDGET_H
+#define _PSEWIDGET_H
+
+#include <qwidget.h>
+
+class QTable;
+class QComboBox;
+class QLabel;
+
+
+class PSEWidget : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ PSEWidget();
+
+};
+
+#endif