summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-03-08 09:24:53 (UTC)
committer zautrix <zautrix>2005-03-08 09:24:53 (UTC)
commit91e7aeec0b15d28eb263c0699fdce4a00a3669c6 (patch) (side-by-side diff)
tree10bf2d72c94ab030c7a08b22d0880997c99dcfff /korganizer
parenta50b432c475d2a0b97b3f8707666f7d2990cd8db (diff)
downloadkdepimpi-91e7aeec0b15d28eb263c0699fdce4a00a3669c6.zip
kdepimpi-91e7aeec0b15d28eb263c0699fdce4a00a3669c6.tar.gz
kdepimpi-91e7aeec0b15d28eb263c0699fdce4a00a3669c6.tar.bz2
todo printing fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calprintbase.cpp26
-rw-r--r--korganizer/calprinter.cpp2
2 files changed, 18 insertions, 10 deletions
diff --git a/korganizer/calprintbase.cpp b/korganizer/calprintbase.cpp
index 6bb407d..f66fddc 100644
--- a/korganizer/calprintbase.cpp
+++ b/korganizer/calprintbase.cpp
@@ -918,4 +918,5 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
int left = possummary+(level*10);
rect = p.boundingRect(left, y, (posdue-left-5),-1, WordBreak, outStr);
+ //qDebug("bottom1 %d ", rect.bottom() );
if ( !item->description().isEmpty() && desc ) {
outStr = item->description();
@@ -923,4 +924,5 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
WordBreak, outStr );
}
+ //qDebug("bottom2 %d y+h %d y %d ph %d", rect.bottom(), y+height, y , pageHeight );
// if too big make new page
if ( rect.bottom() > y+height) {
@@ -965,8 +967,13 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
// cross out the rectangle for completed items
if ( item->isCompleted() ) {
- p.drawLine( rect.topLeft(), rect.bottomRight() );
- p.drawLine( rect.topRight(), rect.bottomLeft() );
+ p.drawLine( rect.topLeft(), rect.bottomRight() );
+ p.drawLine( rect.topRight(), rect.bottomLeft() );
+ } else if (item->cancelled() ) {
+ QPen pen = p.pen();
+ p.setPen ( QPen ( black, 2) );
+ p.drawLine( rect.left()+2,rect.top()+rect.height()/2, rect.right()-2, +rect.top()+rect.height()/2 );
+ p.setPen( pen );
}
- }
+ }
startpt.mRect = rect; //save for later
@@ -987,7 +994,8 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
// if completed, use strike out font
- QFont ft=p.font();
- ft.setStrikeOut( item->isCompleted() );
- p.setFont( ft );
+ // LR does not work - font is underlined, not striked out
+ //QFont ft=p.font();
+ //ft.setStrikeOut( item->isCompleted() );
+ //p.setFont( ft );
// summary
outStr=item->summary();
@@ -995,5 +1003,5 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
outStr += " ("+item->location()+")";
if ( item->hasDueDate() && posDueDt>=0 ) {
- outStr += " [" +local->formatDate(item->dtDue().date(),true)+"]";
+ outStr += " [" +item->dtDueStr(true)+"]";
}
rect = p.boundingRect( left, rect.top(), (posdue-(left + rect.width() + 5)),
@@ -1001,6 +1009,6 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
QRect newrect;
p.drawText( rect, WordBreak, outStr, -1, &newrect );
- ft.setStrikeOut(false);
- p.setFont(ft);
+ //ft.setStrikeOut(false);
+ // p.setFont(ft);
// due
diff --git a/korganizer/calprinter.cpp b/korganizer/calprinter.cpp
index 6b5b0fe..0cdf28e 100644
--- a/korganizer/calprinter.cpp
+++ b/korganizer/calprinter.cpp
@@ -132,5 +132,5 @@ void CalPrinter::preview( PrintType type, const QDate &fd, const QDate &td )
void CalPrinter::print( PrintType type, const QDate &fd, const QDate &td )
{
- mPrintDialog->resize( 640, 380 );
+ mPrintDialog->resize( 640, 440 );
mPrintDialog->setPreview( false );
mPrintDialog->setPrintType( int( type ) );