summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen/dataTable.cpp
authorcniehaus <cniehaus>2002-09-20 19:24:32 (UTC)
committer cniehaus <cniehaus>2002-09-20 19:24:32 (UTC)
commit681e6e75efaa5577d376d0bb191afdf323cb4e75 (patch) (side-by-side diff)
treed35ee106655e5b288e73491a2701ddc0141f4fde /noncore/apps/oxygen/dataTable.cpp
parentc958d7cb5069e06b5cf9e9df6e78bcb644ce26a2 (diff)
downloadopie-681e6e75efaa5577d376d0bb191afdf323cb4e75.zip
opie-681e6e75efaa5577d376d0bb191afdf323cb4e75.tar.gz
opie-681e6e75efaa5577d376d0bb191afdf323cb4e75.tar.bz2
before starting to hack QTableItem I wanted to have a safe point in cvs
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,4 +1,12 @@
/***************************************************************************
+ 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 *
@@ -19,18 +27,23 @@
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 );
@@ -81,6 +94,13 @@ OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent,
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 )