summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2005-10-22 16:49:42 (UTC)
committer zautrix <zautrix>2005-10-22 16:49:42 (UTC)
commit3ec18dd19fdf4eb7e763b8022f90de83249facfd (patch) (unidiff)
treeabc6c8568c33b70afd8abc46ae9495e5d862cba1 /libkcal
parentc643664ae97e757afda1012dc998b49e6cc2d575 (diff)
downloadkdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.zip
kdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.tar.gz
kdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.tar.bz2
fixxx
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendar.h2
-rw-r--r--libkcal/calendarlocal.cpp26
-rw-r--r--libkcal/calendarlocal.h1
3 files changed, 28 insertions, 1 deletions
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index 3f6895d..4b8b3ff 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -321,2 +321,4 @@ public:
321 virtual void setCalendarRemove( int id ) = 0; 321 virtual void setCalendarRemove( int id ) = 0;
322 virtual void getIncidenceCount( int calId, int& events, int & todos, int & journals) = 0;
323
322 signals: 324 signals:
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 1a1c6be..0ddfeca 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -454,3 +454,3 @@ Todo *CalendarLocal::todo( const QString &uid )
454{ 454{
455 Todo *todo;; 455 Todo *todo;
456 Todo *retVal = 0; 456 Todo *retVal = 0;
@@ -469,2 +469,26 @@ Todo *CalendarLocal::todo( const QString &uid )
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
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index a7a85c8..ca0bd98 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -187,2 +187,3 @@ class CalendarLocal : public Calendar
187 Event *event( QString, QString ); 187 Event *event( QString, QString );
188 void getIncidenceCount( int calId, int& events, int & todos, int & journals);
188 189