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 &timeSpec = KDateTime::Spec(),
00149 bool inclusive = false );
00150
00162 Event::List rawEventsForDate(
00163 const QDate &date, const KDateTime::Spec &timeSpec = KDateTime::Spec(),
00164 EventSortField sortField = EventSortUnsorted,
00165 SortDirection sortDirection = SortDirectionAscending );
00166
00171 Event::List rawEventsForDate( const KDateTime &dt );
00172
00177 Event *event( const QString &uid );
00178
00179
00180
00185 bool addTodo( Todo *todo );
00186
00191 bool deleteTodo( Todo *todo );
00192
00197 void deleteAllTodos();
00198
00203 Todo::List rawTodos(
00204 TodoSortField sortField = TodoSortUnsorted,
00205 SortDirection sortDirection = SortDirectionAscending );
00206
00211 Todo::List rawTodosForDate( const QDate &date );
00212
00217 Todo *todo( const QString &uid );
00218
00219
00220
00225 bool addJournal( Journal *journal );
00226
00231 bool deleteJournal( Journal *journal );
00232
00237 void deleteAllJournals();
00238
00243 Journal::List rawJournals(
00244 JournalSortField sortField = JournalSortUnsorted,
00245 SortDirection sortDirection = SortDirectionAscending );
00246
00251 Journal::List rawJournalsForDate( const QDate &date );
00252
00257 Journal *journal( const QString &uid );
00258
00259
00260
00265 Alarm::List alarms( const KDateTime &from, const KDateTime &to );
00266
00273 Alarm::List alarmsTo( const KDateTime &to );
00274
00280 void incidenceUpdated( IncidenceBase *incidenceBase );
00281
00282 using QObject::event;
00283
00284 private:
00285
00286 Q_DISABLE_COPY( CalendarLocal )
00287 class Private;
00288 Private *const d;
00289
00290 };
00291
00292 }
00293
00294 #endif