extendedcalendar.h
Go to the documentation of this file.
1/*
2 This file is part of the mkcal library.
3
4 Copyright (c) 1998 Preston Brown <pbrown@kde.org>
5 Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org>
6 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
7 Contact: Alvaro Manera <alvaro.manera@nokia.com>
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public
11 License as published by the Free Software Foundation; either
12 version 2 of the License, or (at your option) any later version.
13
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with this library; see the file COPYING.LIB. If not, write to
21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA.
23*/
192#ifndef MKCAL_EXTENDEDCALENDAR_H
193#define MKCAL_EXTENDEDCALENDAR_H
194
195#include "mkcal_export.h"
196
197#include <KCalendarCore/MemoryCalendar>
198
199namespace mKCal {
200
201class ExtendedStorage;
202class Notebook;
203
208class MKCAL_EXPORT ExtendedCalendar : public KCalendarCore::MemoryCalendar
209{
210public:
214 typedef QSharedPointer<ExtendedCalendar> Ptr;
215
220 explicit ExtendedCalendar(const QTimeZone &timeZone);
221
226 explicit ExtendedCalendar(const QByteArray &timeZoneId);
227
232 ~ExtendedCalendar();
233
238 bool reload();
239
244 bool save();
245
256 KCalendarCore::Incidence::Ptr dissociateSingleOccurrence(const KCalendarCore::Incidence::Ptr &incidence,
257 const QDateTime &dateTime);
258
263 bool addIncidence(const KCalendarCore::Incidence::Ptr &incidence);
264
274 bool addIncidence(const KCalendarCore::Incidence::Ptr &incidence, const QString &notebookUid);
275
276 // Event Specific Methods //
277
282 bool addEvent(const KCalendarCore::Event::Ptr &event);
283
293 bool addEvent(const KCalendarCore::Event::Ptr &event, const QString &notebookUid);
294
295 // To-do Specific Methods //
296
301 bool addTodo(const KCalendarCore::Todo::Ptr &todo);
302
312 bool addTodo(const KCalendarCore::Todo::Ptr &todo, const QString &notebookUid);
313
314 // Journal Specific Methods //
315
320 bool addJournal(const KCalendarCore::Journal::Ptr &journal);
321
331 bool addJournal(const KCalendarCore::Journal::Ptr &journal, const QString &notebookUid);
332
333 using KCalendarCore::Calendar::journals;
334
342 KCalendarCore::Journal::List journals(const QDate &start, const QDate &end);
343
344 using KCalendarCore::Calendar::incidences;
345
355 KCalendarCore::Incidence::List incidences(const QDate &start, const QDate &end);
356
366 static QSharedPointer<ExtendedStorage> defaultStorage(const ExtendedCalendar::Ptr
367 &calendar); //No typedef to avoid cyclic includes
368
369private:
370 //@cond PRIVATE
371 Q_DISABLE_COPY(ExtendedCalendar)
372 class Private;
373 Private *const d;
374 //@endcond
375};
376
377}
378
379#endif
#define MKCAL_EXPORT
Definition mkcal_export.h:29
Definition extendedstorage.h:49

Generated on Thu Nov 28 2024 09:02:24 for libextendedkcal by doxygen 1.12.0