-rw-r--r-- | noncore/apps/oxygen/calcdlgui.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/oxygen/dataTable.cpp | 22 | ||||
-rw-r--r-- | noncore/apps/oxygen/dataTable.h | 11 | ||||
-rw-r--r-- | noncore/apps/oxygen/datawidgetui.cpp | 25 | ||||
-rw-r--r-- | noncore/apps/oxygen/datawidgetui.h | 18 | ||||
-rw-r--r-- | noncore/apps/oxygen/main.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/oxygen/oxyframe.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/oxygen/oxyframe.h | 7 | ||||
-rw-r--r-- | noncore/apps/oxygen/oxygen.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/oxygen/psewidget.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/oxygen/psewidget.h | 7 |
11 files changed, 120 insertions, 10 deletions
diff --git a/noncore/apps/oxygen/calcdlgui.cpp b/noncore/apps/oxygen/calcdlgui.cpp index e40e2c7..b6dfff3 100644 --- a/noncore/apps/oxygen/calcdlgui.cpp +++ b/noncore/apps/oxygen/calcdlgui.cpp @@ -1,3 +1,11 @@ /*************************************************************************** + application: : Oxygen + + begin : September 2002 + copyright : ( C ) 2002 by Carsten Niehaus + email : cniehaus@handhelds.org + **************************************************************************/ + +/*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp index 70b5a6a..ff01417 100644 --- a/noncore/apps/oxygen/dataTable.cpp +++ b/noncore/apps/oxygen/dataTable.cpp @@ -1,3 +1,11 @@ /*************************************************************************** + application: : Oxygen + + begin : September 2002 + copyright : ( C ) 2002 by Carsten Niehaus + email : cniehaus@handhelds.org + **************************************************************************/ + +/*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * @@ -20,4 +28,5 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent) { QGridLayout *qgrid = new QGridLayout( this, 2,1 ); + QHBox *hbox = new QHBox( this ); left = new QLabel( hbox ); @@ -25,5 +34,6 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent) right = new QLabel( hbox ); - DataTable = new OxydataTable( 9,2, this ); + right->setAlignment( AlignRight ); + middle->setAlignment( AlignHCenter ); QFont bf; @@ -32,4 +42,7 @@ OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent) middle->setFont( bf ); + DataTable = new OxydataTable( 9,2, this ); + DataTable->setColumnWidth ( 1 , 118 ); + DataTable->setColumnWidth ( 0 , 118 ); setTable(); @@ -82,4 +95,11 @@ OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent, } +int OxydataTable::alignment() const +{ + return AlignLeft | AlignVCenter; +}; + + + void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected) { diff --git a/noncore/apps/oxygen/dataTable.h b/noncore/apps/oxygen/dataTable.h index ccc4300..00063d4 100644 --- a/noncore/apps/oxygen/dataTable.h +++ b/noncore/apps/oxygen/dataTable.h @@ -17,4 +17,5 @@ class QLabel; class OxydataTable; +class QTableItem; /* @@ -60,4 +61,7 @@ class OxydataTable : public QTable QWidget *parent = 0, const char *name = 0 ); + virtual int alignment() const; +// virtual QTableItem *item( int row, int col ) const; + protected: /* @@ -68,3 +72,10 @@ class OxydataTable : public QTable }; +//X class OxydataQTI : QTableItem +//X { +//X Q_OBJECT +//X +//X public: +//X OxydataQTI( + #endif diff --git a/noncore/apps/oxygen/datawidgetui.cpp b/noncore/apps/oxygen/datawidgetui.cpp index 2e99c0b..4dab109 100644 --- a/noncore/apps/oxygen/datawidgetui.cpp +++ b/noncore/apps/oxygen/datawidgetui.cpp @@ -1,3 +1,11 @@ /*************************************************************************** + application: : Oxygen + + begin : September 2002 + copyright : ( C ) 2002 by Carsten Niehaus + email : cniehaus@handhelds.org + **************************************************************************/ + +/*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * @@ -9,4 +17,5 @@ #include "datawidgetui.h" +#include "dataTable.h" #include <qpe/config.h> @@ -20,17 +29,10 @@ dataWidgetUI::dataWidgetUI() : QWidget() { this->setCaption( tr( "Chemical Data" )); - QGridLayout *qgrid = new QGridLayout( this, 2,1 ); dataCombo = new QComboBox( this ); - OxydataWidget *oxyDW = new OxydataWidget(this); - oxyDW->setElement( 1 ); - qgrid->addWidget( dataCombo, 0,0); - qgrid->addWidget( oxyDW , 1,0 ); - - connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) ); - Config configobj( "oxygendata" ); //read in all names of the 118 elements + Config configobj( "oxygendata" ); for ( int i = 1 ; i < 119 ; i++ ) { @@ -39,4 +41,11 @@ dataWidgetUI::dataWidgetUI() : QWidget() dataCombo->insertItem( foo ); } + + OxydataWidget *oxyDW = new OxydataWidget(this); + connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) ); + oxyDW->setElement( 1 ); + + qgrid->addWidget( dataCombo, 0,0); + qgrid->addWidget( oxyDW , 1,0 ); } diff --git a/noncore/apps/oxygen/datawidgetui.h b/noncore/apps/oxygen/datawidgetui.h index 5399c81..cd716ad 100644 --- a/noncore/apps/oxygen/datawidgetui.h +++ b/noncore/apps/oxygen/datawidgetui.h @@ -1,2 +1,13 @@ +#ifndef DATAWIDGETUI_H +#define DATAWIDGETUI_H + + +/*************************************************************************** + application: : Oxygen + + begin : September 2002 + copyright : ( C ) 2002 by Carsten Niehaus + email : cniehaus@handhelds.org + **************************************************************************/ /*************************************************************************** @@ -8,7 +19,11 @@ * * **************************************************************************/ -#include "dataTable.h" + + +class OxydataWidget; +class OxydataTable; class QComboBox; +#include <qwidget.h> class dataWidgetUI : public QWidget @@ -24,2 +39,3 @@ class dataWidgetUI : public QWidget OxydataWidget *oxyDW; }; +#endif diff --git a/noncore/apps/oxygen/main.cpp b/noncore/apps/oxygen/main.cpp index 31e44dc..c8fcdb4 100644 --- a/noncore/apps/oxygen/main.cpp +++ b/noncore/apps/oxygen/main.cpp @@ -1,3 +1,11 @@ /*************************************************************************** + application: : Oxygen + + begin : September 2002 + copyright : ( C ) 2002 by Carsten Niehaus + email : cniehaus@handhelds.org + **************************************************************************/ + +/*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * diff --git a/noncore/apps/oxygen/oxyframe.cpp b/noncore/apps/oxygen/oxyframe.cpp index a5f262e..c61c8e5 100644 --- a/noncore/apps/oxygen/oxyframe.cpp +++ b/noncore/apps/oxygen/oxyframe.cpp @@ -1,3 +1,11 @@ /*************************************************************************** + application: : Oxygen + + begin : September 2002 + copyright : ( C ) 2002 by Carsten Niehaus + email : cniehaus@handhelds.org + **************************************************************************/ + +/*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * diff --git a/noncore/apps/oxygen/oxyframe.h b/noncore/apps/oxygen/oxyframe.h index a19f13c..4543504 100644 --- a/noncore/apps/oxygen/oxyframe.h +++ b/noncore/apps/oxygen/oxyframe.h @@ -1,2 +1,9 @@ +/*************************************************************************** + application: : Oxygen + + begin : September 2002 + copyright : ( C ) 2002 by Carsten Niehaus + email : cniehaus@handhelds.org + **************************************************************************/ /*************************************************************************** diff --git a/noncore/apps/oxygen/oxygen.cpp b/noncore/apps/oxygen/oxygen.cpp index 4e293c7..b3392e1 100644 --- a/noncore/apps/oxygen/oxygen.cpp +++ b/noncore/apps/oxygen/oxygen.cpp @@ -1,3 +1,11 @@ /*************************************************************************** + application: : Oxygen + + begin : September 2002 + copyright : ( C ) 2002 by Carsten Niehaus + email : cniehaus@handhelds.org + **************************************************************************/ + +/*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp index 78e54d5..a3bb505 100644 --- a/noncore/apps/oxygen/psewidget.cpp +++ b/noncore/apps/oxygen/psewidget.cpp @@ -1,3 +1,11 @@ /*************************************************************************** + application: : Oxygen + + begin : September 2002 + copyright : ( C ) 2002 by Carsten Niehaus + email : cniehaus@handhelds.org + **************************************************************************/ + +/*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * diff --git a/noncore/apps/oxygen/psewidget.h b/noncore/apps/oxygen/psewidget.h index f69eeb3..fdf838e 100644 --- a/noncore/apps/oxygen/psewidget.h +++ b/noncore/apps/oxygen/psewidget.h @@ -1,2 +1,9 @@ +/*************************************************************************** + application: : Oxygen + + begin : September 2002 + copyright : ( C ) 2002 by Carsten Niehaus + email : cniehaus@handhelds.org + **************************************************************************/ /*************************************************************************** |