KCal::CalendarLocal Class Reference
This class provides a calendar stored as a local file. More...
#include <calendarlocal.h>
Inheritance diagram for KCal::CalendarLocal:

Public Member Functions | |
CalendarLocal () | |
constructs a new calendar, with variables initialized to sane values. | |
CalendarLocal (const QString &timeZoneId) | |
constructs a new calendar, with variables initialized to sane values. | |
bool | load (const QString &fileName) |
Loads a calendar on disk in vCalendar or iCalendar format into the current calendar. | |
bool | save (const QString &fileName, CalFormat *format=0) |
Writes out the calendar to disk in the specified format. | |
void | close () |
clears out the current calendar, freeing all used memory etc. | |
void | addEvent (Event *anEvent) |
Add Event to calendar. | |
void | deleteEvent (Event *) |
deletes an event from this calendar. | |
Event * | event (const QString &UniqueStr) |
Retrieves an event on the basis of the unique string ID. | |
QPtrList< Event > | rawEvents () |
Return unfiltered list of all events in calendar. | |
QString | getHolidayForDate (const QDate &qd) |
int | numEvents (const QDate &qd) |
returns the number of events that are present on the specified date. | |
void | addTodo (Todo *todo) |
Add a todo to the todolist. | |
void | deleteTodo (Todo *) |
Remove a todo from the todolist. | |
Todo * | todo (const QString &uid) |
Searches todolist for an event with this unique string identifier, returns a pointer or null. | |
QPtrList< Todo > | rawTodos () const |
Return list of all todos. | |
QPtrList< Todo > | todos (const QDate &date) |
Returns list of todos due on the specified date. | |
QPtrList< Todo > | todos () |
Return list of all todos. | |
virtual void | addJournal (Journal *) |
Add a Journal entry to calendar. | |
virtual void | deleteJournal (Journal *) |
Remove a Journal from the calendar. | |
virtual Journal * | journal (const QDate &) |
Return Journal for given date. | |
virtual Journal * | journal (const QString &UID) |
Return Journal with given UID. | |
QPtrList< Journal > | journals () |
Return list of all Journals stored in calendar. | |
Alarm::List | alarms (const QDateTime &from, const QDateTime &to) |
Return all alarms, which ocur in the given time interval. | |
Alarm::List | alarmsTo (const QDateTime &to) |
Return all alarms, which ocur before given date. | |
void | update (IncidenceBase *incidence) |
this method should be called whenever a Event is modified directly via it's pointer. | |
QPtrList< Event > | rawEventsForDate (const QDate &date, bool sorted=false) |
Builds and then returns a list of all events that match for the date specified. | |
QPtrList< Event > | rawEventsForDate (const QDateTime &qdt) |
Get unfiltered events for date qdt. | |
QPtrList< Event > | rawEvents (const QDate &start, const QDate &end, bool inclusive=false) |
Get unfiltered events in a range of dates. | |
Protected Member Functions | |
void | incidenceUpdated (IncidenceBase *i) |
Notification function of IncidenceBase::Observer. | |
void | insertEvent (const Event *anEvent) |
inserts an event into its "proper place" in the calendar. | |
long int | makeKey (const QDateTime &dt) |
on the basis of a QDateTime, forms a hash key for the dictionary. | |
long int | makeKey (const QDate &d) |
on the basis of a QDate, forms a hash key for the dictionary | |
QDate | keyToDate (long int key) |
Return the date for which the specified key was made. | |
void | appendAlarms (Alarm::List &alarms, Incidence *incidence, const QDateTime &from, const QDateTime &to) |
Append alarms of incidence in interval to list of alarms. | |
void | appendRecurringAlarms (Alarm::List &alarms, Incidence *incidence, const QDateTime &from, const QDateTime &to) |
Append alarms of recurring events in interval to list of alarms. |
Detailed Description
This class provides a calendar stored as a local file.
Definition at line 38 of file calendarlocal.h.
Constructor & Destructor Documentation
|
constructs a new calendar, with variables initialized to sane values.
Definition at line 42 of file calendarlocal.cpp. |
|
constructs a new calendar, with variables initialized to sane values.
Definition at line 48 of file calendarlocal.cpp. |
Member Function Documentation
|
Loads a calendar on disk in vCalendar or iCalendar format into the current calendar. Any information already present is lost.
Definition at line 78 of file calendarlocal.cpp. References KCal::FileStorage::load(). |
|
Writes out the calendar to disk in the specified format. CalendarLocal takes ownership of the CalFormat object.
Definition at line 84 of file calendarlocal.cpp. References KCal::FileStorage::save(). |
|
clears out the current calendar, freeing all used memory etc. etc. Implements KCal::Calendar. Definition at line 90 of file calendarlocal.cpp. References QPtrList< Todo >::clear(), QPtrList< Event >::clear(), QIntDict< QPtrList< Event > >::clear(), QIntDictIterator::current(), QIntDictIterator::currentKey(), QDateTime::date(), KCal::IncidenceBase::dtStart(), QPtrList::first(), KCal::Event::isMultiDay(), keyToDate(), QPtrList::next(), and QIntDictIterator::toFirst(). |
|
Add Event to calendar.
Implements KCal::Calendar. Definition at line 134 of file calendarlocal.cpp. References KCal::Calendar::getEmail(), insertEvent(), KCal::IncidenceBase::organizer(), KCal::IncidenceBase::registerObserver(), and KCal::Incidence::summary(). Referenced by KCal::DndFactory::copyEvent(), and KCal::DndFactory::createDrag(). |
|
deletes an event from this calendar.
Implements KCal::Calendar. Definition at line 149 of file calendarlocal.cpp. References QDate::addDays(), QPtrList< Event >::current(), QDateTime::date(), QDate::daysTo(), KCal::Event::dtEnd(), KCal::IncidenceBase::dtStart(), QIntDict< QPtrList< Event > >::find(), QPtrList< Event >::first(), QPtrList::first(), KCal::Event::isMultiDay(), makeKey(), QPtrList< Event >::next(), QPtrList::next(), QPtrList< Event >::remove(), QPtrList::remove(), and QPtrList::setAutoDelete(). |
|
Retrieves an event on the basis of the unique string ID.
Implements KCal::Calendar. Definition at line 247 of file calendarlocal.cpp. References QIntDictIterator::current(), QPtrList< Event >::first(), QPtrList::first(), QPtrList< Event >::next(), QPtrList::next(), and KCal::IncidenceBase::uid(). Referenced by rawEventsForDate(). |
|
Return unfiltered list of all events in calendar.
Implements KCal::Calendar. Definition at line 697 of file calendarlocal.cpp. |
|
returns the number of events that are present on the specified date.
Implements KCal::Calendar. Definition at line 322 of file calendarlocal.cpp. References QDate::addDays(), QPtrList::count(), QDateTime::date(), KCal::Event::dtEnd(), KCal::IncidenceBase::dtStart(), QIntDict< QPtrList< Event > >::find(), QPtrList< Event >::first(), KCal::Event::isMultiDay(), makeKey(), QPtrList< Event >::next(), and KCal::Incidence::recursOn(). |
|
Add a todo to the todolist.
Implements KCal::Calendar. Definition at line 275 of file calendarlocal.cpp. References QPtrList< Todo >::append(), and KCal::IncidenceBase::registerObserver(). Referenced by KCal::DndFactory::createDragTodo(). |
|
Remove a todo from the todolist.
Implements KCal::Calendar. Definition at line 284 of file calendarlocal.cpp. References QPtrList< Todo >::findRef(), and QPtrList< Todo >::remove(). |
|
Searches todolist for an event with this unique string identifier, returns a pointer or null.
Implements KCal::Calendar. Definition at line 297 of file calendarlocal.cpp. References QPtrList< Todo >::first(), QPtrList< Todo >::next(), and KCal::IncidenceBase::uid(). |
|
Return list of all todos.
Implements KCal::Calendar. Definition at line 292 of file calendarlocal.cpp. |
|
Returns list of todos due on the specified date.
Implements KCal::Calendar. Definition at line 308 of file calendarlocal.cpp. References QPtrList::append(), QDateTime::date(), KCal::Todo::dtDue(), QPtrList< Todo >::first(), KCal::Todo::hasDueDate(), QPtrList< Todo >::next(), and todos(). Referenced by KCal::DndFactory::createDropTodo(), KCal::DndFactory::pasteEvent(), and todos(). |
|
Return list of all todos. Workaround because compiler does not recognize function of base class. Reimplemented from KCal::Calendar. Definition at line 118 of file calendarlocal.h. |
|
Add a Journal entry to calendar.
Implements KCal::Calendar. Definition at line 707 of file calendarlocal.cpp. References QPtrList< Journal >::append(), KCal::IncidenceBase::dtStart(), QDateTime::isValid(), KCal::IncidenceBase::registerObserver(), and QDateTime::toString(). |
|
Remove a Journal from the calendar.
Definition at line 721 of file calendarlocal.cpp. References QPtrList< Journal >::findRef(), and QPtrList< Journal >::remove(). |
|
Return Journal for given date.
Implements KCal::Calendar. Definition at line 729 of file calendarlocal.cpp. References QDateTime::date(), KCal::IncidenceBase::dtStart(), QPtrList< Journal >::first(), and QPtrList< Journal >::next(). |
|
Return Journal with given UID.
Implements KCal::Calendar. Definition at line 740 of file calendarlocal.cpp. References QPtrList< Journal >::first(), QPtrList< Journal >::next(), and KCal::IncidenceBase::uid(). |
|
Return list of all Journals stored in calendar.
Implements KCal::Calendar. Definition at line 749 of file calendarlocal.cpp. |
|
Return all alarms, which ocur in the given time interval.
Implements KCal::Calendar. Definition at line 362 of file calendarlocal.cpp. References alarms(), appendAlarms(), appendRecurringAlarms(), QIntDictIterator::current(), KCal::Calendar::events(), QPtrList< Todo >::first(), QPtrList< Event >::first(), QPtrList::first(), QPtrList< Todo >::next(), QPtrList< Event >::next(), QPtrList::next(), and QDateTime::toString(). Referenced by alarms(), and alarmsTo(). |
|
Return all alarms, which ocur before given date.
Definition at line 354 of file calendarlocal.cpp. References alarms(). |
|
this method should be called whenever a Event is modified directly via it's pointer. It makes sure that the calendar is internally consistent. Definition at line 438 of file calendarlocal.cpp. References QIntDictIterator::current(), QDateTime::currentDateTime(), QPtrList< Event >::findRef(), insertEvent(), QPtrList::removeRef(), KCal::IncidenceBase::setLastModified(), KCal::IncidenceBase::setSyncStatus(), QPtrList< Event >::take(), QIntDictIterator::toFirst(), and KCal::IncidenceBase::type(). Referenced by incidenceUpdated(). |
|
Builds and then returns a list of all events that match for the date specified. useful for dayView, etc. etc. Implements KCal::Calendar. Definition at line 553 of file calendarlocal.cpp. References QDate::addDays(), QPtrList::append(), QDateTime::date(), KCal::Event::dtEnd(), KCal::IncidenceBase::dtStart(), event(), QIntDict< QPtrList< Event > >::find(), QPtrList< Event >::first(), QPtrList::first(), QPtrList::insert(), KCal::Event::isMultiDay(), makeKey(), QPtrList< Event >::next(), QPtrList::next(), KCal::Incidence::recursOn(), and QDateTime::time(). Referenced by rawEventsForDate(). |
|
Get unfiltered events for date qdt.
Implements KCal::Calendar. Definition at line 692 of file calendarlocal.cpp. References QDateTime::date(), and rawEventsForDate(). |
|
Get unfiltered events in a range of dates. If inclusive is set to true, only events are returned, which are completely included in the range. Implements KCal::Calendar. Definition at line 606 of file calendarlocal.cpp. References QPtrList::append(), QIntDictIterator::current(), QIntDictIterator::currentKey(), QDateTime::date(), KCal::Event::dtEnd(), KCal::IncidenceBase::dtStart(), KCal::Recurrence::duration(), KCal::Recurrence::endDate(), QPtrList< Event >::first(), QPtrList::first(), KCal::Event::isMultiDay(), keyToDate(), QPtrList< Event >::next(), QPtrList::next(), KCal::Incidence::recurrence(), and QIntDictIterator::toFirst(). |
|
Notification function of IncidenceBase::Observer.
Definition at line 163 of file calendarlocal.h. References update(). |
|
inserts an event into its "proper place" in the calendar.
Definition at line 474 of file calendarlocal.cpp. References QDateTime::addDays(), QPtrList::append(), QPtrList< Event >::append(), QDateTime::date(), KCal::Recurrence::doesRecur(), KCal::Event::dtEnd(), KCal::IncidenceBase::dtStart(), QIntDict< QPtrList< Event > >::find(), QIntDict< QPtrList< Event > >::insert(), makeKey(), and KCal::Incidence::recurrence(). Referenced by addEvent(), and update(). |
|
on the basis of a QDateTime, forms a hash key for the dictionary.
Definition at line 518 of file calendarlocal.cpp. References QDateTime::date(), QDate::day(), QDate::month(), QString::sprintf(), QString::toLong(), and QDate::year(). Referenced by deleteEvent(), insertEvent(), numEvents(), and rawEventsForDate(). |
|
on the basis of a QDate, forms a hash key for the dictionary
Definition at line 530 of file calendarlocal.cpp. References QDate::day(), QDate::month(), QString::sprintf(), QString::toLong(), and QDate::year(). |
|
Return the date for which the specified key was made.
Definition at line 538 of file calendarlocal.cpp. References QString::mid(), and QString::number(). Referenced by close(), and rawEvents(). |
|
Append alarms of incidence in interval to list of alarms.
Definition at line 392 of file calendarlocal.cpp. References KCal::Incidence::alarms(), QValueList::append(), KCal::Alarm::enabled(), QPtrList::first(), QPtrList::next(), KCal::Incidence::summary(), KCal::Alarm::time(), and QDateTime::toString(). Referenced by alarms(). |
|
Append alarms of recurring events in interval to list of alarms.
Definition at line 410 of file calendarlocal.cpp. References KCal::Incidence::alarms(), QValueList::append(), QDateTime::date(), KCal::Alarm::enabled(), QPtrList::first(), QPtrList::next(), KCal::Incidence::recursOn(), QDateTime::setDate(), QDateTime::setTime(), KCal::Incidence::summary(), QDateTime::time(), KCal::Alarm::time(), and QDateTime::toString(). Referenced by alarms(). |
The documentation for this class was generated from the following files: