summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2002-09-17 16:56:50 (UTC)
committer cniehaus <cniehaus>2002-09-17 16:56:50 (UTC)
commit01b2fc89a105bf5b56bc1aa467343d14589dadd2 (patch) (unidiff)
tree98cd116c8d1c8f91b5569da633225f1a5ed43b46
parentd8a05881b58a51ee2bd3b6198cf0d0c0b3f3b56c (diff)
downloadopie-01b2fc89a105bf5b56bc1aa467343d14589dadd2.zip
opie-01b2fc89a105bf5b56bc1aa467343d14589dadd2.tar.gz
opie-01b2fc89a105bf5b56bc1aa467343d14589dadd2.tar.bz2
Wow, Oxygen starts to become usable. The 2 added files are without any content
sofar, will start that tomorrow or so.
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
@@ -13,6 +13,9 @@
13#include <qstring.h> 13#include <qstring.h>
14#include <qcombobox.h> 14#include <qcombobox.h>
15#include <qlayout.h> 15#include <qlayout.h>
16#include <qtable.h>
17#include <qhbox.h>
18#include <qlabel.h>
16 19
17dataWidgetUI::dataWidgetUI() : QDialog() 20dataWidgetUI::dataWidgetUI() : QDialog()
18{ 21{
@@ -21,10 +24,17 @@ dataWidgetUI::dataWidgetUI() : QDialog()
21 QVBoxLayout *vbox = new QVBoxLayout( this ); 24 QVBoxLayout *vbox = new QVBoxLayout( this );
22 25
23 dataCombo = new QComboBox( this ); 26 dataCombo = new QComboBox( this );
24 DataTable = new OxydataTable( 7,2, this ); 27 DataTable = new OxydataTable( 8,2, this );
25 DataTable->setShowGrid( false ); 28 DataTable->setShowGrid( false );
29 DataTable->setHScrollBarMode(QScrollView::AlwaysOff);
30
31 QHBox *hbox = new QHBox( this );
32 left = new QLabel( hbox );
33 middle = new QLabel( hbox );
34 right = new QLabel( hbox );
26 35
27 vbox->addWidget( dataCombo ); 36 vbox->addWidget( dataCombo );
37 vbox->addWidget( hbox );
28 vbox->addWidget( DataTable ); 38 vbox->addWidget( DataTable );
29 39
30 DataTable->show(); 40 DataTable->show();
@@ -59,13 +69,24 @@ void dataWidgetUI::createTableLayout(){
59 DataTable->setText( 4,0,"Atomic radius" ); 69 DataTable->setText( 4,0,"Atomic radius" );
60 DataTable->setText( 5,0,"Ionizationenergie" ); 70 DataTable->setText( 5,0,"Ionizationenergie" );
61 DataTable->setText( 6,0,"Density" ); 71 DataTable->setText( 6,0,"Density" );
62 DataTable->setText( 7,0,"Boilingpoint" ); 72 DataTable->setText( 7,0, tr( "Boilingpoint" ) );
73 DataTable->setText( 8,0, tr( "Meltingpoint" ) );
63} 74}
64 75
65 76
66void dataWidgetUI::slotShowData(int number){ 77void dataWidgetUI::slotShowData(int number){
67 Config test( "/home/opie/Settings/oxygendata", Config::File ); 78 Config test( "/home/opie/Settings/oxygendata", Config::File );
68 test.setGroup( QString::number( number+1 )); 79 test.setGroup( QString::number( number+1 ));
80
81 left->setText( test.readEntry( "Symbol" ) );
82 middle->setText( test.readEntry( "Name" ) );
83 right->setText( QString::number( number+1 ) );
84
85 QFont bf;
86 bf.setBold( true );
87 bf.setPointSize( bf.pointSize()+2 );
88 middle->setFont( bf );
89
69 QString weight = test.readEntry( "Weight" ); 90 QString weight = test.readEntry( "Weight" );
70 DataTable->setText( 0,1,weight ); 91 DataTable->setText( 0,1,weight );
71 QString block = test.readEntry( "Block" ); 92 QString block = test.readEntry( "Block" );
@@ -82,4 +103,6 @@ void dataWidgetUI::slotShowData(int number){
82 DataTable->setText( 6,1,dens ); 103 DataTable->setText( 6,1,dens );
83 QString bp = test.readEntry( "BP" ); 104 QString bp = test.readEntry( "BP" );
84 DataTable->setText( 7,1,bp ); 105 DataTable->setText( 7,1,bp );
106 QString mp = test.readEntry( "MP" );
107 DataTable->setText( 7,1,mp );
85} 108}
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
@@ -12,6 +12,7 @@
12 12
13class QTable; 13class QTable;
14class QComboBox; 14class QComboBox;
15class QLabel;
15 16
16class dataWidgetUI : public QDialog 17class dataWidgetUI : public QDialog
17{ 18{
@@ -24,6 +25,7 @@ class dataWidgetUI : public QDialog
24 void createTableLayout(); 25 void createTableLayout();
25 OxydataTable *DataTable; 26 OxydataTable *DataTable;
26 QComboBox *dataCombo; 27 QComboBox *dataCombo;
28 QLabel *left, *middle, *right;
27 29
28 private slots: 30 private slots:
29 void slotShowData(int); 31 void slotShowData(int);
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
@@ -15,6 +15,7 @@
15#include "calcdlg.h" 15#include "calcdlg.h"
16#include "calcdlgui.h" 16#include "calcdlgui.h"
17#include "datawidgetui.h" 17#include "datawidgetui.h"
18#include "psewidget.h"
18 19
19Oxygen::Oxygen() 20Oxygen::Oxygen()
20 : QMainWindow() 21 : QMainWindow()
@@ -48,9 +49,15 @@ void Oxygen::slotCalculations(){
48 49
49void Oxygen::slotData(){ 50void Oxygen::slotData(){
50 dataWidgetUI *DataWidgetUI = new dataWidgetUI(); 51 dataWidgetUI *DataWidgetUI = new dataWidgetUI();
52 DataWidgetUI->showMaximized();
51 DataWidgetUI->show(); 53 DataWidgetUI->show();
52}; 54};
53 55
54void Oxygen::slotSettings(){ }; 56void Oxygen::slotSettings(){ };
55void Oxygen::slotPSE(){ }; 57
58void Oxygen::slotPSE(){
59 PSEWidget *pse = new PSEWidget();
60 pse->showMaximized();
61 pse->show();
62};
56 63
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
@@ -5,6 +5,7 @@ HEADERS = oxygen.h \
5 kmolelements.h \ 5 kmolelements.h \
6 calcdlgui.h \ 6 calcdlgui.h \
7 dataTable.h \ 7 dataTable.h \
8 psewidget.h \
8 datawidgetui.h 9 datawidgetui.h
9 10
10 SOURCES = main.cpp \ 11 SOURCES = main.cpp \
@@ -13,6 +14,7 @@ SOURCES = main.cpp \
13 calcdlgui.cpp \ 14 calcdlgui.cpp \
14 kmolelements.cpp \ 15 kmolelements.cpp \
15 dataTable.cpp \ 16 dataTable.cpp \
17 psewidget.cpp \
16 datawidgetui.cpp 18 datawidgetui.cpp
17INCLUDEPATH += $(OPIEDIR)/include 19INCLUDEPATH += $(OPIEDIR)/include
18DEPENDPATH += $(OPIEDIR)/include 20DEPENDPATH += $(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 @@
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 "psewidget.h"
13
14PSEWidget::PSEWidget() : QWidget()
15{
16}
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 @@
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#ifndef _PSEWIDGET_H
11#define _PSEWIDGET_H
12
13#include <qwidget.h>
14
15class QTable;
16class QComboBox;
17class QLabel;
18
19
20class PSEWidget : public QWidget
21{
22 Q_OBJECT
23
24 public:
25 PSEWidget();
26
27};
28
29#endif