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

akonadi

  • Akonadi
  • CalendarBase
Public Types | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Akonadi::CalendarBase Class Reference

#include <calendarbase.h>

Inheritance diagram for Akonadi::CalendarBase:
Akonadi::FetchJobCalendar

Public Types

typedef QSharedPointer
< CalendarBase > 
Ptr
 

Signals

void createFinished (bool success, const QString &errorMessage)
 
void deleteFinished (bool success, const QString &errorMessage)
 
void modifyFinished (bool success, const QString &errorMessage)
 

Public Member Functions

 CalendarBase ()
 
 ~CalendarBase ()
 
bool addEvent (const KCalCore::Event::Ptr &event)
 
bool addIncidence (const KCalCore::Incidence::Ptr &incidence)
 
bool addJournal (const KCalCore::Journal::Ptr &journal)
 
bool addTodo (const KCalCore::Todo::Ptr &todo)
 
KCalCore::Incidence::List childIncidences (const QString &parentUid) const
 
KCalCore::Incidence::List childIncidences (const Akonadi::Item::Id &parentId) const
 
Akonadi::Item::List childItems (const QString &parentUid) const
 
Akonadi::Item::List childItems (const Akonadi::Item::Id &parentId) const
 
void deleteAllEvents ()
 
void deleteAllJournals ()
 
void deleteAllTodos ()
 
bool deleteEvent (const KCalCore::Event::Ptr &event)
 
bool deleteIncidence (const KCalCore::Incidence::Ptr &)
 
bool deleteJournal (const KCalCore::Journal::Ptr &journal)
 
bool deleteTodo (const KCalCore::Todo::Ptr &todo)
 
void endBatchAdding ()
 
Akonadi::IncidenceChanger * incidenceChanger () const
 
Akonadi::Item item (const QString &uid) const
 
Akonadi::Item item (Akonadi::Item::Id) const
 
Akonadi::Item::List itemList (const KCalCore::Incidence::List &incidenceList) const
 
bool modifyIncidence (const KCalCore::IncidenceBase::Ptr &newIncidence)
 
void setWeakPointer (const QWeakPointer< Akonadi::CalendarBase > &pointer)
 
void startBatchAdding ()
 
QWeakPointer< CalendarBase > weakPointer () const
 

Protected Member Functions

 CalendarBase (CalendarBasePrivate *const d)
 

Protected Attributes

QScopedPointer
< CalendarBasePrivate > 
d_ptr
 

Detailed Description

The base class for all akonadi aware calendars.

Because it inherits KCalCore::Calendar, it provides seamless integration with KCalCore and KCalUtils libraries eliminating any need for adapter ( akonadi<->KCalCore ) classes.

See Also
ETMCalendar
FetchJobCalendar
Author
Sérgio Martins sergi.nosp@m.o.ma.nosp@m.rtins.nosp@m.@kda.nosp@m.b.com
Since
4.11

Definition at line 49 of file calendarbase.h.

Constructor & Destructor Documentation

CalendarBase::CalendarBase ( )
explicit

Constructs a CalendarBase object.

Definition at line 163 of file calendarbase.cpp.

CalendarBase::~CalendarBase ( )

Destroys the calendar.

Definition at line 173 of file calendarbase.cpp.

Member Function Documentation

bool CalendarBase::addEvent ( const KCalCore::Event::Ptr &  event)

Adds an Event to the calendar.

It's added to akonadi in the background

See Also
createFinished().reimp

Definition at line 284 of file calendarbase.cpp.

bool CalendarBase::addIncidence ( const KCalCore::Incidence::Ptr &  incidence)

Adds an incidence to the calendar.

It's added to akonadi in the background

See Also
createFinished().reimp

Definition at line 332 of file calendarbase.cpp.

bool CalendarBase::addJournal ( const KCalCore::Journal::Ptr &  journal)

Adds a Journal to the calendar.

It's added to akonadi in the background

See Also
createFinished().reimp

Definition at line 316 of file calendarbase.cpp.

bool CalendarBase::addTodo ( const KCalCore::Todo::Ptr &  todo)

Adds a Todo to the calendar.

It's added to akonadi in the background

See Also
createFinished().reimp

Definition at line 300 of file calendarbase.cpp.

KCalCore::Incidence::List CalendarBase::childIncidences ( const QString &  parentUid) const

Returns the child incidences of the parent identified by parentUid.

Only the direct childs are returned

Definition at line 238 of file calendarbase.cpp.

KCalCore::Incidence::List CalendarBase::childIncidences ( const Akonadi::Item::Id &  parentId) const

Returns the child incidences of the parent identified by parentId.

Only the direct childs are returned

Definition at line 222 of file calendarbase.cpp.

Akonadi::Item::List CalendarBase::childItems ( const QString &  parentUid) const

Returns the child items of the parent identified by parentUid.

Only the direct childs are returned

Definition at line 269 of file calendarbase.cpp.

Akonadi::Item::List CalendarBase::childItems ( const Akonadi::Item::Id &  parentId) const

Returns the child items of the parent identified by parentId.

Only the direct childs are returned

Definition at line 253 of file calendarbase.cpp.

void Akonadi::CalendarBase::createFinished ( bool  success,
const QString &  errorMessage 
)
signal

This signal is emitted when an incidence is created in akonadi through add{Incidence,Event,Todo,Journal}.

Parameters
successthe success of the operation
errorMessageif success is false, contains the error message
void CalendarBase::deleteAllEvents ( )

Deletes all Events from the calendar.

They are removed from akonadi in the background

See Also
deleteFinished().reimp

Definition at line 294 of file calendarbase.cpp.

void CalendarBase::deleteAllJournals ( )

Deletes all Journals from the calendar.

They are removed from akonadi in the background

See Also
deleteFinished().reimp

Definition at line 326 of file calendarbase.cpp.

void CalendarBase::deleteAllTodos ( )

Deletes all Todos from the calendar.

They are removed from akonadi in the background

See Also
deleteFinished().reimp

Definition at line 310 of file calendarbase.cpp.

bool CalendarBase::deleteEvent ( const KCalCore::Event::Ptr &  event)

Deletes an Event from the calendar.

It's removed from akonadi in the background

See Also
deleteFinished().reimp

Definition at line 289 of file calendarbase.cpp.

void Akonadi::CalendarBase::deleteFinished ( bool  success,
const QString &  errorMessage 
)
signal

This signal is emitted when an incidence is deleted in akonadi through delete{Incidence,Event,Todo,Journal} or deleteAll{Events,Todos,Journals}.

Parameters
successthe success of the operation
errorMessageif success is false, contains the error message
bool CalendarBase::deleteIncidence ( const KCalCore::Incidence::Ptr &  incidence)

Deletes an incidence from the calendar.

It's removed from akonadi in the background

See Also
deleteFinished().reimp

Definition at line 360 of file calendarbase.cpp.

bool CalendarBase::deleteJournal ( const KCalCore::Journal::Ptr &  journal)

Deletes a Journal from the calendar.

It's removed from akonadi in the background

See Also
deleteFinished().reimp

Definition at line 321 of file calendarbase.cpp.

bool CalendarBase::deleteTodo ( const KCalCore::Todo::Ptr &  todo)

Deletes a Todo from the calendar.

It's removed from akonadi in the background

See Also
deleteFinished().reimp

Definition at line 305 of file calendarbase.cpp.

void CalendarBase::endBatchAdding ( )

Tells the Calendar that you stoped adding a batch of incidences.

See Also
startBatchAdding()reimp

Definition at line 399 of file calendarbase.cpp.

IncidenceChanger * CalendarBase::incidenceChanger ( ) const

Returns the IncidenceChanger used by this calendar to make changes in akonadi.

Use this if you need the defaults used by CalendarBase.

Definition at line 388 of file calendarbase.cpp.

Akonadi::Item CalendarBase::item ( const QString &  uid) const

Returns the Item containing the incidence with uid uid or an invalid Item if the incidence isn't found.

Definition at line 189 of file calendarbase.cpp.

Akonadi::Item CalendarBase::item ( Akonadi::Item::Id  id) const

Returns the Item with id or an invalid Item if not found.

Definition at line 177 of file calendarbase.cpp.

Akonadi::Item::List CalendarBase::itemList ( const KCalCore::Incidence::List &  incidenceList) const

Returns the item list that corresponds to the incidenceList.

Definition at line 207 of file calendarbase.cpp.

void Akonadi::CalendarBase::modifyFinished ( bool  success,
const QString &  errorMessage 
)
signal

This signal is emitted when an incidence is modified in akonadi through modifyIncidence().

Parameters
successthe success of the operation
errorMessageif success is false, contains the error message
bool CalendarBase::modifyIncidence ( const KCalCore::IncidenceBase::Ptr &  newIncidence)

Modifies an incidence.

The incidence with the same uid as newIncidence will be updated with the contents of newIncidence.

Definition at line 368 of file calendarbase.cpp.

void CalendarBase::setWeakPointer ( const QWeakPointer< Akonadi::CalendarBase > &  pointer)

Sets the weak pointer that's associated with this instance.

Use this if later on you need to cast sender() into a QSharedPointer

QWeakPointer<CalendarBase> weakPtr = qobject_cast<CalendarBase*>( sender() )->weakPointer();
CalendarBase::Ptr calendar( weakPtr.toStrongRef() );
See Also
weakPointer()

Definition at line 376 of file calendarbase.cpp.

void CalendarBase::startBatchAdding ( )

Call this to tell the calendar that you're adding a batch of incidences.

So it doesn't, for example, ask the destination for each incidence.

See Also
endBatchAdding()reimp

Definition at line 394 of file calendarbase.cpp.

QWeakPointer< CalendarBase > CalendarBase::weakPointer ( ) const

Returns the weak pointer set with setWeakPointer().

The default is an invalid weak pointer.

See Also
setWeakPointer()

Definition at line 382 of file calendarbase.cpp.


The documentation for this class was generated from the following files:
  • calendarbase.h
  • calendarbase.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:46 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.10.5 API Reference

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