summaryrefslogtreecommitdiffabout
path: root/libkcal/incidencebase.h
Unidiff
Diffstat (limited to 'libkcal/incidencebase.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/incidencebase.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h
index 3edc03b..d97f524 100644
--- a/libkcal/incidencebase.h
+++ b/libkcal/incidencebase.h
@@ -16,51 +16,53 @@
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20#ifndef KCAL_INCIDENCEBASE_H 20#ifndef KCAL_INCIDENCEBASE_H
21#define KCAL_INCIDENCEBASE_H 21#define KCAL_INCIDENCEBASE_H
22// 22//
23// Incidence - base class of calendaring components 23// Incidence - base class of calendaring components
24// 24//
25 25
26#include <qdatetime.h> 26#include <qdatetime.h>
27#include <qstringlist.h> 27#include <qstringlist.h>
28#include <qvaluelist.h> 28#include <q3valuelist.h>
29#include <qptrlist.h> 29#include <q3ptrlist.h>
30//Added by qt3to4:
31#include <Q3CString>
30 32
31#include "customproperties.h" 33#include "customproperties.h"
32#include "attendee.h" 34#include "attendee.h"
33 35
34namespace KCal { 36namespace KCal {
35 37
36typedef QValueList<QDate> DateList; 38typedef Q3ValueList<QDate> DateList;
37 enum IncTypeID { eventID,todoID,journalID,freebusyID }; 39 enum IncTypeID { eventID,todoID,journalID,freebusyID };
38 40
39/** 41/**
40 This class provides the base class common to all calendar components. 42 This class provides the base class common to all calendar components.
41*/ 43*/
42class IncidenceBase : public CustomProperties 44class IncidenceBase : public CustomProperties
43{ 45{
44 public: 46 public:
45 class Observer { 47 class Observer {
46 public: 48 public:
47 virtual void incidenceUpdated( IncidenceBase * ) = 0; 49 virtual void incidenceUpdated( IncidenceBase * ) = 0;
48 }; 50 };
49 51
50 IncidenceBase(); 52 IncidenceBase();
51 IncidenceBase(const IncidenceBase &); 53 IncidenceBase(const IncidenceBase &);
52 virtual ~IncidenceBase(); 54 virtual ~IncidenceBase();
53 55
54 virtual QCString type() const = 0; 56 virtual Q3CString type() const = 0;
55 virtual IncTypeID typeID() const = 0; 57 virtual IncTypeID typeID() const = 0;
56 58
57 /** Set the unique id for the event */ 59 /** Set the unique id for the event */
58 void setUid(const QString &); 60 void setUid(const QString &);
59 /** Return the unique id for the event */ 61 /** Return the unique id for the event */
60 QString uid() const; 62 QString uid() const;
61 63
62 /** Sets the time the incidence was last modified. */ 64 /** Sets the time the incidence was last modified. */
63 void setLastModified(const QDateTime &lm); 65 void setLastModified(const QDateTime &lm);
64 /** Return the time the incidence was last modified. */ 66 /** Return the time the incidence was last modified. */
65 QDateTime lastModified() const; 67 QDateTime lastModified() const;
66 QString lastModifiedSortKey() const; 68 QString lastModifiedSortKey() const;
@@ -100,25 +102,25 @@ class IncidenceBase : public CustomProperties
100 void setFloats(bool f); 102 void setFloats(bool f);
101 103
102 /** 104 /**
103 Add Attendee to this incidence. IncidenceBase takes ownership of the 105 Add Attendee to this incidence. IncidenceBase takes ownership of the
104 Attendee object. 106 Attendee object.
105 */ 107 */
106 bool addAttendee(Attendee *a, bool doupdate=true ); 108 bool addAttendee(Attendee *a, bool doupdate=true );
107// void removeAttendee(Attendee *a); 109// void removeAttendee(Attendee *a);
108// void removeAttendee(const char *n); 110// void removeAttendee(const char *n);
109 /** Remove all Attendees. */ 111 /** Remove all Attendees. */
110 void clearAttendees(); 112 void clearAttendees();
111 /** Return list of attendees. */ 113 /** Return list of attendees. */
112 QPtrList<Attendee> attendees() const { return mAttendees; }; 114 Q3PtrList<Attendee> attendees() const { return mAttendees; };
113 /** Return number of attendees. */ 115 /** Return number of attendees. */
114 int attendeeCount() const { return mAttendees.count(); }; 116 int attendeeCount() const { return mAttendees.count(); };
115 /** Return the Attendee with this email */ 117 /** Return the Attendee with this email */
116 Attendee* attendeeByMail(const QString &); 118 Attendee* attendeeByMail(const QString &);
117 /** Return first Attendee with one of this emails */ 119 /** Return first Attendee with one of this emails */
118 Attendee* attendeeByMails(const QStringList &, const QString& email = QString::null); 120 Attendee* attendeeByMails(const QStringList &, const QString& email = QString::null);
119 121
120 /** pilot syncronization states */ 122 /** pilot syncronization states */
121 enum { SYNCNONE = 0, SYNCMOD = 1, SYNCDEL = 3 }; 123 enum { SYNCNONE = 0, SYNCMOD = 1, SYNCDEL = 3 };
122 /** Set synchronisation satus. */ 124 /** Set synchronisation satus. */
123 void setSyncStatus(int stat); 125 void setSyncStatus(int stat);
124 /** Return synchronisation status. */ 126 /** Return synchronisation status. */
@@ -159,32 +161,32 @@ class IncidenceBase : public CustomProperties
159 bool mReadOnly; 161 bool mReadOnly;
160 QDateTime getEvenTime( QDateTime ); 162 QDateTime getEvenTime( QDateTime );
161 163
162 private: 164 private:
163 // base components 165 // base components
164 QString mOrganizer; 166 QString mOrganizer;
165 QString mLastModifiedKey; 167 QString mLastModifiedKey;
166 QString mUid; 168 QString mUid;
167 int mCalID; 169 int mCalID;
168 bool mCalEnabled; 170 bool mCalEnabled;
169 bool mAlarmEnabled; 171 bool mAlarmEnabled;
170 QDateTime mLastModified; 172 QDateTime mLastModified;
171 QPtrList<Attendee> mAttendees; 173 Q3PtrList<Attendee> mAttendees;
172 174
173 bool mFloats; 175 bool mFloats;
174 176
175 int mDuration; 177 int mDuration;
176 bool mHasDuration; 178 bool mHasDuration;
177 QString mExternalId; 179 QString mExternalId;
178 int mTempSyncStat; 180 int mTempSyncStat;
179 181
180 // PILOT SYNCHRONIZATION STUFF 182 // PILOT SYNCHRONIZATION STUFF
181 int mPilotId; // unique id for pilot sync 183 int mPilotId; // unique id for pilot sync
182 int mSyncStatus; // status (for sync) 184 int mSyncStatus; // status (for sync)
183 185
184 QPtrList<Observer> mObservers; 186 Q3PtrList<Observer> mObservers;
185}; 187};
186 188
187bool operator==( const IncidenceBase&, const IncidenceBase& ); 189bool operator==( const IncidenceBase&, const IncidenceBase& );
188} 190}
189 191
190#endif 192#endif