summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2007-06-05 13:21:33 (UTC)
committer zautrix <zautrix>2007-06-05 13:21:33 (UTC)
commitd5c53970b9e12bfe774d1fecd603080aded24e09 (patch) (side-by-side diff)
treefca3c555b3e37302ebe1ee1840fa3e27502dcc50 /korganizer
parenta388f4f019ccf2b7c138a6814b44b9e8f2a5f570 (diff)
downloadkdepimpi-d5c53970b9e12bfe774d1fecd603080aded24e09.zip
kdepimpi-d5c53970b9e12bfe774d1fecd603080aded24e09.tar.gz
kdepimpi-d5c53970b9e12bfe774d1fecd603080aded24e09.tar.bz2
print fix
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kolistview.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index b378330..192f8c0 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -1406,6 +1406,7 @@ void KOListViewListView::printList()
clearSelection ();
QPainter p;
p.begin ( &printer );
+ p.setFont(font());
QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
@@ -1432,7 +1433,26 @@ void KOListViewListView::printList()
header()->paintSection ( & p, header()->mapToIndex (iii), rect );
}
p.translate( 0, header()->height());
- drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () );
+ //drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () );
+
+ const QColorGroup &cg = colorGroup();
+ KOListViewItem* item = (KOListViewItem* )firstChild();
+ int yOff = 0;
+ while ( item ) {
+ p.translate( 0, yOff );
+ p.save();
+ for ( iii = 0; iii < cou; ++iii ) {
+ int align = columnAlignment( iii );
+ if ( align == AlignAuto ) align = AlignLeft;
+ p.restore();
+ p.save();
+ p.translate( header()->sectionPos( iii ), 0);
+ item->paintCell( &p, cg, iii, header()->sectionSize (iii), align );
+ }
+ yOff = item->height();
+ item = (KOListViewItem* )(item->itemBelow());
+ p.restore();
+ }
p.end();
#endif
}