31 #ifndef KCALCORE_INCIDENCE_H
32 #define KCALCORE_INCIDENCE_H
34 #include "kcalcore_export.h"
38 #include "recurrence.h"
40 #include <QtCore/QMetaType>
44 #define INVALID_LATLON 255.0
112 typedef QSharedPointer<Incidence>
Ptr;
143 QString instanceIdentifier()
const;
151 void setReadOnly(
bool readonly);
156 void setLastModified(
const KDateTime &lm);
166 void setLocalOnly(
bool localonly);
174 bool localOnly()
const;
179 void setAllDay(
bool allDay);
194 void setCreated(
const KDateTime &dt);
200 KDateTime created()
const;
208 void setRevision(
int rev);
214 int revision()
const;
222 virtual void setDtStart(
const KDateTime &dt);
227 virtual void shiftTimes(
const KDateTime::Spec &oldSpec,
228 const KDateTime::Spec &newSpec);
237 void setDescription(
const QString &description,
bool isRich);
246 void setDescription(
const QString &description);
253 QString description()
const;
260 QString richDescription()
const;
266 bool descriptionIsRich()
const;
275 void setSummary(
const QString &summary,
bool isRich);
283 void setSummary(
const QString &summary);
290 QString summary()
const;
297 QString richSummary()
const;
303 bool summaryIsRich()
const;
312 void setLocation(
const QString &location,
bool isRich);
321 void setLocation(
const QString &location);
328 QString location()
const;
335 QString richLocation()
const;
341 bool locationIsRich()
const;
349 void setCategories(
const QStringList &categories);
358 void setCategories(
const QString &catStr);
364 QStringList categories()
const;
370 QString categoriesStr()
const;
383 void setRelatedTo(
const QString &uid,
RelType relType = RelTypeParent);
396 QString relatedTo(
RelType relType = RelTypeParent)
const;
406 bool hasAltDescription()
const;
414 void setAltDescription(
const QString &altdescription);
420 QString altDescription()
const;
435 void clearRecurrence();
445 ushort recurrenceType()
const;
450 virtual bool recursOn(
const QDate &date,
const KDateTime::Spec &timeSpec)
const;
455 bool recursAt(
const KDateTime &dt)
const;
468 virtual QList<KDateTime> startDateTimesForDate(
470 const KDateTime::Spec &timeSpec = KDateTime::LocalZone)
const;
481 virtual QList<KDateTime> startDateTimesForDateTime(
482 const KDateTime &datetime)
const;
493 virtual KDateTime endDateForStart(
const KDateTime &startDt)
const;
523 void deleteAttachments(
const QString &mime);
543 void clearAttachments();
553 QString writeAttachmentToTempFile(
const Attachment::Ptr &attachment)
const;
559 void clearTempFiles();
571 void setSecrecy(
Secrecy secrecy);
586 void setStatus(
Status status);
595 void setCustomStatus(
const QString &status);
601 QString customStatus()
const;
620 void setResources(
const QStringList &resources);
626 QStringList resources()
const;
636 void setPriority(
int priority);
642 int priority()
const;
655 void setHasGeo(
bool hasGeo);
662 void setGeoLatitude(
float geolatitude);
669 float geoLatitude()
const;
676 void setGeoLongitude(
float geolongitude);
683 float geoLongitude()
const;
689 bool hasRecurrenceId()
const;
698 void setRecurrenceId(
const KDateTime &recurrenceId);
705 KDateTime recurrenceId()
const;
714 void setThisAndFuture(
bool thisAndFuture);
722 bool thisAndFuture()
const;
763 bool hasEnabledAlarms()
const;
793 void setSchedulingID(
const QString &sid,
794 const QString &uid = QString());
801 QString schedulingID()
const;
810 virtual void recurrenceUpdated(
Recurrence *recurrence);
819 virtual QLatin1String iconName(
const KDateTime &recurrenceId = KDateTime())
const = 0;
825 bool supportsGroupwareCommunication()
const;
836 static QStringList mimeTypes();
858 void serialize(QDataStream &out);
859 void deserialize(QDataStream &in);
879 inline uint
qHash(
const QSharedPointer<KCalCore::Incidence> &key)
881 return qHash<KCalCore::Incidence>(key.data());
QSharedPointer< Attachment > Ptr
A shared pointer to an Attachment object.
static uint qHash(const KDateTime &dt)
Private class that helps to provide binary compatibility between releases.
QSharedPointer< Alarm > Ptr
A shared pointer to an Alarm object.
An abstract class that provides a common base for all calendar incidence classes. ...
QVector< Ptr > List
List of attachments.
QVector< Ptr > List
List of alarms.
QSharedPointer< Incidence > Ptr
A shared pointer to an Incidence.
The related incidence is a child.
The related incidence is a parent.
This class represents a recurrence rule for a calendar incidence.
event or to-do canceled; journal removed
This file is part of the API for handling calendar data and defines the Attachment class...
This file is part of the API for handling calendar data and defines the Alarm class.
This file is part of the API for handling calendar data and defines the IncidenceBase class...
QVector< Ptr > List
List of incidences.
Secrecy
The different types of incidence access classifications.
Status
The different types of overall incidence status or confirmation.
RelType
The different types of RELTYPE values specified by the RFC.
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...