summaryrefslogtreecommitdiffabout
path: root/libkcal/incidencebase.h
Unidiff
Diffstat (limited to 'libkcal/incidencebase.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/incidencebase.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h
index bccf287..bed73db 100644
--- a/libkcal/incidencebase.h
+++ b/libkcal/incidencebase.h
@@ -57,129 +57,130 @@ class IncidenceBase : public CustomProperties
57 /** Set the unique id for the event */ 57 /** Set the unique id for the event */
58 void setUid(const QString &); 58 void setUid(const QString &);
59 /** Return the unique id for the event */ 59 /** Return the unique id for the event */
60 QString uid() const; 60 QString uid() const;
61 61
62 /** Sets the time the incidence was last modified. */ 62 /** Sets the time the incidence was last modified. */
63 void setLastModified(const QDateTime &lm); 63 void setLastModified(const QDateTime &lm);
64 /** Return the time the incidence was last modified. */ 64 /** Return the time the incidence was last modified. */
65 QDateTime lastModified() const; 65 QDateTime lastModified() const;
66 66
67 /** sets the organizer for the event */ 67 /** sets the organizer for the event */
68 void setOrganizer(const QString &o); 68 void setOrganizer(const QString &o);
69 QString organizer() const; 69 QString organizer() const;
70 70
71 /** Set readonly status. */ 71 /** Set readonly status. */
72 virtual void setReadOnly( bool ); 72 virtual void setReadOnly( bool );
73 /** Return if the object is read-only. */ 73 /** Return if the object is read-only. */
74 bool isReadOnly() const { return mReadOnly; } 74 bool isReadOnly() const { return mReadOnly; }
75 75
76 /** for setting the event's starting date/time with a QDateTime. */ 76 /** for setting the event's starting date/time with a QDateTime. */
77 virtual void setDtStart(const QDateTime &dtStart); 77 virtual void setDtStart(const QDateTime &dtStart);
78 /** returns an event's starting date/time as a QDateTime. */ 78 /** returns an event's starting date/time as a QDateTime. */
79 virtual QDateTime dtStart() const; 79 virtual QDateTime dtStart() const;
80 /** returns an event's starting time as a string formatted according to the 80 /** returns an event's starting time as a string formatted according to the
81 users locale settings */ 81 users locale settings */
82 QString dtStartTimeStr() const; 82 QString dtStartTimeStr() const;
83 /** returns an event's starting date as a string formatted according to the 83 /** returns an event's starting date as a string formatted according to the
84 users locale settings */ 84 users locale settings */
85 QString dtStartDateStr(bool shortfmt=true) const; 85 QString dtStartDateStr(bool shortfmt=true) const;
86 /** returns an event's starting date and time as a string formatted according 86 /** returns an event's starting date and time as a string formatted according
87 to the users locale settings */ 87 to the users locale settings */
88 QString dtStartStr(bool shortfmt=true) const; 88 QString dtStartStr(bool shortfmt=true) const;
89 89
90 virtual void setDuration(int seconds); 90 virtual void setDuration(int seconds);
91 int duration() const; 91 int duration() const;
92 void setHasDuration(bool); 92 void setHasDuration(bool);
93 bool hasDuration() const; 93 bool hasDuration() const;
94 94
95 /** Return true or false depending on whether the incidence "floats," 95 /** Return true or false depending on whether the incidence "floats,"
96 * i.e. has a date but no time attached to it. */ 96 * i.e. has a date but no time attached to it. */
97 bool doesFloat() const; 97 bool doesFloat() const;
98 /** Set whether the incidence floats, i.e. has a date but no time attached to it. */ 98 /** Set whether the incidence floats, i.e. has a date but no time attached to it. */
99 void setFloats(bool f); 99 void setFloats(bool f);
100 100
101 /** 101 /**
102 Add Attendee to this incidence. IncidenceBase takes ownership of the 102 Add Attendee to this incidence. IncidenceBase takes ownership of the
103 Attendee object. 103 Attendee object.
104 */ 104 */
105 bool addAttendee(Attendee *a, bool doupdate=true ); 105 bool addAttendee(Attendee *a, bool doupdate=true );
106// void removeAttendee(Attendee *a); 106// void removeAttendee(Attendee *a);
107// void removeAttendee(const char *n); 107// void removeAttendee(const char *n);
108 /** Remove all Attendees. */ 108 /** Remove all Attendees. */
109 void clearAttendees(); 109 void clearAttendees();
110 /** Return list of attendees. */ 110 /** Return list of attendees. */
111 QPtrList<Attendee> attendees() const { return mAttendees; }; 111 QPtrList<Attendee> attendees() const { return mAttendees; };
112 /** Return number of attendees. */ 112 /** Return number of attendees. */
113 int attendeeCount() const { return mAttendees.count(); }; 113 int attendeeCount() const { return mAttendees.count(); };
114 /** Return the Attendee with this email */ 114 /** Return the Attendee with this email */
115 Attendee* attendeeByMail(const QString &); 115 Attendee* attendeeByMail(const QString &);
116 /** Return first Attendee with one of this emails */ 116 /** Return first Attendee with one of this emails */
117 Attendee* attendeeByMails(const QStringList &, const QString& email = QString::null); 117 Attendee* attendeeByMails(const QStringList &, const QString& email = QString::null);
118 118
119 /** pilot syncronization states */ 119 /** pilot syncronization states */
120 enum { SYNCNONE = 0, SYNCMOD = 1, SYNCDEL = 3 }; 120 enum { SYNCNONE = 0, SYNCMOD = 1, SYNCDEL = 3 };
121 /** Set synchronisation satus. */ 121 /** Set synchronisation satus. */
122 void setSyncStatus(int stat); 122 void setSyncStatus(int stat);
123 /** Return synchronisation status. */ 123 /** Return synchronisation status. */
124 int syncStatus() const; 124 int syncStatus() const;
125 125
126 /** Set Pilot Id. */ 126 /** Set Pilot Id. */
127 void setPilotId(int id); 127 void setPilotId(int id);
128 /** Return Pilot Id. */ 128 /** Return Pilot Id. */
129 int pilotId() const; 129 int pilotId() const;
130 130
131 void setTempSyncStat(int id); 131 void setTempSyncStat(int id);
132 int tempSyncStat() const; 132 int tempSyncStat() const;
133 void setIDStr( const QString & ); 133 void setIDStr( const QString & );
134 QString IDStr() const; 134 QString IDStr() const;
135 void setID( const QString &, const QString & ); 135 void setID( const QString &, const QString & );
136 QString getID( const QString & ); 136 QString getID( const QString & );
137 void setCsum( const QString &, const QString & ); 137 void setCsum( const QString &, const QString & );
138 QString getCsum( const QString & ); 138 QString getCsum( const QString & );
139 void removeID(const QString &); 139 void removeID(const QString &);
140 140
141 void registerObserver( Observer * ); 141 void registerObserver( Observer * );
142 void unRegisterObserver( Observer * ); 142 void unRegisterObserver( Observer * );
143 void updated(); 143 void updated();
144 void setCalID( int id ); 144 void setCalID( int id );
145 int calID() const; 145 int calID() const;
146 void setCalEnabled( bool ); 146 void setCalEnabled( bool );
147 bool calEnabled() const; 147 bool calEnabled() const;
148 void setAlarmEnabled( bool ); 148 void setAlarmEnabled( bool );
149 bool alarmEnabled() const; 149 bool alarmEnabled() const;
150 bool isTagged() const; 150 bool isTagged() const;
151 void setTagged( bool ); 151 void setTagged( bool );
152 protected: 152 protected:
153 bool blockLastModified;
153 bool mIsTagged; 154 bool mIsTagged;
154 QDateTime mDtStart; 155 QDateTime mDtStart;
155 bool mReadOnly; 156 bool mReadOnly;
156 QDateTime getEvenTime( QDateTime ); 157 QDateTime getEvenTime( QDateTime );
157 158
158 private: 159 private:
159 // base components 160 // base components
160 QString mOrganizer; 161 QString mOrganizer;
161 QString mUid; 162 QString mUid;
162 int mCalID; 163 int mCalID;
163 bool mCalEnabled; 164 bool mCalEnabled;
164 bool mAlarmEnabled; 165 bool mAlarmEnabled;
165 QDateTime mLastModified; 166 QDateTime mLastModified;
166 QPtrList<Attendee> mAttendees; 167 QPtrList<Attendee> mAttendees;
167 168
168 bool mFloats; 169 bool mFloats;
169 170
170 int mDuration; 171 int mDuration;
171 bool mHasDuration; 172 bool mHasDuration;
172 QString mExternalId; 173 QString mExternalId;
173 int mTempSyncStat; 174 int mTempSyncStat;
174 175
175 // PILOT SYNCHRONIZATION STUFF 176 // PILOT SYNCHRONIZATION STUFF
176 int mPilotId; // unique id for pilot sync 177 int mPilotId; // unique id for pilot sync
177 int mSyncStatus; // status (for sync) 178 int mSyncStatus; // status (for sync)
178 179
179 QPtrList<Observer> mObservers; 180 QPtrList<Observer> mObservers;
180}; 181};
181 182
182bool operator==( const IncidenceBase&, const IncidenceBase& ); 183bool operator==( const IncidenceBase&, const IncidenceBase& );
183} 184}
184 185
185#endif 186#endif