libkcal Library API Documentation

resourcekabc.h

00001 /* 00002 This file is part of libkcal. 00003 00004 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 #ifndef KCAL_RESOURCEKABC_H 00022 #define KCAL_RESOURCEKABC_H 00023 00024 #include <qptrlist.h> 00025 #include <qstring.h> 00026 #include <qdatetime.h> 00027 00028 #include <kconfig.h> 00029 00030 #include "incidence.h" 00031 #include "calendarlocal.h" 00032 #include <kabc/addressbook.h> 00033 00034 #include "resourcecalendar.h" 00035 00036 namespace KIO { 00037 class FileCopyJob; 00038 class Job; 00039 } 00040 00041 namespace KCal { 00042 00046 class ResourceKABC : public ResourceCalendar 00047 { 00048 Q_OBJECT 00049 00050 friend class ResourceKABCConfig; 00051 00052 public: 00053 ResourceKABC( const KConfig * ); 00054 ResourceKABC( ); 00055 virtual ~ResourceKABC(); 00056 00057 void readConfig( const KConfig *config ); 00058 void writeConfig( KConfig* config ); 00059 00060 void setAlarm( bool ); 00061 bool alarm(); 00062 00063 void setAlarmDays( int ); 00064 int alarmDays(); 00065 00066 bool load(); 00067 00068 bool save(); 00069 00070 bool isSaving(); 00071 00072 KABC::Lock *lock(); 00073 00075 bool addEvent(Event *anEvent); 00077 void deleteEvent(Event *); 00078 00082 Event *event(const QString &UniqueStr); 00086 // Event::List events(); 00090 Event::List rawEvents(); 00095 Event::List rawEventsForDate( const QDate &date, bool sorted = false ); 00099 Event::List rawEventsForDate( const QDateTime &qdt ); 00104 Event::List rawEvents( const QDate &start, const QDate &end, 00105 bool inclusive = false ); 00106 00107 00108 /* 00109 Returns a QString with the text of the holiday (if any) that falls 00110 on the specified date. 00111 */ 00112 // QString getHolidayForDate(const QDate &qd); 00113 00117 bool addTodo( Todo *todo ); 00121 void deleteTodo( Todo * ); 00126 Todo *todo( const QString &uid ); 00130 Todo::List rawTodos(); 00134 Todo::List todos( const QDate &date ); 00136 virtual bool addJournal(Journal *); 00138 void deleteJournal( Journal * ); 00140 virtual Journal *journal(const QDate &); 00142 virtual Journal *journal(const QString &UID); 00144 Journal::List journals(); 00145 00147 Alarm::List alarms( const QDateTime &from, const QDateTime &to ); 00148 00150 Alarm::List alarmsTo( const QDateTime &to ); 00151 00152 // Public because needed in MultiCalendar::load() 00153 bool doOpen(); 00154 00155 void dump() const; 00156 00157 void setTimeZoneId( const QString& tzid ); 00158 00159 protected: 00160 00162 void doClose(); 00163 00167 virtual void update(IncidenceBase *incidence); 00168 00169 private slots: 00170 void reload(); 00171 00172 private: 00173 void init(); 00174 00175 CalendarLocal mCalendar; 00176 00177 bool mOpen; 00178 00179 int mAlarmDays; 00180 bool mAlarm; 00181 KABC::AddressBook *mAddressbook; 00182 00183 KABC::Lock *mLock; 00184 00185 class Private; 00186 Private *d; 00187 }; 00188 00189 } 00190 00191 #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