calendarlocal.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef KCAL_CALENDARLOCAL_H
00023
#define KCAL_CALENDARLOCAL_H
00024
00025
#include "calendar.h"
00026
#include <qdict.h>
00027
00028
namespace KCal {
00029
00030
class CalFormat;
00031
00035 class CalendarLocal :
public Calendar
00036 {
00037
public:
00041
CalendarLocal();
00045
CalendarLocal(
const QString &timeZoneId );
00046 ~
CalendarLocal();
00047
00060
bool load(
const QString &fileName );
00061
00069
bool save(
const QString &fileName,
CalFormat *format = 0 );
00070
00074
void close();
00075
00076 void save() {}
00077
00081
bool addEvent(
Event *event );
00085
void deleteEvent(
Event *event );
00089
void deleteAllEvents();
00090
00094
Event *
event(
const QString &uid );
00098
Event::List rawEvents();
00099
00103
bool addTodo(
Todo *todo );
00107
void deleteTodo(
Todo * );
00111
void deleteAllTodos();
00116
Todo *
todo(
const QString &uid );
00120
Todo::List rawTodos();
00124
Todo::List rawTodosForDate(
const QDate &date );
00125
00129
bool addJournal(
Journal * );
00133
void deleteJournal(
Journal * );
00137
void deleteAllJournals();
00141
Journal *
journal(
const QDate & );
00145
Journal *
journal(
const QString &uid );
00149
Journal::List journals();
00150
00154
Alarm::List alarms(
const QDateTime &from,
const QDateTime &to );
00155
00159
Alarm::List alarmsTo(
const QDateTime &to );
00160
00165
Event::List rawEventsForDate(
const QDate &date,
bool sorted =
false );
00169
Event::List rawEventsForDate(
const QDateTime &qdt );
00179
Event::List rawEvents(
const QDate &start,
const QDate &end,
00180
bool inclusive =
false );
00181
00182
protected:
00183
00185
void incidenceUpdated(
IncidenceBase *i );
00186
00188
void insertEvent(
Event *event );
00189
00191
void appendAlarms(
Alarm::List &alarms,
Incidence *incidence,
00192
const QDateTime &from,
const QDateTime &to );
00193
00195
void appendRecurringAlarms(
Alarm::List &alarms,
Incidence *incidence,
00196
const QDateTime &from,
const QDateTime &to );
00197
00198
private:
00199
void init();
00200
00201
typedef QDict<Event> EventDict;
00202
typedef QDictIterator<Event> EventDictIterator;
00203 EventDict mEvents;
00204
Todo::List mTodoList;
00205
Journal::List mJournalList;
00206
00207
Incidence::List mDeletedIncidences;
00208
00209
class Private;
00210 Private *d;
00211 };
00212
00213 }
00214
00215
#endif
This file is part of the documentation for libkcal Library Version 3.3.0.