resourcekabc.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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 isSaving();
00067
00068 KABC::Lock *lock();
00069
00071 bool addEvent(Event *anEvent);
00073 void deleteEvent(Event *);
00074
00078 Event *event(const QString &UniqueStr);
00082
00086 Event::List rawEvents();
00091 Event::List rawEventsForDate( const QDate &date, bool sorted = false );
00095 Event::List rawEventsForDate( const QDateTime &qdt );
00100 Event::List rawEvents( const QDate &start, const QDate &end,
00101 bool inclusive = false );
00102
00103
00104
00105
00106
00107
00108
00109
00113 bool addTodo( Todo *todo );
00117 void deleteTodo( Todo * );
00122 Todo *todo( const QString &uid );
00126 Todo::List rawTodos();
00130 Todo::List rawTodosForDate( const QDate &date );
00132 virtual bool addJournal(Journal *);
00134 void deleteJournal( Journal * );
00136 virtual Journal *journal(const QDate &);
00138 virtual Journal *journal(const QString &UID);
00140 Journal::List journals();
00141
00143 Alarm::List alarms( const QDateTime &from, const QDateTime &to );
00144
00146 Alarm::List alarmsTo( const QDateTime &to );
00147
00148 void dump() const;
00149
00150 void setTimeZoneId( const QString& tzid );
00151
00152 protected:
00153 bool doOpen();
00154 void doClose();
00155 bool doLoad();
00156 bool doSave();
00157
00158 private slots:
00159 void reload();
00160
00161 private:
00162 void init();
00163
00164 CalendarLocal mCalendar;
00165
00166 bool mOpen;
00167
00168 int mAlarmDays;
00169 bool mAlarm;
00170 KABC::AddressBook *mAddressbook;
00171
00172 KABC::Lock *mLock;
00173
00174 class Private;
00175 Private *d;
00176 };
00177
00178 }
00179
00180 #endif
This file is part of the documentation for libkcal Library Version 3.3.2.