25 #include <tqdatetime.h>
26 #include <tqstringlist.h>
27 #include <tqvaluelist.h>
29 #include "recurrence.h"
31 #include "attachment.h"
32 #include "libkcal_export.h"
34 #include "incidencebase.h"
35 #include <tdemacros.h>
41 typedef TQStringList IncidenceList;
42 typedef TQStringList::iterator IncidenceListIterator;
60 bool visit(
Event *e ) {
return mResource->addEvent( e ); }
61 bool visit(
Todo *t ) {
return mResource->addTodo( t ); }
77 : mResource( r ), mSubResource( subResource ) {}
82 return mResource->addEvent( e, mSubResource );
86 return mResource->addTodo( t, mSubResource );
90 return mResource->addJournal( j, mSubResource );
95 TQString mSubResource;
108 bool visit(
Event *e ) { mResource->deleteEvent( e );
return true; }
109 bool visit(
Todo *t ) { mResource->deleteTodo( t );
return true; }
110 bool visit(
Journal *j ) { mResource->deleteJournal( j );
return true; }
118 StatusNone, StatusTentative, StatusConfirmed, StatusCompleted,
119 StatusNeedsAction, StatusCanceled, StatusInProcess, StatusDraft,
125 enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 };
127 typedef ListBase<Incidence> List;
130 Incidence(
const Incidence & );
133 Incidence& operator=(
const Incidence &i );
134 bool operator==(
const Incidence & )
const;
147 void setReadOnly(
bool readonly );
150 void setFloats(
bool f );
162 void setCreated(
const TQDateTime & );
166 TQDateTime created()
const;
171 void setRevision(
int rev );
175 int revision()
const;
180 virtual void setDtStart(
const TQDateTime &dtStart );
184 virtual TQDateTime
dtEnd()
const {
return TQDateTime(); }
189 void setDescription(
const TQString &description );
193 TQString description()
const;
198 void setSummary(
const TQString &summary );
202 TQString summary()
const;
207 void setCategories(
const TQStringList &categories );
211 void setCategories(
const TQString &catStr);
215 TQStringList categories()
const;
219 TQString categoriesStr()
const;
226 void setRelatedToUid(
const TQString &);
232 TQString relatedToUid()
const;
266 void clearRecurrence();
271 bool doesRecur()
const;
272 uint recurrenceType()
const;
278 virtual bool recursOn(
const TQDate &qd )
const;
283 bool recursAt(
const TQDateTime &qdt )
const;
291 virtual bool recursOn(
const TQDate &qd,
Calendar *cal )
const;
298 bool recursAt(
const TQDateTime &qdt,
Calendar *cal )
const;
308 virtual TQValueList<TQDateTime> startDateTimesForDate(
const TQDate &date )
const;
318 virtual TQValueList<TQDateTime> startDateTimesForDateTime(
const TQDateTime &datetime )
const;
321 virtual TQDateTime endDateForStart(
const TQDateTime &startDt )
const;
335 void deleteAttachment(
Attachment *attachment );
339 void deleteAttachments(
const TQString &mime );
351 void clearAttachments();
362 void setSecrecy(
int );
370 TQString secrecyStr()
const;
374 static TQStringList secrecyList();
378 static TQString secrecyName(
int );
384 void setStatus( Status status );
390 void setCustomStatus(
const TQString &status );
394 Status status()
const;
398 TQString statusStr()
const;
402 static TQString statusName( Status );
412 void setResources(
const TQStringList &resources );
416 TQStringList resources()
const;
423 void setPriority(
int priority );
428 int priority()
const;
435 bool hasRecurrenceID()
const;
443 void setHasRecurrenceID(
bool hasRecurrenceID );
451 void setRecurrenceID(
const TQDateTime &recurrenceID );
459 TQDateTime recurrenceID()
const;
466 void addChildIncidence( TQString childIncidence );
473 void deleteChildIncidence( TQString childIncidence );
480 IncidenceList childIncidences()
const;
498 void addAlarm(
Alarm * );
502 void removeAlarm(
Alarm * );
510 bool isAlarmEnabled()
const;
522 void setLocation(
const TQString &location);
526 TQString location()
const;
537 void setSchedulingID(
const TQString& sid );
542 TQString schedulingID()
const;
547 virtual void recurrenceUpdated(
Recurrence * );
559 TQString mDescription;
561 TQStringList mCategories;
563 TQString mRelatedToUid;
566 TQStringList mResources;
568 TQString mStatusString;
579 TQString mSchedulingID;
581 TQDateTime mRecurrenceID;
582 bool mHasRecurrenceID;
584 IncidenceList mChildRecurrenceEvents;
This class represents an alarm notification.
This class represents information related to an attachment.
This is the main "calendar" object class.
This class provides an Event in the sense of RFC2445.
This class provides the interface for a visitor of calendar components.
This class provides the base class common to all calendar components.
This class implements a visitor for adding an Incidence to a resource plus subresource supporting add...
bool visit(Journal *j)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
bool visit(Todo *t)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
bool visit(Event *e)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
This class implements a visitor for adding an Incidence to a resource supporting addEvent(),...
bool visit(Journal *j)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
bool visit(Todo *t)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
bool visit(Event *e)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
This class implements a visitor for deleting an Incidence from a resource supporting deleteEvent(),...
bool visit(Journal *j)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
bool visit(Event *e)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
bool visit(Todo *t)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
This class provides the base class common to all calendar components.
virtual Incidence * clone()=0
Return copy of this object.
virtual TQDateTime dtEnd() const
Return the incidence's ending date/time as a TQDateTime.
Status
Enumeration for describing an event's status.
virtual TQDateTime endDateRecurrenceBase() const
Return the end date/time of the base incidence (e.g.
This class provides a Journal in the sense of RFC2445.
This class represents a recurrence rule for a calendar incidence.
This class provides a Todo in the sense of RFC2445.
Namespace KCal is for global classes, objects and/or functions in libkcal.