libkcal Library API Documentation

KCal::IncidenceBase Class Reference

This class provides the base class common to all calendar components. More...

#include <incidencebase.h>

Inheritance diagram for KCal::IncidenceBase:

KCal::CustomProperties KCal::FreeBusy KCal::Incidence KCal::Event KCal::Journal KCal::Todo List of all members.

Public Types

enum  { SYNCNONE = 0, SYNCMOD = 1, SYNCDEL = 3 }

Public Member Functions

 IncidenceBase (const IncidenceBase &)
bool operator== (const IncidenceBase &) const
virtual QCString type () const =0
void setUid (const QString &)
QString uid () const
void setLastModified (const QDateTime &lm)
QDateTime lastModified () const
void setOrganizer (const QString &o)
QString organizer () const
virtual void setReadOnly (bool)
bool isReadOnly () const
virtual void setDtStart (const QDateTime &dtStart)
virtual QDateTime dtStart () const
virtual QString dtStartTimeStr () const
virtual QString dtStartDateStr (bool shortfmt=true) const
virtual QString dtStartStr () const
virtual void setDuration (int seconds)
int duration () const
void setHasDuration (bool)
bool hasDuration () const
bool doesFloat () const
void setFloats (bool f)
void addComment (const QString &comment)
bool removeComment (QString &comment)
void clearComments ()
QStringList comments () const
void addAttendee (Attendee *a, bool doUpdate=true)
void clearAttendees ()
const Attendee::Listattendees () const
int attendeeCount () const
AttendeeattendeeByMail (const QString &) const
AttendeeattendeeByMails (const QStringList &, const QString &email=QString::null) const
AttendeeattendeeByUid (const QString &uid) const
void setSyncStatus (int status)
int syncStatus () const
void setPilotId (unsigned long id)
unsigned long pilotId () const
void registerObserver (Observer *)
void unRegisterObserver (Observer *)
void updated ()

Protected Attributes

bool mReadOnly

Detailed Description

This class provides the base class common to all calendar components.

Definition at line 40 of file incidencebase.h.


Member Enumeration Documentation

anonymous enum
 

Pilot synchronization states.

Definition at line 164 of file incidencebase.h.


Member Function Documentation

void IncidenceBase::setUid const QString  ) 
 

Set the unique id for the event.

Definition at line 106 of file incidencebase.cpp.

References updated().

Referenced by KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

QString IncidenceBase::uid  )  const
 

Return the unique id for the event.

Definition at line 112 of file incidencebase.cpp.

Referenced by KCal::CalendarLocal::deleteEvent(), KCal::VCalFormat::eventToVEvent(), KCal::VCalFormat::eventToVTodo(), KCal::CalendarLocal::insertEvent(), KCal::ICalFormat::parseScheduleMessage(), KCal::Calendar::removeRelations(), KCal::Incidence::setRelatedTo(), and KCal::Calendar::setupRelations().

void IncidenceBase::setLastModified const QDateTime lm  ) 
 

Sets the time the incidence was last modified.

Definition at line 117 of file incidencebase.cpp.

Referenced by KCal::CalendarLocal::incidenceUpdated(), KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

QDateTime IncidenceBase::lastModified  )  const
 

Return the time the incidence was last modified.

Definition at line 131 of file incidencebase.cpp.

Referenced by KCal::VCalFormat::eventToVEvent(), and KCal::VCalFormat::eventToVTodo().

void IncidenceBase::setOrganizer const QString o  ) 
 

sets the organizer for the event

Definition at line 136 of file incidencebase.cpp.

References updated().

Referenced by KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

void IncidenceBase::setReadOnly bool   )  [virtual]
 

Set readonly status.

Reimplemented in KCal::Incidence.

Definition at line 153 of file incidencebase.cpp.

bool KCal::IncidenceBase::isReadOnly  )  const [inline]
 

Return if the object is read-only.

Definition at line 72 of file incidencebase.h.

void IncidenceBase::setDtStart const QDateTime dtStart  )  [virtual]
 

for setting the event's starting date/time with a QDateTime.

Reimplemented in KCal::Incidence, and KCal::Todo.

Definition at line 158 of file incidencebase.cpp.

References updated().

QDateTime IncidenceBase::dtStart  )  const [virtual]
 

returns an event's starting date/time as a QDateTime.

Definition at line 165 of file incidencebase.cpp.

Referenced by KCal::ResourceCached::addJournal(), KCal::CalendarResources::addJournal(), KCal::CalendarLocal::addJournal(), KCal::CalendarLocal::appendRecurringAlarms(), KCal::Calendar::dissociateOccurrence(), KCal::Event::dtEnd(), KCal::Todo::dtStart(), KCal::Todo::dtStartDateStr(), dtStartDateStr(), KCal::Todo::dtStartStr(), dtStartStr(), KCal::Todo::dtStartTimeStr(), dtStartTimeStr(), KCal::VCalFormat::eventToVEvent(), KCal::Event::isMultiDay(), KCal::DndFactory::pasteIncidence(), KCal::VCalFormat::populate(), KCal::CalendarLocal::rawEvents(), KCal::CalendarLocal::rawEventsForDate(), KCal::Incidence::recurrence(), KCal::Alarm::time(), and KCal::VCalFormat::VEventToEvent().

QString IncidenceBase::dtStartTimeStr  )  const [virtual]
 

returns an event's starting time as a string formatted according to the users locale settings

Definition at line 170 of file incidencebase.cpp.

References dtStart().

QString IncidenceBase::dtStartDateStr bool  shortfmt = true  )  const [virtual]
 

returns an event's starting date as a string formatted according to the users locale settings

Definition at line 175 of file incidencebase.cpp.

References dtStart().

QString IncidenceBase::dtStartStr  )  const [virtual]
 

returns an event's starting date and time as a string formatted according to the users locale settings

Definition at line 180 of file incidencebase.cpp.

References dtStart().

bool IncidenceBase::doesFloat  )  const
 

Return true or false depending on whether the incidence "floats," i.e.

has a date but no time attached to it.

Definition at line 186 of file incidencebase.cpp.

Referenced by KCal::VCalFormat::eventToVEvent(), and KCal::VCalFormat::eventToVTodo().

void IncidenceBase::setFloats bool  f  ) 
 

Set whether the incidence floats, i.e.

has a date but no time attached to it.

Definition at line 191 of file incidencebase.cpp.

References updated().

Referenced by KCal::ResourceKABC::doLoad(), and KCal::VCalFormat::VEventToEvent().

void IncidenceBase::addComment const QString comment  ) 
 

Add a comment to this incidence.

Does not add a linefeed character. Just appends the text as passed in.

Parameters:
comment The comment to add.

Definition at line 199 of file incidencebase.cpp.

bool IncidenceBase::removeComment QString comment  ) 
 

Remove a comment from the event.

Removes first comment whose string is an exact match for the string passed in.

Returns:
true if match found, false otherwise.

Definition at line 204 of file incidencebase.cpp.

void IncidenceBase::clearComments  ) 
 

Delete all comments associated with this incidence.

Definition at line 219 of file incidencebase.cpp.

QStringList IncidenceBase::comments  )  const
 

Return all comments associated with this incidence.

Definition at line 224 of file incidencebase.cpp.

Referenced by KCal::Todo::setHasStartDate().

void IncidenceBase::addAttendee Attendee a,
bool  doUpdate = true
 

Add Attendee to this incidence.

IncidenceBase takes ownership of the Attendee object.

Parameters:
doUpdate If true the Observers are notified, if false they are not.

Definition at line 230 of file incidencebase.cpp.

References KCal::Person::name(), KCal::Person::setName(), and updated().

Referenced by KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

void IncidenceBase::clearAttendees  ) 
 

Remove all Attendees.

Definition at line 263 of file incidencebase.cpp.

const Attendee::List& KCal::IncidenceBase::attendees  )  const [inline]
 

Return list of attendees.

Definition at line 142 of file incidencebase.h.

Referenced by KCal::VCalFormat::eventToVEvent(), and KCal::VCalFormat::eventToVTodo().

int KCal::IncidenceBase::attendeeCount  )  const [inline]
 

Return number of attendees.

Definition at line 146 of file incidencebase.h.

Referenced by KCal::VCalFormat::eventToVEvent(), and KCal::VCalFormat::eventToVTodo().

Attendee * IncidenceBase::attendeeByMail const QString  )  const
 

Return the Attendee with this email address.

Definition at line 269 of file incidencebase.cpp.

Attendee * IncidenceBase::attendeeByMails const QStringList ,
const QString email = QString::null
const
 

Return first Attendee with one of the given email addresses.

Definition at line 279 of file incidencebase.cpp.

Attendee * IncidenceBase::attendeeByUid const QString uid  )  const
 

Return attendee with given uid.

Definition at line 295 of file incidencebase.cpp.

void IncidenceBase::setSyncStatus int  status  ) 
 

Set synchronisation satus.

Definition at line 328 of file incidencebase.cpp.

Referenced by KCal::CalendarLocal::incidenceUpdated(), KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

int IncidenceBase::syncStatus  )  const
 

Return synchronisation status.

Definition at line 334 of file incidencebase.cpp.

Referenced by KCal::VCalFormat::eventToVEvent(), and KCal::VCalFormat::eventToVTodo().

void IncidenceBase::setPilotId unsigned long  id  ) 
 

Set Pilot Id.

Definition at line 339 of file incidencebase.cpp.

Referenced by KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

unsigned long IncidenceBase::pilotId  )  const
 

Return Pilot Id.

Definition at line 346 of file incidencebase.cpp.

Referenced by KCal::VCalFormat::eventToVEvent(), and KCal::VCalFormat::eventToVTodo().

void IncidenceBase::registerObserver Observer *   ) 
 

Register observer.

The observer is notified when the observed object changes.

Definition at line 351 of file incidencebase.cpp.

Referenced by KCal::CalendarLocal::addEvent(), KCal::CalendarLocal::addJournal(), and KCal::CalendarLocal::addTodo().

void IncidenceBase::unRegisterObserver Observer *   ) 
 

Unregister observer.

It isn't notified anymore about changes.

Definition at line 356 of file incidencebase.cpp.

void IncidenceBase::updated  ) 
 

Call this to notify the observers after the IncidenceBas object has changed.

Definition at line 361 of file incidencebase.cpp.

Referenced by KCal::Incidence::addAlarm(), KCal::Incidence::addAttachment(), addAttendee(), KCal::Incidence::addExDate(), KCal::Incidence::addExDateTime(), KCal::Alarm::addMailAddress(), KCal::Alarm::addMailAttachment(), KCal::Incidence::clearAlarms(), KCal::Incidence::removeAlarm(), KCal::Alarm::setAudioAlarm(), KCal::Alarm::setAudioFile(), KCal::Incidence::setCategories(), KCal::Todo::setCompleted(), KCal::Incidence::setCustomStatus(), KCal::Incidence::setDescription(), KCal::Alarm::setDisplayAlarm(), KCal::Todo::setDtDue(), KCal::Event::setDtEnd(), setDtStart(), KCal::Alarm::setEmailAlarm(), KCal::Alarm::setEnabled(), KCal::Alarm::setEndOffset(), KCal::Incidence::setExDates(), KCal::Incidence::setExDateTimes(), setFloats(), KCal::Todo::setHasDueDate(), KCal::Todo::setHasStartDate(), KCal::Incidence::setLocation(), KCal::Alarm::setMailAddress(), KCal::Alarm::setMailAddresses(), KCal::Alarm::setMailAttachment(), KCal::Alarm::setMailAttachments(), KCal::Alarm::setMailSubject(), KCal::Alarm::setMailText(), setOrganizer(), KCal::Todo::setPercentComplete(), KCal::Incidence::setPriority(), KCal::Alarm::setProcedureAlarm(), KCal::Alarm::setProgramArguments(), KCal::Alarm::setProgramFile(), KCal::Incidence::setRelatedToUid(), KCal::Alarm::setRepeatCount(), KCal::Incidence::setResources(), KCal::Incidence::setRevision(), KCal::Incidence::setSecrecy(), KCal::Alarm::setSnoozeTime(), KCal::Alarm::setStartOffset(), KCal::Incidence::setStatus(), KCal::Incidence::setSummary(), KCal::Alarm::setText(), KCal::Alarm::setTime(), KCal::Event::setTransparency(), KCal::Alarm::setType(), setUid(), and KCal::Alarm::toggleAlarm().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for libkcal Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:20 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003