author | zautrix <zautrix> | 2005-03-10 10:40:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-10 10:40:57 (UTC) |
commit | b96161e4dd7fc19eea87257c2455b85420dad35a (patch) (unidiff) | |
tree | d2e518cdc4c6c314f6e42960d12653ad6c7083d3 /korganizer | |
parent | 4b05d69b961309df5d56714889c62ca530580914 (diff) | |
download | kdepimpi-b96161e4dd7fc19eea87257c2455b85420dad35a.zip kdepimpi-b96161e4dd7fc19eea87257c2455b85420dad35a.tar.gz kdepimpi-b96161e4dd7fc19eea87257c2455b85420dad35a.tar.bz2 |
todo month view fix
-rw-r--r-- | korganizer/komonthview.cpp | 32 | ||||
-rw-r--r-- | korganizer/komonthview.h | 5 |
2 files changed, 33 insertions, 4 deletions
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) | |||
279 | } | 279 | } |
280 | |||
281 | if ( mIncidence->type() == "Todo" ){ | ||
282 | Todo* td = ( Todo* ) mIncidence; | ||
283 | if ( td->isCompleted() ) { | ||
284 | int half = size/2; | ||
285 | p->drawLine ( x, heihei/2, x +half , heihei/2 +half ) ; | ||
286 | p->drawLine ( x +half , heihei/2 +half , x +half+half +2 , heihei/2 -2 ) ; | ||
287 | x += half+half + 4; | ||
288 | |||
289 | } else { | ||
290 | int val = td->percentComplete()/20; | ||
291 | p->fillRect ( x+1, y-1, val ,size+2,Qt::black ); | ||
292 | p->drawRect ( x, y-1,7,size+2); | ||
293 | x += size + 3; | ||
294 | } | ||
295 | } | ||
280 | QFontMetrics fm = p->fontMetrics(); | 296 | QFontMetrics fm = p->fontMetrics(); |
@@ -604,3 +620,3 @@ void MonthViewCell::insertTodo(Todo *todo) | |||
604 | } | 620 | } |
605 | text += i18n("T: %1").arg(todo->summary()); | 621 | text += todo->summary(); |
606 | 622 | ||
@@ -663,3 +679,3 @@ void MonthViewCell::updateCell() | |||
663 | { | 679 | { |
664 | qDebug("MonthViewCell::updateCell() "); | 680 | //qDebug("MonthViewCell::updateCell() "); |
665 | if ( !mMonthView->isUpdatePossible() ) | 681 | if ( !mMonthView->isUpdatePossible() ) |
@@ -1220,2 +1236,3 @@ void KOMonthView::updateView() | |||
1220 | //ti.start(); | 1236 | //ti.start(); |
1237 | clearSelection(); | ||
1221 | QPtrVector<MonthViewCell> *cells; | 1238 | QPtrVector<MonthViewCell> *cells; |
@@ -1595,3 +1612,3 @@ void KOMonthView::setSelectedCell( MonthViewCell *cell ) | |||
1595 | { | 1612 | { |
1596 | // qDebug("KOMonthView::setSelectedCell "); | 1613 | //qDebug("KOMonthView::setSelectedCell "); |
1597 | if ( mSelectedCell && mSelectedCell != cell ) { | 1614 | if ( mSelectedCell && mSelectedCell != cell ) { |
@@ -1617,2 +1634,3 @@ void KOMonthView::processSelectionChange() | |||
1617 | emit incidenceSelected( 0 ); | 1634 | emit incidenceSelected( 0 ); |
1635 | clearSelection(); | ||
1618 | } | 1636 | } |
@@ -1665,2 +1683,10 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) | |||
1665 | break; | 1683 | break; |
1684 | case Key_D: | ||
1685 | if ( mSelectedCell ) { | ||
1686 | mSelectedCell->showDay(); | ||
1687 | e->accept(); | ||
1688 | } else { | ||
1689 | e->ignore(); | ||
1690 | } | ||
1691 | break; | ||
1666 | default: | 1692 | 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 | |||
172 | 172 | ||
173 | |||
174 | public slots: | ||
175 | void showDay(); | ||
176 | |||
173 | protected slots: | 177 | protected slots: |
@@ -178,3 +182,2 @@ class MonthViewCell : public QWidget | |||
178 | void newEvent(); | 182 | void newEvent(); |
179 | void showDay(); | ||
180 | 183 | ||