• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 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 <akonadi/collection.h>
28#include <kcalcore/memorycalendar.h>
29#include <kcalcore/incidence.h>
30#include <KDE/KDateTime>
31
32namespace Akonadi {
33
34class CalendarBasePrivate;
35class IncidenceChanger;
36
50class AKONADI_CALENDAR_EXPORT CalendarBase : public KCalCore::MemoryCalendar
51{
52 Q_OBJECT
53public:
54 typedef QSharedPointer<CalendarBase> Ptr;
55
59 explicit CalendarBase(QObject *parent = 0);
60
64 ~CalendarBase();
65
71 Akonadi::Item item(const QString &uid) const;
72
77 Akonadi::Item item(const KCalCore::Incidence::Ptr &incidence) const;
78
82 Akonadi::Item item(Akonadi::Item::Id) const;
83
88 Akonadi::Item::List items() const;
89
96 Akonadi::Item::List items(Akonadi::Collection::Id) const;
97
101 Akonadi::Item::List itemList(const KCalCore::Incidence::List &incidenceList) const;
102 //TODO: unit-test
108 KCalCore::Incidence::List childIncidences(const QString &parentUid) const;
109
115 KCalCore::Incidence::List childIncidences(const Akonadi::Item::Id &parentId) const;
116
122 Akonadi::Item::List childItems(const QString &parentUid) const;
123
129 Akonadi::Item::List childItems(const Akonadi::Item::Id &parentId) const;
130
142 void setWeakPointer(const QWeakPointer<Akonadi::CalendarBase> &pointer);
143
149 QWeakPointer<CalendarBase> weakPointer() const;
150 bool addEvent(const KCalCore::Event::Ptr &event);
157 bool deleteEvent(const KCalCore::Event::Ptr &event);
164 void deleteAllEvents();
175 bool addTodo(const KCalCore::Todo::Ptr &todo);
182 bool deleteTodo(const KCalCore::Todo::Ptr &todo);
189 void deleteAllTodos();
200 bool addJournal(const KCalCore::Journal::Ptr &journal);
207 bool deleteJournal(const KCalCore::Journal::Ptr &journal);
214 void deleteAllJournals();
225 bool addIncidence(const KCalCore::Incidence::Ptr &incidence);
232 bool deleteIncidence(const KCalCore::Incidence::Ptr &);
239 void startBatchAdding();
247 void endBatchAdding();
253
258 Akonadi::IncidenceChanger *incidenceChanger() const;
259
265 bool modifyIncidence(const KCalCore::Incidence::Ptr &newIncidence);
266
267Q_SIGNALS:
274 void createFinished(bool success, const QString &errorMessage);
275
282 void deleteFinished(bool success, const QString &errorMessage);
283
290 void modifyFinished(bool success, const QString &errorMessage);
291
292protected:
293 Q_DECLARE_PRIVATE(CalendarBase)
294 QScopedPointer<CalendarBasePrivate> d_ptr;
295 CalendarBase(CalendarBasePrivate *const d, QObject *parent);
296
297 friend class Scheduler;
298};
299}
300
301#endif
Akonadi::CalendarBase::childIncidences
KCalCore::Incidence::List childIncidences(const QString &parentUid) const
Returns the child incidences of the parent identified by parentUid.
Definition calendarbase.cpp:475
Akonadi::CalendarBase::deleteAllEvents
void deleteAllEvents()
Reimplementation of KCalCore::Calendar::deleteAllEvents() that does nothing.
Definition calendarbase.cpp:535
Akonadi::CalendarBase::modifyIncidence
bool modifyIncidence(const KCalCore::Incidence::Ptr &newIncidence)
Modifies an incidence.
Definition calendarbase.cpp:621
Akonadi::CalendarBase::addIncidence
bool addIncidence(const KCalCore::Incidence::Ptr &incidence)
Adds an incidence to the calendar.
Definition calendarbase.cpp:573
Akonadi::CalendarBase::incidenceChanger
Akonadi::IncidenceChanger * incidenceChanger() const
Returns the IncidenceChanger used by this calendar to make changes in akonadi.
Definition calendarbase.cpp:642
Akonadi::CalendarBase::endBatchAdding
void endBatchAdding()
Tells the Calendar that you stoped adding a batch of incidences.
Definition calendarbase.cpp:653
Akonadi::CalendarBase::deleteFinished
void deleteFinished(bool success, const QString &errorMessage)
This signal is emitted when an incidence is deleted in akonadi through delete{Incidence,...
Akonadi::CalendarBase::deleteJournal
bool deleteJournal(const KCalCore::Journal::Ptr &journal)
Deletes a Journal from the calendar.
Definition calendarbase.cpp:562
Akonadi::CalendarBase::deleteAllTodos
void deleteAllTodos()
Reimplementation of KCalCore::Calendar::deleteAllTodos() that does nothing.
Definition calendarbase.cpp:551
Akonadi::CalendarBase::modifyFinished
void modifyFinished(bool success, const QString &errorMessage)
This signal is emitted when an incidence is modified in akonadi through modifyIncidence().
Akonadi::CalendarBase::addTodo
bool addTodo(const KCalCore::Todo::Ptr &todo)
Adds a Todo to the calendar.
Definition calendarbase.cpp:541
Akonadi::CalendarBase::CalendarBase
CalendarBase(QObject *parent=0)
Constructs a CalendarBase object.
Definition calendarbase.cpp:371
Akonadi::CalendarBase::childItems
Akonadi::Item::List childItems(const QString &parentUid) const
Returns the child items of the parent identified by parentUid.
Definition calendarbase.cpp:510
Akonadi::CalendarBase::addJournal
bool addJournal(const KCalCore::Journal::Ptr &journal)
Adds a Journal to the calendar.
Definition calendarbase.cpp:557
Akonadi::CalendarBase::createFinished
void createFinished(bool success, const QString &errorMessage)
This signal is emitted when an incidence is created in akonadi through add{Incidence,...
Akonadi::CalendarBase::item
Akonadi::Item item(const KCalCore::Incidence::Ptr &incidence) const
Returns the Item containing the incidence with uid uid or an invalid Item if the incidence isn't foun...
Akonadi::CalendarBase::deleteAllJournals
void deleteAllJournals()
Reimplementation of KCalCore::Calendar::deleteAllJournals() that does nothing.
Definition calendarbase.cpp:567
Akonadi::CalendarBase::deleteTodo
bool deleteTodo(const KCalCore::Todo::Ptr &todo)
Deletes a Todo from the calendar.
Definition calendarbase.cpp:546
Akonadi::CalendarBase::deleteIncidence
bool deleteIncidence(const KCalCore::Incidence::Ptr &)
Deletes an incidence from the calendar.
Definition calendarbase.cpp:613
Akonadi::CalendarBase::startBatchAdding
void startBatchAdding()
Call this to tell the calendar that you're adding a batch of incidences.
Definition calendarbase.cpp:648
Akonadi::CalendarBase::setWeakPointer
void setWeakPointer(const QWeakPointer< Akonadi::CalendarBase > &pointer)
Sets the weak pointer that's associated with this instance.
Definition calendarbase.cpp:630
Akonadi::CalendarBase::addEvent
bool addEvent(const KCalCore::Event::Ptr &event)
Adds an Event to the calendar.
Definition calendarbase.cpp:525
Akonadi::CalendarBase::deleteEvent
bool deleteEvent(const KCalCore::Event::Ptr &event)
Deletes an Event from the calendar.
Definition calendarbase.cpp:530
Akonadi::CalendarBase::item
Akonadi::Item item(const QString &uid) const
Returns the Item containing the incidence with uid uid or an invalid Item if the incidence isn't foun...
Definition calendarbase.cpp:402
Akonadi::CalendarBase::itemList
Akonadi::Item::List itemList(const KCalCore::Incidence::List &incidenceList) const
Returns the item list that corresponds to the incidenceList.
Definition calendarbase.cpp:440
Akonadi::CalendarBase::weakPointer
QWeakPointer< CalendarBase > weakPointer() const
Returns the weak pointer set with setWeakPointer().
Definition calendarbase.cpp:636
Akonadi::CalendarBase::items
Akonadi::Item::List items() const
Returns the list of items contained in this calendar.
Definition calendarbase.cpp:428
Akonadi::Entity::Id
qint64 Id
Describes the unique id type.
Definition entity.h:65
Akonadi
FreeBusyManager::Singleton.
Definition actionstatemanager_p.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 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
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 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