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 todos(
const QDate &date );
00130 Todo::List todos() {
return Calendar::todos(); }
00131
00135
bool addJournal(
Journal * );
00139
void deleteJournal(
Journal * );
00143
void deleteAllJournals();
00147
Journal *journal(
const QDate & );
00151
Journal *journal(
const QString &uid );
00155
Journal::List journals();
00156
00160
Alarm::List alarms(
const QDateTime &from,
const QDateTime &to );
00161
00165
Alarm::List alarmsTo(
const QDateTime &to );
00166
00172
void update(
IncidenceBase *incidence );
00173
00178
Event::List rawEventsForDate(
const QDate &date,
bool sorted =
false );
00182
Event::List rawEventsForDate(
const QDateTime &qdt );
00192
Event::List rawEvents(
const QDate &start,
const QDate &end,
00193
bool inclusive =
false );
00194
00195
protected:
00196
00198 void incidenceUpdated(
IncidenceBase *i ) { update( i ); }
00199
00201
void insertEvent(
Event *event );
00202
00204
void appendAlarms(
Alarm::List &alarms,
Incidence *incidence,
00205
const QDateTime &from,
const QDateTime &to );
00206
00208
void appendRecurringAlarms(
Alarm::List &alarms,
Incidence *incidence,
00209
const QDateTime &from,
const QDateTime &to );
00210
00211
private:
00212
void init();
00213
00214
typedef QDict<Event> EventDict;
00215
typedef QDictIterator<Event> EventDictIterator;
00216 EventDict mEvents;
00217
Todo::List mTodoList;
00218
Journal::List mJournalList;
00219
00220
class Private;
00221 Private *d;
00222 };
00223
00224 }
00225
00226
#endif
This file is part of the documentation for libkcal Library Version 3.2.2.