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 todos( const QDate &date ); 00130 Todo::List todos() { return Calendar::todos(); } 00131 00135 bool addJournal( Journal * ); 00139 void deleteJournal( Journal * ); 00143 void deleteAllJournals(); 00147 Journal *journal( const QDate & ); 00151 Journal *journal( const QString &uid ); 00155 Journal::List journals(); 00156 00160 Alarm::List alarms( const QDateTime &from, const QDateTime &to ); 00161 00165 Alarm::List alarmsTo( const QDateTime &to ); 00166 00172 void update( IncidenceBase *incidence ); 00173 00178 Event::List rawEventsForDate( const QDate &date, bool sorted = false ); 00182 Event::List rawEventsForDate( const QDateTime &qdt ); 00192 Event::List rawEvents( const QDate &start, const QDate &end, 00193 bool inclusive = false ); 00194 00195 protected: 00196 00198 void incidenceUpdated( IncidenceBase *i ) { update( i ); } 00199 00201 void insertEvent( Event *event ); 00202 00204 void appendAlarms( Alarm::List &alarms, Incidence *incidence, 00205 const QDateTime &from, const QDateTime &to ); 00206 00208 void appendRecurringAlarms( Alarm::List &alarms, Incidence *incidence, 00209 const QDateTime &from, const QDateTime &to ); 00210 00211 private: 00212 void init(); 00213 00214 typedef QDict<Event> EventDict; 00215 typedef QDictIterator<Event> EventDictIterator; 00216 EventDict mEvents; 00217 Todo::List mTodoList; 00218 Journal::List mJournalList; 00219 00220 class Private; 00221 Private *d; 00222 }; 00223 00224 } 00225 00226 #endif
KDE Logo
This file is part of the documentation for libkcal Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:57:44 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003