libkcal
KCal::IncidenceBase Class Reference
#include <incidencebase.h>

Detailed Description
This class provides the base class common to all calendar components.Definition at line 45 of file incidencebase.h.
Public Types | |
enum | Field { FieldDtStart, FieldDtEnd, FieldLastModified, FieldDescription, FieldSummary, FieldLocation, FieldCompleted, FieldPercentComplete, FieldDtDue, FieldCategories, FieldRelatedTo, FieldRecurrence, FieldAttachment, FieldSecrecy, FieldStatus, FieldTransparency, FieldResources, FieldPriority, FieldGeoLatitude, FieldGeoLongitude, FieldRecurrenceId, FieldAlarms, FieldSchedulingId, FieldAttendees, FieldOrganizer, FieldCreated, FieldRevision, FieldDuration, FieldContact, FieldComment, FieldUid, FieldUnknown } |
enum | { SYNCNONE = 0, SYNCMOD = 1, SYNCDEL = 3 } |
Public Member Functions | |
IncidenceBase (const IncidenceBase &) | |
IncidenceBase & | operator= (const IncidenceBase &i) |
bool | operator== (const IncidenceBase &) const |
virtual bool | accept (Visitor &) |
virtual QCString | type () const =0 |
void | setUid (const QString &) |
QString | uid () const |
void | setLastModified (const QDateTime &lm) |
QDateTime | lastModified () const |
void | setOrganizer (const Person &o) |
void | setOrganizer (const QString &o) |
Person | organizer () const |
virtual void | setReadOnly (bool) |
bool | isReadOnly () const |
virtual void | setDtStart (const QDateTime &dtStart) |
virtual QDateTime | dtStart () const |
virtual KDE_DEPRECATED QString | dtStartTimeStr () const |
virtual KDE_DEPRECATED QString | dtStartDateStr (bool shortfmt=true) const |
virtual KDE_DEPRECATED 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 (const QString &comment) |
void | clearComments () |
QStringList | comments () const |
void | addAttendee (Attendee *attendee, bool doUpdate=true) |
void | clearAttendees () |
const Attendee::List & | attendees () const |
int | attendeeCount () const |
Attendee * | attendeeByMail (const QString &) const |
Attendee * | attendeeByMails (const QStringList &, const QString &email=QString::null) const |
Attendee * | attendeeByUid (const QString &uid) const |
void | setSyncStatus (int status) |
void | setSyncStatusSilent (int status) |
int | syncStatus () const |
void | setPilotId (unsigned long id) |
unsigned long | pilotId () const |
void | registerObserver (Observer *) |
void | unRegisterObserver (Observer *) |
void | updated () |
void | updatedSilent () |
void | startUpdates () |
void | endUpdates () |
void | cancelUpdates () |
QPtrList< Observer > | observers () const |
QMap< IncidenceBase::Field, bool > | dirtyFields () const |
void | resetDirtyFields () |
void | setFieldDirty (IncidenceBase::Field field) |
Protected Member Functions | |
virtual void | customPropertyUpdated () |
Protected Attributes | |
bool | mReadOnly |
Classes | |
class | Visitor |
This class provides the interface for a visitor of calendar components. More... |
Member Enumeration Documentation
- Enumerator:
Definition at line 50 of file incidencebase.h.
anonymous enum |
Member Function Documentation
virtual bool KCal::IncidenceBase::accept | ( | Visitor & | ) | [inline, virtual] |
Accept IncidenceVisitor.
A class taking part in the visitor mechanism has to provide this implementation:
bool accept(Visitor &v) { return v.visit(this); }
Reimplemented in KCal::Journal.
Definition at line 144 of file incidencebase.h.
void IncidenceBase::setUid | ( | const QString & | uid | ) |
QString IncidenceBase::uid | ( | ) | const |
void IncidenceBase::setLastModified | ( | const QDateTime & | lm | ) |
QDateTime IncidenceBase::lastModified | ( | ) | const |
void IncidenceBase::setOrganizer | ( | const Person & | o | ) |
void IncidenceBase::setReadOnly | ( | bool | readOnly | ) | [virtual] |
Set readonly status.
Reimplemented in KCal::Incidence.
Definition at line 193 of file incidencebase.cpp.
bool KCal::IncidenceBase::isReadOnly | ( | ) | const [inline] |
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 198 of file incidencebase.cpp.
QDateTime IncidenceBase::dtStart | ( | ) | const [virtual] |
returns an event's starting date/time as a QDateTime.
Definition at line 205 of file incidencebase.cpp.
QString IncidenceBase::dtStartTimeStr | ( | ) | const [virtual] |
returns an event's starting time as a string formatted according to the users locale settings.
- Deprecated:
- use IncidenceFormatter::timeToString()
Definition at line 210 of file incidencebase.cpp.
QString IncidenceBase::dtStartDateStr | ( | bool | shortfmt = true |
) | const [virtual] |
returns an event's starting date as a string formatted according to the users locale settings
- Deprecated:
- use IncidenceFormatter::dateToString()
Definition at line 215 of file incidencebase.cpp.
QString IncidenceBase::dtStartStr | ( | ) | const [virtual] |
returns an event's starting date and time as a string formatted according to the users locale settings
- Deprecated:
- use IncidenceFormatter::dateTimeToString()
Definition at line 220 of file incidencebase.cpp.
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 226 of file incidencebase.cpp.
void IncidenceBase::setFloats | ( | bool | f | ) |
Set whether the incidence floats, i.e.
has a date but no time attached to it.
Reimplemented in KCal::Incidence.
Definition at line 231 of file incidencebase.cpp.
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 239 of file incidencebase.cpp.
bool IncidenceBase::removeComment | ( | const 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 245 of file incidencebase.cpp.
void IncidenceBase::clearComments | ( | ) |
Delete all comments associated with this incidence.
Definition at line 261 of file incidencebase.cpp.
QStringList IncidenceBase::comments | ( | ) | const |
Return all comments associated with this incidence.
Definition at line 267 of file incidencebase.cpp.
void IncidenceBase::addAttendee | ( | Attendee * | attendee, | |
bool | doUpdate = true | |||
) |
Add Attendee to this incidence.
IncidenceBase takes ownership of the Attendee object.
- Parameters:
-
attendee a pointer to the attendee to add doUpdate If true the Observers are notified, if false they are not.
Definition at line 273 of file incidencebase.cpp.
void IncidenceBase::clearAttendees | ( | ) |
const Attendee::List& KCal::IncidenceBase::attendees | ( | ) | const [inline] |
int KCal::IncidenceBase::attendeeCount | ( | ) | const [inline] |
Attendee * IncidenceBase::attendeeByMail | ( | const QString & | ) | const |
Attendee * IncidenceBase::attendeeByMails | ( | const QStringList & | emails, | |
const QString & | email = QString::null | |||
) | const |
Return first Attendee with one of the given email addresses.
Definition at line 324 of file incidencebase.cpp.
Attendee * IncidenceBase::attendeeByUid | ( | const QString & | uid | ) | const |
void IncidenceBase::setSyncStatus | ( | int | status | ) |
int IncidenceBase::syncStatus | ( | ) | const |
void IncidenceBase::setPilotId | ( | unsigned long | id | ) |
unsigned long IncidenceBase::pilotId | ( | ) | const |
void IncidenceBase::registerObserver | ( | IncidenceBase::Observer * | observer | ) |
Register observer.
The observer is notified when the observed object changes.
Definition at line 404 of file incidencebase.cpp.
void IncidenceBase::unRegisterObserver | ( | IncidenceBase::Observer * | observer | ) |
Unregister observer.
It isn't notified anymore about changes.
Definition at line 409 of file incidencebase.cpp.
void IncidenceBase::updated | ( | ) |
Call this to notify the observers after the IncidenceBase object has changed.
Definition at line 414 of file incidencebase.cpp.
void IncidenceBase::startUpdates | ( | ) |
Call this when a group of updates is going to be made.
This suppresses change notifications until endUpdates() is called, at which point updated() will automatically be called.
Definition at line 443 of file incidencebase.cpp.
void IncidenceBase::endUpdates | ( | ) |
Call this when a group of updates is complete, to notify observers that the instance has changed.
This should be called in conjunction with startUpdates().
Definition at line 448 of file incidencebase.cpp.
void IncidenceBase::cancelUpdates | ( | ) |
Call this instead of endUpdates() if you don't want to notify observers that the instance has changed.
This should be called in conjunction with startUpdates().
Definition at line 459 of file incidencebase.cpp.
QMap< IncidenceBase::Field, bool > IncidenceBase::dirtyFields | ( | ) | const |
Returns a QMap with all Fields that were changed since the incidence was created or resetDirtyFields() was called.
Only FieldPercentComplete and FieldAttendees are currently set. The rest of this feature will be implemented when it's needed.
- See also:
- resetDirtyFields()
Definition at line 474 of file incidencebase.cpp.
void IncidenceBase::resetDirtyFields | ( | ) |
void IncidenceBase::setFieldDirty | ( | IncidenceBase::Field | field | ) |
Marks Field field
as dirty.
Only FieldPercentComplete and FieldAttendees are currently set. The rest of this feature will be implemented when it's needed.
- See also:
- dirtyFields()
Definition at line 484 of file incidencebase.cpp.
void IncidenceBase::customPropertyUpdated | ( | ) | [protected, virtual] |
Called when a custom property has been changed.
The default implementation does nothing: override in derived classes to perform change processing.
Reimplemented from KCal::CustomProperties.
Definition at line 428 of file incidencebase.cpp.
The documentation for this class was generated from the following files: