libkcal Library API Documentation

calendarlocal.h

00001 /* 00002 This file is part of libkcal. 00003 00004 Copyright (c) 1998 Preston Brown 00005 Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00020 Boston, MA 02111-1307, USA. 00021 */ 00022 #ifndef KCAL_CALENDARLOCAL_H 00023 #define KCAL_CALENDARLOCAL_H 00024 00025 #include "calendar.h" 00026 #include <qdict.h> 00027 00028 namespace KCal { 00029 00030 class CalFormat; 00031 00035 class CalendarLocal : public Calendar 00036 { 00037 public: 00041 CalendarLocal(); 00045 CalendarLocal( const QString &timeZoneId ); 00046 ~CalendarLocal(); 00047 00060 bool load( const QString &fileName ); 00061 00069 bool save( const QString &fileName, CalFormat *format = 0 ); 00070 00074 void close(); 00075 00076 void save() {} 00077 00081 bool addEvent( Event *event ); 00085 void deleteEvent( Event *event ); 00089 void deleteAllEvents(); 00090 00094 Event *event( const QString &uid ); 00098 Event::List rawEvents(); 00099 00103 bool addTodo( Todo *todo ); 00107 void deleteTodo( Todo * ); 00111 void deleteAllTodos(); 00116 Todo *todo( const QString &uid ); 00120 Todo::List rawTodos(); 00124 Todo::List rawTodosForDate( const QDate &date ); 00125 00129 bool addJournal( Journal * ); 00133 void deleteJournal( Journal * ); 00137 void deleteAllJournals(); 00141 Journal *journal( const QDate & ); 00145 Journal *journal( const QString &uid ); 00149 Journal::List journals(); 00150 00154 Alarm::List alarms( const QDateTime &from, const QDateTime &to ); 00155 00159 Alarm::List alarmsTo( const QDateTime &to ); 00160 00165 Event::List rawEventsForDate( const QDate &date, bool sorted = false ); 00169 Event::List rawEventsForDate( const QDateTime &qdt ); 00179 Event::List rawEvents( const QDate &start, const QDate &end, 00180 bool inclusive = false ); 00181 00182 protected: 00183 00185 void incidenceUpdated( IncidenceBase *i ); 00186 00188 void insertEvent( Event *event ); 00189 00191 void appendAlarms( Alarm::List &alarms, Incidence *incidence, 00192 const QDateTime &from, const QDateTime &to ); 00193 00195 void appendRecurringAlarms( Alarm::List &alarms, Incidence *incidence, 00196 const QDateTime &from, const QDateTime &to ); 00197 00198 private: 00199 void init(); 00200 00201 typedef QDict<Event> EventDict; 00202 typedef QDictIterator<Event> EventDictIterator; 00203 EventDict mEvents; 00204 Todo::List mTodoList; 00205 Journal::List mJournalList; 00206 00207 Incidence::List mDeletedIncidences; 00208 00209 class Private; 00210 Private *d; 00211 }; 00212 00213 } 00214 00215 #endif
KDE Logo
This file is part of the documentation for libkcal Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 1 15:18:42 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003