• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.11.5 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
  • calendar
calendarbase.h
1 /*
2  Copyright (C) 2011 Sérgio Martins <sergio.martins@kdab.com>
3  Copyright (C) 2012 Sérgio Martins <iamsergio@gmail.com>
4 
5  This library is free software; you can redistribute it and/or modify it
6  under the terms of the GNU Library General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or (at your
8  option) any later version.
9 
10  This library is distributed in the hope that it will be useful, but WITHOUT
11  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13  License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to the
17  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  02110-1301, USA.
19 */
20 
21 #ifndef _AKONADI_CALENDARBASE_H_
22 #define _AKONADI_CALENDARBASE_H_
23 
24 #include "akonadi-calendar_export.h"
25 
26 #include <akonadi/item.h>
27 #include <kcalcore/memorycalendar.h>
28 #include <kcalcore/incidence.h>
29 #include <KDE/KDateTime>
30 
31 namespace Akonadi {
32 
33 class CalendarBasePrivate;
34 class IncidenceChanger;
35 
49 class AKONADI_CALENDAR_EXPORT CalendarBase : public KCalCore::MemoryCalendar
50 {
51  Q_OBJECT
52 public:
53  typedef QSharedPointer<CalendarBase> Ptr;
54 
58  explicit CalendarBase(QObject *parent = 0);
59 
63  ~CalendarBase();
64 
70  Akonadi::Item item(const QString &uid) const;
71 
76  Akonadi::Item item(const KCalCore::Incidence::Ptr &incidence) const;
77 
81  Akonadi::Item item(Akonadi::Item::Id) const;
82 
87  Akonadi::Item::List items() const;
88 
92  Akonadi::Item::List itemList(const KCalCore::Incidence::List &incidenceList) const;
93  //TODO: unit-test
99  KCalCore::Incidence::List childIncidences(const QString &parentUid) const;
100 
106  KCalCore::Incidence::List childIncidences(const Akonadi::Item::Id &parentId) const;
107 
113  Akonadi::Item::List childItems(const QString &parentUid) const;
114 
120  Akonadi::Item::List childItems(const Akonadi::Item::Id &parentId) const;
121 
133  void setWeakPointer(const QWeakPointer<Akonadi::CalendarBase> &pointer);
134 
140  QWeakPointer<CalendarBase> weakPointer() const;
141  bool addEvent(const KCalCore::Event::Ptr &event);
148  bool deleteEvent(const KCalCore::Event::Ptr &event);
155  void deleteAllEvents();
166  bool addTodo(const KCalCore::Todo::Ptr &todo);
173  bool deleteTodo(const KCalCore::Todo::Ptr &todo);
180  void deleteAllTodos();
191  bool addJournal(const KCalCore::Journal::Ptr &journal);
198  bool deleteJournal(const KCalCore::Journal::Ptr &journal);
205  void deleteAllJournals();
216  bool addIncidence(const KCalCore::Incidence::Ptr &incidence);
223  bool deleteIncidence(const KCalCore::Incidence::Ptr &);
230  void startBatchAdding();
238  void endBatchAdding();
244 
249  Akonadi::IncidenceChanger *incidenceChanger() const;
250 
256  bool modifyIncidence(const KCalCore::Incidence::Ptr &newIncidence);
257 
258 Q_SIGNALS:
265  void createFinished(bool success, const QString &errorMessage);
266 
273  void deleteFinished(bool success, const QString &errorMessage);
274 
281  void modifyFinished(bool success, const QString &errorMessage);
282 
283 protected:
284  Q_DECLARE_PRIVATE(CalendarBase)
285  QScopedPointer<CalendarBasePrivate> d_ptr;
286  CalendarBase(CalendarBasePrivate *const d, QObject *parent);
287 };
288 }
289 
290 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Fri Jan 17 2014 22:12:29 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs-4.11.5 API Reference

Skip menu "kdepimlibs-4.11.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal