Diffstat (limited to 'noncore/apps/oxygen/dataTable.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/dataTable.cpp | 23 |
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, - void 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 return; - if ( selected && - row == currentRow() && - col == currentColumn() ) selected = FALSE; @@ -32,16 +28,13 @@ void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, b QTableItem *itm = item( row, col ); - if ( itm ) { + QColorGroup colgrp = colorGroup(); + if ( itm ) + { + if ( row%2 ) + colgrp.setColor( QColorGroup::Base, QColor( cyan ) ); + else + colgrp.setColor( QColorGroup::Base, QColor( white ) ); p->save(); - itm->paint( p, colorGroup(), cr, selected ); + itm->paint( p, colgrp, cr, selected ); p->restore(); - } else { - if ( currentRow()%2 ) //every even row - p->fillRect( 0, 0, w, h, selected ? colorGroup().brush( QColorGroup::Highlight ) : colorGroup().brush( QColorGroup::Base ) ); - else //every odd row - p->fillRect( 0, 0, w, h, selected ? colorGroup().brush( QColorGroup::Highlight ) : colorGroup().brush( QColorGroup::Base ) ); } } - - - - |