summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen/dataTable.cpp
Unidiff
Diffstat (limited to 'noncore/apps/oxygen/dataTable.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/oxygen/dataTable.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp
index f03e973..6c6b9dc 100644
--- a/noncore/apps/oxygen/dataTable.cpp
+++ b/noncore/apps/oxygen/dataTable.cpp
@@ -18,3 +18,2 @@ OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent,
18 18
19
20void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected) 19void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected)
@@ -23,5 +22,2 @@ void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, b
23 return; 22 return;
24 if ( selected &&
25 row == currentRow() &&
26 col == currentColumn() )
27 selected = FALSE; 23 selected = FALSE;
@@ -32,16 +28,13 @@ void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, b
32 QTableItem *itm = item( row, col ); 28 QTableItem *itm = item( row, col );
33 if ( itm ) { 29 QColorGroup colgrp = colorGroup();
30 if ( itm )
31 {
32 if ( row%2 )
33 colgrp.setColor( QColorGroup::Base, QColor( cyan ) );
34 else
35 colgrp.setColor( QColorGroup::Base, QColor( white ) );
34 p->save(); 36 p->save();
35 itm->paint( p, colorGroup(), cr, selected ); 37 itm->paint( p, colgrp, cr, selected );
36 p->restore(); 38 p->restore();
37 } else {
38 if ( currentRow()%2 ) //every even row
39 p->fillRect( 0, 0, w, h, selected ? colorGroup().brush( QColorGroup::Highlight ) : colorGroup().brush( QColorGroup::Base ) );
40 else //every odd row
41 p->fillRect( 0, 0, w, h, selected ? colorGroup().brush( QColorGroup::Highlight ) : colorGroup().brush( QColorGroup::Base ) );
42 } 39 }
43} 40}
44
45
46
47