summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen/dataTable.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/oxygen/dataTable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/dataTable.cpp24
1 files changed, 22 insertions, 2 deletions
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,7 +1,15 @@
/***************************************************************************
+ 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 *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* ( at your option ) any later version. *
* *
@@ -16,24 +24,29 @@
#include <qfont.h>
#include <qlayout.h>
OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent)
{
QGridLayout *qgrid = new QGridLayout( this, 2,1 );
+
QHBox *hbox = new QHBox( this );
left = new QLabel( hbox );
middle = new QLabel( hbox );
right = new QLabel( hbox );
- DataTable = new OxydataTable( 9,2, this );
-
+ right->setAlignment( AlignRight );
+ middle->setAlignment( AlignHCenter );
+
QFont bf;
bf.setBold( true );
bf.setPointSize( bf.pointSize()+2 );
middle->setFont( bf );
+ DataTable = new OxydataTable( 9,2, this );
+ DataTable->setColumnWidth ( 1 , 118 );
+ DataTable->setColumnWidth ( 0 , 118 );
setTable();
qgrid->addWidget( hbox,0,0 );
qgrid->addWidget( DataTable,1,0 );
}
@@ -78,12 +91,19 @@ OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent,
this->horizontalHeader()->hide();
this->verticalHeader()->hide();
this->setTopMargin( 0 );
this->setLeftMargin( 0 );
}
+int OxydataTable::alignment() const
+{
+ return AlignLeft | AlignVCenter;
+};
+
+
+
void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected)
{
if ( cr.width() == 0 || cr.height() == 0 )
return;
selected = FALSE;