From 681e6e75efaa5577d376d0bb191afdf323cb4e75 Mon Sep 17 00:00:00 2001 From: cniehaus Date: Fri, 20 Sep 2002 19:24:32 +0000 Subject: before starting to hack QTableItem I wanted to have a safe point in cvs --- (limited to 'noncore/apps/oxygen/dataTable.cpp') 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 ) -- cgit v0.9.0.2