summaryrefslogtreecommitdiffabout
path: root/korganizer/kodaymatrix.cpp
authorzautrix <zautrix>2005-04-19 19:32:54 (UTC)
committer zautrix <zautrix>2005-04-19 19:32:54 (UTC)
commitcdcb0e0d0163695c56cf7cf9bd3f046ac63173ee (patch) (unidiff)
tree70cb7e2db9d7075a7c7e7c38adbad0c50e5d8dc4 /korganizer/kodaymatrix.cpp
parentb36bdf88fbf3cc78e4bf072b5eb3ec16bd8ec235 (diff)
downloadkdepimpi-cdcb0e0d0163695c56cf7cf9bd3f046ac63173ee.zip
kdepimpi-cdcb0e0d0163695c56cf7cf9bd3f046ac63173ee.tar.gz
kdepimpi-cdcb0e0d0163695c56cf7cf9bd3f046ac63173ee.tar.bz2
fixes
Diffstat (limited to 'korganizer/kodaymatrix.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kodaymatrix.cpp53
1 files changed, 45 insertions, 8 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 17a1d13..df606d0 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -368,3 +368,5 @@ void KODayMatrix::computeEvent(Event *event, int i )
368 mHolidays[i] =holiStr ; 368 mHolidays[i] =holiStr ;
369 eDays.setBit(i);
369 } 370 }
371 if ( KOPrefs::instance()->mCurrentDisplayedView != VIEW_T_VIEW && KOPrefs::instance()->mCurrentDisplayedView != VIEW_J_VIEW ) {
370 if ( event->isBirthday()) { 372 if ( event->isBirthday()) {
@@ -379,2 +381,4 @@ void KODayMatrix::computeEvent(Event *event, int i )
379 } 381 }
382 }
383 if ( KOPrefs::instance()->mCurrentDisplayedView != VIEW_J_VIEW )
380 eDays.setBit(i); 384 eDays.setBit(i);
@@ -390,2 +394,3 @@ void KODayMatrix::updateViewTimed()
390 394
395
391 int i; 396 int i;
@@ -471,6 +476,6 @@ void KODayMatrix::updateViewTimed()
471 } 476 }
472 477 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
473#if 0 478 bDays.fill( false);
474 // insert due todos 479 // insert due todos
475 QPtrList<Todo> todos = calendar()->todos( ); 480 QPtrList<Todo> todos = mCalendar->todos( );
476 Todo *todo; 481 Todo *todo;
@@ -481,3 +486,13 @@ void KODayMatrix::updateViewTimed()
481 if ( day >= 0 && day < timeSpan + 1) { 486 if ( day >= 0 && day < timeSpan + 1) {
482 (*cells)[day]->insertTodo( todo ); 487 int i = day;
488 QString holiStr = mHolidays[i];
489 pDays.setBit(i);
490 if ( !holiStr.isEmpty() )
491 holiStr += "\n";
492 holiStr += i18n("Todo") + ": "+todo->summary();
493 if ( !todo->location().isEmpty() )
494 holiStr += " (" + todo->location() + ")";
495 bDays.setBit(i);
496 mHolidays[i] =holiStr ;
497 eDays.setBit(i);
483 } 498 }
@@ -485,4 +500,24 @@ void KODayMatrix::updateViewTimed()
485 } 500 }
486#endif 501 }
502 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
503 bDays.fill( false);
504 // insert due todos
505 QPtrList<Journal> todos = mCalendar->journals( );
506 Journal *todo;
507 for(todo = todos.first(); todo; todo = todos.next()) {
508 int day = mStartDate.daysTo( todo->dtStart().date() );
509 if ( day >= 0 && day < timeSpan + 1) {
510 int i = day;
511 QString holiStr = mHolidays[i];
512 pDays.setBit(i);
513 if ( !holiStr.isEmpty() )
514 holiStr += "\n";
515 holiStr += i18n("Journal");
516 bDays.setBit(i);
517 mHolidays[i] =holiStr ;
518 eDays.setBit(i);
487 519
520 }
521 }
522 }
488#else 523#else
@@ -538,3 +573,5 @@ void KODayMatrix::updateView(QDate actdate)
538{ 573{
539 574 if ( mLastView != KOPrefs::instance()->mCurrentDisplayedView )
575 mRedrawNeeded = true;
576 mLastView = KOPrefs::instance()->mCurrentDisplayedView;
540 if ( ! actdate.isValid() ) { 577 if ( ! actdate.isValid() ) {
@@ -1054,5 +1091,5 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
1054 if ( hDays.testBit(i) ) 1091 if ( hDays.testBit(i) )
1055 p.setPen(QColor(Qt::green)); 1092 p.setPen(QColor(0,200,0));
1056 else 1093 else
1057 p.setPen(QColor(Qt::green).dark()); 1094 p.setPen(QColor(Qt::blue));
1058 } else { 1095 } else {