summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen/datawidgetui.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/oxygen/datawidgetui.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/datawidgetui.cpp27
1 files changed, 25 insertions, 2 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 );
}