author | cniehaus <cniehaus> | 2002-09-20 19:24:32 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-09-20 19:24:32 (UTC) |
commit | 681e6e75efaa5577d376d0bb191afdf323cb4e75 (patch) (unidiff) | |
tree | d35ee106655e5b288e73491a2701ddc0141f4fde /noncore/apps/oxygen/dataTable.cpp | |
parent | c958d7cb5069e06b5cf9e9df6e78bcb644ce26a2 (diff) | |
download | opie-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.cpp | 24 |
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 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | application: : Oxygen | ||
3 | |||
4 | begin : September 2002 | ||
5 | copyright : ( C ) 2002 by Carsten Niehaus | ||
6 | email : cniehaus@handhelds.org | ||
7 | **************************************************************************/ | ||
8 | |||
9 | /*************************************************************************** | ||
2 | * * | 10 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 11 | * This program is free software; you can redistribute it and/or modify * |
4 | * it under the terms of the GNU General Public License as published by * | 12 | * it under the terms of the GNU General Public License as published by * |
@@ -19,18 +27,23 @@ | |||
19 | OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent) | 27 | OxydataWidget::OxydataWidget(QWidget *parent) : QWidget(parent) |
20 | { | 28 | { |
21 | QGridLayout *qgrid = new QGridLayout( this, 2,1 ); | 29 | QGridLayout *qgrid = new QGridLayout( this, 2,1 ); |
30 | |||
22 | QHBox *hbox = new QHBox( this ); | 31 | QHBox *hbox = new QHBox( this ); |
23 | left = new QLabel( hbox ); | 32 | left = new QLabel( hbox ); |
24 | middle = new QLabel( hbox ); | 33 | middle = new QLabel( hbox ); |
25 | right = new QLabel( hbox ); | 34 | right = new QLabel( hbox ); |
26 | 35 | ||
27 | DataTable = new OxydataTable( 9,2, this ); | 36 | right->setAlignment( AlignRight ); |
28 | 37 | middle->setAlignment( AlignHCenter ); | |
38 | |||
29 | QFont bf; | 39 | QFont bf; |
30 | bf.setBold( true ); | 40 | bf.setBold( true ); |
31 | bf.setPointSize( bf.pointSize()+2 ); | 41 | bf.setPointSize( bf.pointSize()+2 ); |
32 | middle->setFont( bf ); | 42 | middle->setFont( bf ); |
33 | 43 | ||
44 | DataTable = new OxydataTable( 9,2, this ); | ||
45 | DataTable->setColumnWidth ( 1 , 118 ); | ||
46 | DataTable->setColumnWidth ( 0 , 118 ); | ||
34 | setTable(); | 47 | setTable(); |
35 | 48 | ||
36 | qgrid->addWidget( hbox,0,0 ); | 49 | qgrid->addWidget( hbox,0,0 ); |
@@ -81,6 +94,13 @@ OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent, | |||
81 | this->setLeftMargin( 0 ); | 94 | this->setLeftMargin( 0 ); |
82 | } | 95 | } |
83 | 96 | ||
97 | int OxydataTable::alignment() const | ||
98 | { | ||
99 | return AlignLeft | AlignVCenter; | ||
100 | }; | ||
101 | |||
102 | |||
103 | |||
84 | void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected) | 104 | void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected) |
85 | { | 105 | { |
86 | if ( cr.width() == 0 || cr.height() == 0 ) | 106 | if ( cr.width() == 0 || cr.height() == 0 ) |