22#ifndef KCAL_INCIDENCEBASE_H
23#define KCAL_INCIDENCEBASE_H
25#include <tqdatetime.h>
26#include <tqstringlist.h>
27#include <tqvaluelist.h>
30#include "customproperties.h"
35typedef TQValueList<TQDate> DateList;
36typedef TQValueList<TQDateTime> DateTimeList;
88 virtual ~Observer() {}
89 virtual void incidenceUpdated( IncidenceBase * ) = 0;
90 virtual void incidenceUpdatedSilent( IncidenceBase * ) {};
94 IncidenceBase(
const IncidenceBase & );
95 virtual ~IncidenceBase();
97 IncidenceBase& operator=(
const IncidenceBase &i );
98 bool operator==(
const IncidenceBase & )
const;
109 virtual TQCString type()
const = 0;
112 void setUid(
const TQString & );
114 TQString uid()
const;
117 void setLastModified(
const TQDateTime &lm );
119 TQDateTime lastModified()
const;
122 void setOrganizer(
const Person &o );
123 void setOrganizer(
const TQString &o );
127 virtual void setReadOnly(
bool );
132 virtual void setDtStart(
const TQDateTime &dtStart );
135 virtual TQDateTime dtStart()
const;
142 virtual TDE_DEPRECATED TQString dtStartTimeStr()
const;
149 virtual TDE_DEPRECATED TQString dtStartDateStr(
bool shortfmt =
true )
const;
155 virtual TDE_DEPRECATED TQString dtStartStr()
const;
157 virtual void setDuration(
int seconds );
158 int duration()
const;
159 void setHasDuration(
bool );
160 bool hasDuration()
const;
164 bool doesFloat()
const;
166 void setFloats(
bool f );
179 void addComment(
const TQString& comment);
189 bool removeComment(
const TQString& comment );
192 void clearComments();
195 TQStringList comments()
const;
204 void addAttendee(
Attendee *attendee,
bool doUpdate =
true );
208 void clearAttendees();
212 const Attendee::List &
attendees()
const {
return mAttendees; };
220 Attendee *attendeeByMail(
const TQString & )
const;
224 Attendee *attendeeByMails(
const TQStringList &,
225 const TQString &email = TQString() )
const;
229 Attendee *attendeeByUid(
const TQString &uid )
const;
234 enum { SYNCNONE = 0, SYNCMOD = 1, SYNCDEL = 3 };
238 void setSyncStatus(
int status );
239 void setSyncStatusSilent(
int status );
243 int syncStatus()
const;
248 void setPilotId(
unsigned long id );
252 unsigned long pilotId()
const;
258 void registerObserver( Observer * );
262 void unRegisterObserver( Observer * );
268 void updatedSilent();
275 virtual void customPropertyUpdated();
284 TQDateTime mLastModified;
285 Attendee::List mAttendees;
286 TQStringList mComments;
294 unsigned long mPilotId;
297 TQPtrList<Observer> mObservers;
This class represents information related to an attendee of an event.
CustomProperties()
Construct a new empty custom properties instance.
This class provides an Event in the sense of RFC2445.
This class provides information about free/busy time of a calendar user.
This class provides the interface for a visitor of calendar components.
virtual bool visit(FreeBusy *)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
virtual bool visit(Todo *)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
virtual bool visit(Journal *)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
virtual bool visit(Event *)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
Visitor()
Constructor is protected to prevent direct creation of visitor base class.
virtual ~Visitor()
Destruct Incidence::Visitor.
int attendeeCount() const
Return number of attendees.
const Attendee::List & attendees() const
Return list of attendees.
virtual bool accept(Visitor &)
Accept IncidenceVisitor.
bool isReadOnly() const
Return if the object is read-only.
This class provides a Journal in the sense of RFC2445.
This class represents a person.
This class provides a Todo in the sense of RFC2445.
Namespace KCal is for global classes, objects and/or functions in libkcal.