libkcal Library API Documentation

resourcecalendar.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 Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public 00010 License as published by the Free Software Foundation; either 00011 version 2 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public License 00019 along with this library; see the file COPYING.LIB. If not, write to 00020 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00021 Boston, MA 02111-1307, USA. 00022 */ 00023 00024 #ifndef KCAL_RESOURCECALENDAR_H 00025 #define KCAL_RESOURCECALENDAR_H 00026 00027 #include <qstring.h> 00028 #include <qdatetime.h> 00029 #include <qptrlist.h> 00030 00031 #include <kconfig.h> 00032 00033 #include "alarm.h" 00034 #include "todo.h" 00035 #include "event.h" 00036 #include "journal.h" 00037 00038 #include <kresources/resource.h> 00039 #include <kresources/manager.h> 00040 #include <kabc/lock.h> 00041 00042 namespace KCal { 00043 00044 class CalFormat; 00045 00053 class ResourceCalendar : public KRES::Resource 00054 { 00055 Q_OBJECT 00056 public: 00057 ResourceCalendar( const KConfig * ); 00058 virtual ~ResourceCalendar(); 00059 00060 virtual void writeConfig( KConfig* config ); 00061 00078 virtual bool load() = 0; 00079 00091 virtual bool save() = 0; 00092 00097 virtual bool isSaving() { return false; } 00098 00102 virtual KABC::Lock *lock() = 0; 00103 00107 virtual bool addIncidence( Incidence * ); 00108 00112 virtual bool addEvent( Event *event ) = 0; 00113 00117 virtual void deleteEvent( Event * ) = 0; 00118 00122 virtual Event *event( const QString &uid ) = 0; 00123 00128 virtual Event::List rawEvents() = 0; 00129 00134 virtual Event::List rawEventsForDate( const QDate &date, 00135 bool sorted = false ) = 0; 00136 00140 virtual Event::List rawEventsForDate( const QDateTime &qdt ) = 0; 00141 00146 virtual Event::List rawEvents( const QDate &start, const QDate &end, 00147 bool inclusive = false ) = 0; 00148 00149 signals: 00153 void resourceChanged( ResourceCalendar * ); 00158 void resourceLoaded( ResourceCalendar * ); 00163 void resourceSaved( ResourceCalendar * ); 00164 00165 public: 00169 virtual bool addTodo( Todo *todo ) = 0; 00173 virtual void deleteTodo( Todo * ) = 0; 00179 virtual Todo *todo( const QString &uid ) = 0; 00183 virtual Todo::List rawTodos() = 0; 00187 virtual Todo::List todos( const QDate &date ) = 0; 00188 00189 00193 virtual bool addJournal( Journal * ) = 0; 00194 00198 virtual void deleteJournal( Journal * ) = 0; 00199 00203 virtual Journal *journal( const QDate & ) = 0; 00204 00208 virtual Journal *journal( const QString &uid ) = 0; 00209 00213 virtual Journal::List journals() = 0; 00214 00215 00219 virtual Alarm::List alarms( const QDateTime &from, 00220 const QDateTime &to ) = 0; 00221 00225 virtual Alarm::List alarmsTo( const QDateTime &to ) = 0; 00226 00227 00233 virtual void update( IncidenceBase *incidence ) = 0; 00234 00236 Incidence::List rawIncidences(); 00237 00241 virtual void setTimeZoneId( const QString &tzid ) = 0; 00242 00243 private: 00244 class Private; 00245 Private *d; 00246 }; 00247 00248 typedef KRES::Manager<ResourceCalendar> CalendarResourceManager; 00249 00250 } 00251 00252 #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