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

KCal Library

  • KCal
  • CalendarLocal
Public Member Functions
KCal::CalendarLocal Class Reference

#include <calendarlocal.h>

Inheritance diagram for KCal::CalendarLocal:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CalendarLocal (const KDateTime::Spec &timeSpec)
 CalendarLocal (const QString &timeZoneId)
 ~CalendarLocal ()
bool addEvent (Event *event)
bool addJournal (Journal *journal)
bool addTodo (Todo *todo)
Alarm::List alarms (const KDateTime &from, const KDateTime &to)
Alarm::List alarmsTo (const KDateTime &to)
void close ()
void deleteAllEvents ()
void deleteAllJournals ()
void deleteAllTodos ()
bool deleteEvent (Event *event)
bool deleteJournal (Journal *journal)
bool deleteTodo (Todo *todo)
Event * event (const QString &uid)
void incidenceUpdated (IncidenceBase *incidenceBase)
Journal * journal (const QString &uid)
bool load (const QString &fileName, CalFormat *format=0)
Event::List rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Event::List rawEvents (const QDate &start, const QDate &end, const KDateTime::Spec &timeSpec=KDateTime::Spec(), bool inclusive=false)
Event::List rawEventsForDate (const QDate &date, const KDateTime::Spec &timeSpec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Event::List rawEventsForDate (const KDateTime &dt)
Journal::List rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Journal::List rawJournalsForDate (const QDate &date)
Todo::List rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Todo::List rawTodosForDate (const QDate &date)
bool reload ()
bool save ()
bool save (const QString &fileName, CalFormat *format=0)
Todo * todo (const QString &uid)

Detailed Description

This class provides a calendar stored as a local file.

Definition at line 43 of file calendarlocal.h.


Constructor & Destructor Documentation

CalendarLocal::CalendarLocal ( const KDateTime::Spec &  timeSpec) [explicit]

Private class that helps to provide binary compatibility between releases.

Private class that helps to provide binary compatibility between releases.The time specification is used as the default for creating or modifying incidences in the Calendar. The time specification does not alter existing incidences.The constructor also calls setViewTimeSpec(timeSpec).

Parameters:
timeSpectime specification

Definition at line 97 of file calendarlocal.cpp.

CalendarLocal::CalendarLocal ( const QString &  timeZoneId) [explicit]

The time zone ID is used as the default for creating or modifying incidences in the Calendar. The time zone does not alter existing incidences.The constructor also calls setViewTimeZoneId(timeZoneId).

Parameters:
timeZoneIdis a string containing a time zone ID, which is assumed to be valid. If no time zone is found, the viewing time specification is set to local clock time. Example: "Europe/Berlin"

Definition at line 103 of file calendarlocal.cpp.

CalendarLocal::~CalendarLocal ( )

Definition at line 109 of file calendarlocal.cpp.


Member Function Documentation

bool CalendarLocal::addEvent ( Event *  event) [virtual]

Parameters:
eventis a pointer to the Event to insert.
Returns:
true if the Event was successfully inserted; false otherwise.
See also:
deleteEvent()

Implements KCal::Calendar.

Definition at line 172 of file calendarlocal.cpp.

bool CalendarLocal::addJournal ( Journal *  journal) [virtual]

Parameters:
journalis a pointer to the Journal to insert.
Returns:
true if the Journal was successfully inserted; false otherwise.
See also:
deleteJournal()

Implements KCal::Calendar.

Definition at line 553 of file calendarlocal.cpp.

bool CalendarLocal::addTodo ( Todo *  todo) [virtual]

Parameters:
todois a pointer to the Todo to insert.
Returns:
true if the Todo was successfully inserted; false otherwise.
See also:
deleteTodo()

Implements KCal::Calendar.

Definition at line 222 of file calendarlocal.cpp.

Alarm::List CalendarLocal::alarms ( const KDateTime &  from,
const KDateTime &  to 
) [virtual]

Parameters:
fromis the starting timestamp.
tois the ending timestamp.
Returns:
the list of Alarms for the for the specified time range.

Implements KCal::Calendar.

Definition at line 329 of file calendarlocal.cpp.

Alarm::List CalendarLocal::alarmsTo ( const KDateTime &  to)

Return a list of Alarms that occur before the specified timestamp.

Parameters:
tois the ending timestamp.
Returns:
the list of Alarms occurring before the specified KDateTime.

Definition at line 324 of file calendarlocal.cpp.

void CalendarLocal::close ( ) [virtual]

Clears out the current calendar, freeing all used memory etc.

etc.

Implements KCal::Calendar.

Definition at line 158 of file calendarlocal.cpp.

void CalendarLocal::deleteAllEvents ( ) [virtual]

See also:
deleteEvent()

Implements KCal::Calendar.

Definition at line 202 of file calendarlocal.cpp.

void CalendarLocal::deleteAllJournals ( ) [virtual]

See also:
deleteJournal()

Implements KCal::Calendar.

Definition at line 597 of file calendarlocal.cpp.

void CalendarLocal::deleteAllTodos ( ) [virtual]

See also:
deleteTodo()

Implements KCal::Calendar.

Definition at line 277 of file calendarlocal.cpp.

bool CalendarLocal::deleteEvent ( Event *  event) [virtual]

Parameters:
eventis a pointer to the Event to remove.
Returns:
true if the Event was successfully remove; false otherwise.
See also:
addEvent(), deleteAllEvents()

Implements KCal::Calendar.

Definition at line 185 of file calendarlocal.cpp.

bool CalendarLocal::deleteJournal ( Journal *  journal) [virtual]

Parameters:
journalis a pointer to the Journal to remove.
Returns:
true if the Journal was successfully removed; false otherwise.
See also:
addJournal(), deleteAllJournals()

Implements KCal::Calendar.

Definition at line 583 of file calendarlocal.cpp.

bool CalendarLocal::deleteTodo ( Todo *  todo) [virtual]

Parameters:
todois a pointer to the Todo to remove.
Returns:
true if the Todo was successfully removed; false otherwise.
See also:
addTodo(), deleteAllTodos()

Implements KCal::Calendar.

Definition at line 258 of file calendarlocal.cpp.

Event * CalendarLocal::event ( const QString &  uid) [virtual]

Parameters:
uidis a unique identifier string.
Returns:
a pointer to the Event. A null pointer is returned if no such Event exists.

Implements KCal::Calendar.

Definition at line 217 of file calendarlocal.cpp.

void CalendarLocal::incidenceUpdated ( IncidenceBase *  incidenceBase) [virtual]

Notify the IncidenceBase::Observer that the incidence has been updated.

Parameters:
incidenceBaseis a pointer to the updated IncidenceBase.

Reimplemented from KCal::Calendar.

Definition at line 380 of file calendarlocal.cpp.

Journal * CalendarLocal::journal ( const QString &  uid) [virtual]

Parameters:
uidis a unique identifier string.
Returns:
a pointer to the Journal. A null pointer is returned if no such Journal exists.

Implements KCal::Calendar.

Definition at line 612 of file calendarlocal.cpp.

bool CalendarLocal::load ( const QString &  fileName,
CalFormat *  format = 0 
)

Loads a calendar on disk in vCalendar or iCalendar format into the current calendar.

Incidences already present are preserved. If an incidence of the file to be loaded has the same unique id as an incidence already present the new incidence is ignored.

To load a CalendarLocal object from a file without preserving existing incidences call close() before load().

Parameters:
fileNamethe name of the calendar on disk.
formatthe format to use. If 0, an attempt is made to load iCalendar format, and if that fails tries vCalendar format.
Returns:
true, if successful, false on error.
See also:
save( const QString &, CalFormat *)

Definition at line 115 of file calendarlocal.cpp.

Event::List CalendarLocal::rawEvents ( EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) [virtual]

Parameters:
sortFieldspecifies the EventSortField.
sortDirectionspecifies the SortDirection.
Returns:
the list of all unfiltered Events sorted as specified.

Implements KCal::Calendar.

Definition at line 541 of file calendarlocal.cpp.

Event::List CalendarLocal::rawEvents ( const QDate &  start,
const QDate &  end,
const KDateTime::Spec &  timeSpec = KDateTime::Spec(),
bool  inclusive = false 
) [virtual]

Parameters:
startis the starting date
endis the ending date
timeSpectime zone etc. to interpret start and end, or the calendar's default time spec if none is specified
inclusiveif true only Events which are completely included within the date range are returned.
Returns:
the list of unfiltered Events occurring within the specified date range.

Implements KCal::Calendar.

Definition at line 476 of file calendarlocal.cpp.

Event::List CalendarLocal::rawEventsForDate ( const QDate &  date,
const KDateTime::Spec &  timeSpec = KDateTime::Spec(),
EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) [virtual]

Returns an unfiltered list of all Events which occur on the given date.

Parameters:
daterequest unfiltered Event list for this QDate only.
timeSpectime zone etc. to interpret date, or the calendar's default time spec if none is specified
sortFieldspecifies the EventSortField.
sortDirectionspecifies the SortDirection.
Returns:
the list of unfiltered Events occurring on the specified QDate.

Implements KCal::Calendar.

Definition at line 417 of file calendarlocal.cpp.

Event::List CalendarLocal::rawEventsForDate ( const KDateTime &  dt) [virtual]

Parameters:
dtrequest unfiltered Event list for this KDateTime only.
Returns:
the list of unfiltered Events occurring on the specified timestamp.

Implements KCal::Calendar.

Definition at line 536 of file calendarlocal.cpp.

Journal::List CalendarLocal::rawJournals ( JournalSortField  sortField = JournalSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) [virtual]

Parameters:
sortFieldspecifies the JournalSortField.
sortDirectionspecifies the SortDirection.
Returns:
the list of all unfiltered Journals sorted as specified.

Implements KCal::Calendar.

Definition at line 617 of file calendarlocal.cpp.

Journal::List CalendarLocal::rawJournalsForDate ( const QDate &  date) [virtual]

Parameters:
daterequest unfiltered Journals for this QDate only.
Returns:
the list of unfiltered Journals for the specified date.

Implements KCal::Calendar.

Definition at line 629 of file calendarlocal.cpp.

Todo::List CalendarLocal::rawTodos ( TodoSortField  sortField = TodoSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) [virtual]

Parameters:
sortFieldspecifies the TodoSortField.
sortDirectionspecifies the SortDirection.
Returns:
the list of all unfiltered Todos sorted as specified.

Implements KCal::Calendar.

Definition at line 297 of file calendarlocal.cpp.

Todo::List CalendarLocal::rawTodosForDate ( const QDate &  date) [virtual]

Parameters:
daterequest unfiltered Todos due on this QDate.
Returns:
the list of unfiltered Todos due on the specified date.

Implements KCal::Calendar.

Definition at line 309 of file calendarlocal.cpp.

bool CalendarLocal::reload ( ) [virtual]

Reloads the contents of the storage into memory.

The associated file name must be known, in other words a previous load() must have been executed.

Returns:
true if the reload was successful; false otherwise.

Implements KCal::Calendar.

Definition at line 122 of file calendarlocal.cpp.

bool CalendarLocal::save ( ) [virtual]

Writes the calendar to disk.

The associated file name and format must be known, in other words a previous load() must have been executed.

Returns:
true if the save was successful; false otherwise.
See also:
save(const QString &, CalFormat *)

Implements KCal::Calendar.

Definition at line 132 of file calendarlocal.cpp.

bool CalendarLocal::save ( const QString &  fileName,
CalFormat *  format = 0 
)

Writes the calendar to disk in the specified format.

CalendarLocal takes ownership of the CalFormat object.

Parameters:
fileNamethe name of the file
formatthe format to use. If 0, iCalendar will be used.
Returns:
true if the save was successful; false otherwise.
See also:
save(), load( const QString &, CalFormat *)

Definition at line 146 of file calendarlocal.cpp.

Todo * CalendarLocal::todo ( const QString &  uid) [virtual]

Parameters:
uidis a unique identifier string.
Returns:
a pointer to the Todo. A null pointer is returned if no such Todo exists.

Implements KCal::Calendar.

Definition at line 292 of file calendarlocal.cpp.


The documentation for this class was generated from the following files:
  • calendarlocal.h
  • calendarlocal.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 22:19:50 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCal Library

Skip menu "KCal Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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