KCal Library
calendarlocal.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00030 #ifndef KCAL_CALENDARLOCAL_H
00031 #define KCAL_CALENDARLOCAL_H
00032
00033 #include "calendar.h"
00034
00035 namespace KCal {
00036
00037 class CalFormat;
00038
00043 class KCAL_EXPORT CalendarLocal : public Calendar
00044 {
00045 public:
00050 explicit CalendarLocal( const KDateTime::Spec &timeSpec );
00051
00056 explicit CalendarLocal( const QString &timeZoneId );
00057
00062 ~CalendarLocal();
00063
00080 bool load( const QString &fileName, CalFormat *format = 0 );
00081
00087 bool reload();
00088
00096 bool save();
00097
00108 bool save( const QString &fileName, CalFormat *format = 0 );
00109
00113 void close();
00114
00115
00116
00121 bool addEvent( Event *event );
00122
00127 bool deleteEvent( Event *event );
00128
00133 void deleteAllEvents();
00134
00139 Event::List rawEvents(
00140 EventSortField sortField = EventSortUnsorted,
00141 SortDirection sortDirection = SortDirectionAscending );
00142
00147 Event::List rawEvents( const QDate &start, const QDate &end,
00148 const KDateTime::Spec ×pec = KDateTime::Spec(),
00149 bool inclusive = false );
00150
00156 Event::List rawEventsForDate(
00157 const QDate &date, const KDateTime::Spec ×pec = KDateTime::Spec(),
00158 EventSortField sortField = EventSortUnsorted,
00159 SortDirection sortDirection = SortDirectionAscending );
00160
00165 Event::List rawEventsForDate( const KDateTime &dt );
00166
00171 Event *event( const QString &uid );
00172
00173
00174
00179 bool addTodo( Todo *todo );
00180
00185 bool deleteTodo( Todo *todo );
00186
00191 void deleteAllTodos();
00192
00197 Todo::List rawTodos(
00198 TodoSortField sortField = TodoSortUnsorted,
00199 SortDirection sortDirection = SortDirectionAscending );
00200
00205 Todo::List rawTodosForDate( const QDate &date );
00206
00211 Todo *todo( const QString &uid );
00212
00213
00214
00219 bool addJournal( Journal *journal );
00220
00225 bool deleteJournal( Journal *journal );
00226
00231 void deleteAllJournals();
00232
00237 Journal::List rawJournals(
00238 JournalSortField sortField = JournalSortUnsorted,
00239 SortDirection sortDirection = SortDirectionAscending );
00240
00245 Journal::List rawJournalsForDate( const QDate &date );
00246
00251 Journal *journal( const QString &uid );
00252
00253
00254
00259 Alarm::List alarms( const KDateTime &from, const KDateTime &to );
00260
00267 Alarm::List alarmsTo( const KDateTime &to );
00268
00274 void incidenceUpdated( IncidenceBase *incidenceBase );
00275
00276 using QObject::event;
00277
00278 private:
00279
00280 Q_DISABLE_COPY( CalendarLocal )
00281 class Private;
00282 Private *const d;
00283
00284 };
00285
00286 }
00287
00288 #endif