-rw-r--r-- | bin/kdepim/WhatsNew.txt | 2 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 32 | ||||
-rw-r--r-- | korganizer/komonthview.h | 5 |
3 files changed, 35 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index d4b7971..95a1866 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -16,2 +16,4 @@ KO/Pi: Fixed two minor bugs in displaying todos. +If in month view a cell is selected, the key shortcut "d" shows now that date. +Added complete info for a todo in month view as an icon left of the text. diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index f983ff9..4bf9dea 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -279,2 +279,18 @@ void MonthViewItem::paint(QPainter *p) } + + if ( mIncidence->type() == "Todo" ){ + Todo* td = ( Todo* ) mIncidence; + if ( td->isCompleted() ) { + int half = size/2; + p->drawLine ( x, heihei/2, x +half , heihei/2 +half ) ; + p->drawLine ( x +half , heihei/2 +half , x +half+half +2 , heihei/2 -2 ) ; + x += half+half + 4; + + } else { + int val = td->percentComplete()/20; + p->fillRect ( x+1, y-1, val ,size+2,Qt::black ); + p->drawRect ( x, y-1,7,size+2); + x += size + 3; + } + } QFontMetrics fm = p->fontMetrics(); @@ -604,3 +620,3 @@ void MonthViewCell::insertTodo(Todo *todo) } - text += i18n("T: %1").arg(todo->summary()); + text += todo->summary(); @@ -663,3 +679,3 @@ void MonthViewCell::updateCell() { - qDebug("MonthViewCell::updateCell() "); + //qDebug("MonthViewCell::updateCell() "); if ( !mMonthView->isUpdatePossible() ) @@ -1220,2 +1236,3 @@ void KOMonthView::updateView() //ti.start(); + clearSelection(); QPtrVector<MonthViewCell> *cells; @@ -1595,3 +1612,3 @@ void KOMonthView::setSelectedCell( MonthViewCell *cell ) { - // qDebug("KOMonthView::setSelectedCell "); + //qDebug("KOMonthView::setSelectedCell "); if ( mSelectedCell && mSelectedCell != cell ) { @@ -1617,2 +1634,3 @@ void KOMonthView::processSelectionChange() emit incidenceSelected( 0 ); + clearSelection(); } @@ -1665,2 +1683,10 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) break; + case Key_D: + if ( mSelectedCell ) { + mSelectedCell->showDay(); + e->accept(); + } else { + e->ignore(); + } + break; default: diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index f92a69a..fd8cbf2 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -172,2 +172,6 @@ class MonthViewCell : public QWidget + +public slots: + void showDay(); + protected slots: @@ -178,3 +182,2 @@ class MonthViewCell : public QWidget void newEvent(); - void showDay(); |