summaryrefslogtreecommitdiffabout
path: root/libkcal/calendarlocal.cpp
Unidiff
Diffstat (limited to 'libkcal/calendarlocal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendarlocal.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 1a1c6be..0ddfeca 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -452,7 +452,7 @@ Event *CalendarLocal::event( QString syncProf, QString id )
452} 452}
453Todo *CalendarLocal::todo( const QString &uid ) 453Todo *CalendarLocal::todo( const QString &uid )
454{ 454{
455 Todo *todo;; 455 Todo *todo;
456 Todo *retVal = 0; 456 Todo *retVal = 0;
457 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { 457 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
458 if ( todo->calEnabled() && todo->uid() == uid ) { 458 if ( todo->calEnabled() && todo->uid() == uid ) {
@@ -467,6 +467,30 @@ Todo *CalendarLocal::todo( const QString &uid )
467 } 467 }
468 return retVal; 468 return retVal;
469} 469}
470void CalendarLocal::getIncidenceCount( int calId, int& events, int & todos, int & journals)
471{
472 events = 0;
473 todos = 0;
474 journals = 0;
475 {
476 Todo *todo;
477 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
478 if ( todo->calID() == calId )
479 ++todos;
480 }
481 }
482 {
483 Event *todo;
484 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) {
485 if ( todo->calID() == calId )
486 ++events;
487
488 }
489 }
490 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
491 if ( it->calID() == calId ) ++journals;
492
493}
470QString CalendarLocal::nextSummary() const 494QString CalendarLocal::nextSummary() const
471{ 495{
472 return mNextSummary; 496 return mNextSummary;