author | cniehaus <cniehaus> | 2002-09-17 16:56:50 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-09-17 16:56:50 (UTC) |
commit | 01b2fc89a105bf5b56bc1aa467343d14589dadd2 (patch) (side-by-side diff) | |
tree | 98cd116c8d1c8f91b5569da633225f1a5ed43b46 /noncore/apps/oxygen/datawidgetui.cpp | |
parent | d8a05881b58a51ee2bd3b6198cf0d0c0b3f3b56c (diff) | |
download | opie-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 (limited to 'noncore/apps/oxygen/datawidgetui.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/datawidgetui.cpp | 27 |
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 @@ -12,20 +12,30 @@ #include "datawidgetui.h" #include <qstring.h> #include <qcombobox.h> #include <qlayout.h> +#include <qtable.h> +#include <qhbox.h> +#include <qlabel.h> dataWidgetUI::dataWidgetUI() : QDialog() { this->setCaption("Chemical Data"); QVBoxLayout *vbox = new QVBoxLayout( this ); 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 ); DataTable->show(); dataCombo->show(); @@ -58,15 +68,26 @@ void dataWidgetUI::createTableLayout(){ DataTable->setText( 3,0,"Electronegativity" ); DataTable->setText( 4,0,"Atomic radius" ); 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" ) ); } 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 ); QString block = test.readEntry( "Block" ); DataTable->setText( 1,1,block ); @@ -81,5 +102,7 @@ void dataWidgetUI::slotShowData(int number){ QString dens = test.readEntry( "Density" ); DataTable->setText( 6,1,dens ); QString bp = test.readEntry( "BP" ); DataTable->setText( 7,1,bp ); + QString mp = test.readEntry( "MP" ); + DataTable->setText( 7,1,mp ); } |