22 #ifndef KCAL_INCIDENCEBASE_H
23 #define KCAL_INCIDENCEBASE_H
25 #include <tqdatetime.h>
26 #include <tqstringlist.h>
27 #include <tqvaluelist.h>
28 #include <tqptrlist.h>
30 #include "customproperties.h"
35 typedef TQValueList<TQDate> DateList;
36 typedef 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 KDE_DEPRECATED TQString dtStartTimeStr() const;
149 virtual KDE_DEPRECATED TQString dtStartDateStr( bool shortfmt = true ) const;
155 virtual KDE_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();
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;
|