From b753c264b7acd26aba9f5a73c1fa0a7deb0b73a3 Mon Sep 17 00:00:00 2001 From: cniehaus Date: Mon, 30 Sep 2002 13:05:45 +0000 Subject: fixed one typo I tried to fix the layouting problem but I give up. /me is to lame --- diff --git a/noncore/apps/oxygen/calcdlg.ui b/noncore/apps/oxygen/calcdlg.ui index a8ed170..c817a47 100644 --- a/noncore/apps/oxygen/calcdlg.ui +++ b/noncore/apps/oxygen/calcdlg.ui @@ -11,7 +11,7 @@ 0 0 - 241 + 237 318 @@ -76,7 +76,7 @@ text - chemical Formula + Chemical Formula diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp index 98d3bd8..82b425e 100644 --- a/noncore/apps/oxygen/dataTable.cpp +++ b/noncore/apps/oxygen/dataTable.cpp @@ -43,7 +43,6 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent) middle->setFont( bf ); DataTable = new OxydataTable( 9,2, this ); - //DataTable->setColumnWidth ( 1 , ( parent->width())-10 ); setTable(); qgrid->addWidget( hbox,0,0 ); @@ -83,7 +82,16 @@ void OxydataWidget::setTable() const DataTable->setText( 6,0, tr( "Density" )) ; DataTable->setText( 7,0, tr( "Boilingpoint" ) ); DataTable->setText( 8,0, tr( "Meltingpoint" ) ); +} + +void OxydataWidget::setLayout() +{ +#warning this is not working and I have no idea why! +// DataTable->setColumnWidth ( 0 , this->width()/2 ); +// DataTable->setColumnWidth ( 1 , this->width()/2 ); + DataTable->setColumnWidth ( 0 , 110 ); + DataTable->setColumnWidth ( 1 , 110 ); } OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent, diff --git a/noncore/apps/oxygen/dataTable.h b/noncore/apps/oxygen/dataTable.h index a4a3b18..f2eb71d 100644 --- a/noncore/apps/oxygen/dataTable.h +++ b/noncore/apps/oxygen/dataTable.h @@ -34,10 +34,11 @@ class OxydataWidget : public QWidget OxydataWidget(QWidget *parent=0); QLabel *left, *middle, *right; + void setLayout(); private: - OxydataTable *DataTable; void setTable() const; + OxydataTable *DataTable; public slots: void setElement( int ); diff --git a/noncore/apps/oxygen/datawidgetui.cpp b/noncore/apps/oxygen/datawidgetui.cpp index c7afa32..99c4fd7 100644 --- a/noncore/apps/oxygen/datawidgetui.cpp +++ b/noncore/apps/oxygen/datawidgetui.cpp @@ -45,6 +45,7 @@ dataWidgetUI::dataWidgetUI() : QWidget() OxydataWidget *oxyDW = new OxydataWidget(this); connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) ); oxyDW->setElement( 0 ); + oxyDW->setLayout(); qgrid->addWidget( dataCombo, 0,0); qgrid->addWidget( oxyDW , 1,0 ); diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp index ba9b71a..18b41c3 100644 --- a/noncore/apps/oxygen/psewidget.cpp +++ b/noncore/apps/oxygen/psewidget.cpp @@ -49,6 +49,7 @@ PSEWidget::PSEWidget() : QWidget() oxyDW = new OxydataWidget(this); oxyDW->setElement( 0 ); + oxyDW->setLayout(); vlay->addLayout( grid ); vlay->addWidget( oxyDW ); -- cgit v0.9.0.2