-rw-r--r-- | korganizer/calprintbase.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/korganizer/calprintbase.cpp b/korganizer/calprintbase.cpp index 6bb407d..f66fddc 100644 --- a/korganizer/calprintbase.cpp +++ b/korganizer/calprintbase.cpp @@ -919,2 +919,3 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & rect = p.boundingRect(left, y, (posdue-left-5),-1, WordBreak, outStr); + //qDebug("bottom1 %d ", rect.bottom() ); if ( !item->description().isEmpty() && desc ) { @@ -924,2 +925,3 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & } + //qDebug("bottom2 %d y+h %d y %d ph %d", rect.bottom(), y+height, y , pageHeight ); // if too big make new page @@ -966,6 +968,11 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & 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 @@ -988,5 +995,6 @@ 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 @@ -996,3 +1004,3 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & if ( item->hasDueDate() && posDueDt>=0 ) { - outStr += " [" +local->formatDate(item->dtDue().date(),true)+"]"; + outStr += " [" +item->dtDueStr(true)+"]"; } @@ -1002,4 +1010,4 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & p.drawText( rect, WordBreak, outStr, -1, &newrect ); - ft.setStrikeOut(false); - p.setFont(ft); + //ft.setStrikeOut(false); + // p.setFont(ft); |