summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/checkbook.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp
index 7a6b7cc..5fe660c 100644
--- a/noncore/apps/checkbook/checkbook.cpp
+++ b/noncore/apps/checkbook/checkbook.cpp
@@ -583,65 +583,65 @@ void Checkbook::drawCategoryChart( bool withdrawals )
583 { // Found category, add to transaction to category total 583 { // Found category, add to transaction to category total
584 cat->addToValue( tran->amount() ); 584 cat->addToValue( tran->amount() );
585 } 585 }
586 else 586 else
587 { // Didn't find category, add category to list 587 { // Didn't find category, add category to list
588 list->append( new DataPointInfo( tran->category(), tran->amount() ) ); 588 list->append( new DataPointInfo( tran->category(), tran->amount() ) );
589 } 589 }
590 } 590 }
591 } 591 }
592 592
593 graphInfo = new GraphInfo( GraphInfo::PieChart, list ); 593 graphInfo = new GraphInfo( GraphInfo::PieChart, list );
594} 594}
595 595
596CBListItem::CBListItem( QListView *parent, QString label1, QString label2, 596CBListItem::CBListItem( QListView *parent, QString label1, QString label2,
597 QString label3, QString label4, QString label5, QString label6, QString label7, 597 QString label3, QString label4, QString label5, QString label6, QString label7,
598 QString label8 ) 598 QString label8 )
599 : QListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) 599 : QListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 )
600{ 600{
601 m_known = FALSE; 601 m_known = FALSE;
602 owner = parent; 602 owner = parent;
603} 603}
604 604
605void CBListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) 605void CBListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
606{ 606{
607 QColorGroup _cg = cg; 607 QColorGroup _cg = cg;
608 const QPixmap *pm = listView()->viewport()->backgroundPixmap(); 608 const QPixmap *pm = listView()->viewport()->backgroundPixmap();
609 if ( pm && !pm->isNull() ) 609 if ( pm && !pm->isNull() )
610 { 610 {
611 _cg.setBrush( QColorGroup::Base, QBrush( cg.base(), *pm ) ); 611 _cg.setBrush( QColorGroup::Base, QBrush( cg.base(), *pm ) );
612 p->setBrushOrigin( -listView()->contentsX(), -listView()->contentsY() ); 612 p->setBrushOrigin( -listView()->contentsX(), -listView()->contentsY() );
613 } 613 }
614 else if ( isAltBackground() ) 614 else if ( isAltBackground() )
615 _cg.setColor(QColorGroup::Base, QColor( 200, 255, 200 ) ); 615 _cg.setColor(QColorGroup::Base, cg.background() );
616 616
617 QListViewItem::paintCell(p, _cg, column, width, align); 617 QListViewItem::paintCell(p, _cg, column, width, align);
618} 618}
619 619
620bool CBListItem::isAltBackground() 620bool CBListItem::isAltBackground()
621{ 621{
622 QListView *lv = static_cast<QListView *>( listView() ); 622 QListView *lv = static_cast<QListView *>( listView() );
623 if ( lv ) 623 if ( lv )
624 { 624 {
625 CBListItem *above = 0; 625 CBListItem *above = 0;
626 above = (CBListItem *)( itemAbove() ); 626 above = (CBListItem *)( itemAbove() );
627 m_known = above ? above->m_known : true; 627 m_known = above ? above->m_known : true;
628 if ( m_known ) 628 if ( m_known )
629 { 629 {
630 m_odd = above ? !above->m_odd : false; 630 m_odd = above ? !above->m_odd : false;
631 } 631 }
632 else 632 else
633 { 633 {
634 CBListItem *item; 634 CBListItem *item;
635 bool previous = true; 635 bool previous = true;
636 if ( parent() ) 636 if ( parent() )
637 { 637 {
638 item = (CBListItem *)( parent() ); 638 item = (CBListItem *)( parent() );
639 if ( item ) 639 if ( item )
640 previous = item->m_odd; 640 previous = item->m_odd;
641 item = (CBListItem *)( parent()->firstChild() ); 641 item = (CBListItem *)( parent()->firstChild() );
642 } 642 }
643 else 643 else
644 { 644 {
645 item = (CBListItem *)( lv->firstChild() ); 645 item = (CBListItem *)( lv->firstChild() );
646 } 646 }
647 647