author | zautrix <zautrix> | 2004-06-29 11:59:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-29 11:59:46 (UTC) |
commit | da43dbdc6c82453228f34766fc74585615cba938 (patch) (unidiff) | |
tree | 16576932cea08bf117b2d0320b0d5f66ee8ad093 /libkcal/calendar.h | |
parent | 627489ea2669d3997676bc3cee0f5d0d0c16c4d4 (diff) | |
download | kdepimpi-da43dbdc6c82453228f34766fc74585615cba938.zip kdepimpi-da43dbdc6c82453228f34766fc74585615cba938.tar.gz kdepimpi-da43dbdc6c82453228f34766fc74585615cba938.tar.bz2 |
New lib ical.Some minor changes as well.
-rw-r--r-- | libkcal/calendar.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 7a85e74..7d23619 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h | |||
@@ -59,192 +59,193 @@ class CalFilter; | |||
59 | */ | 59 | */ |
60 | class Calendar : public QObject, public CustomProperties, | 60 | class Calendar : public QObject, public CustomProperties, |
61 | public IncidenceBase::Observer | 61 | public IncidenceBase::Observer |
62 | { | 62 | { |
63 | Q_OBJECT | 63 | Q_OBJECT |
64 | public: | 64 | public: |
65 | Calendar(); | 65 | Calendar(); |
66 | Calendar(const QString &timeZoneId); | 66 | Calendar(const QString &timeZoneId); |
67 | virtual ~Calendar(); | 67 | virtual ~Calendar(); |
68 | void deleteIncidence(Incidence *in); | 68 | void deleteIncidence(Incidence *in); |
69 | /** | 69 | /** |
70 | Clears out the current calendar, freeing all used memory etc. | 70 | Clears out the current calendar, freeing all used memory etc. |
71 | */ | 71 | */ |
72 | virtual void close() = 0; | 72 | virtual void close() = 0; |
73 | 73 | ||
74 | /** | 74 | /** |
75 | Sync changes in memory to persistant storage. | 75 | Sync changes in memory to persistant storage. |
76 | */ | 76 | */ |
77 | virtual void save() = 0; | 77 | virtual void save() = 0; |
78 | 78 | ||
79 | virtual bool isSaving() { return false; } | 79 | virtual bool isSaving() { return false; } |
80 | 80 | ||
81 | /** | 81 | /** |
82 | Return the owner of the calendar's full name. | 82 | Return the owner of the calendar's full name. |
83 | */ | 83 | */ |
84 | const QString &getOwner() const; | 84 | const QString &getOwner() const; |
85 | /** | 85 | /** |
86 | Set the owner of the calendar. Should be owner's full name. | 86 | Set the owner of the calendar. Should be owner's full name. |
87 | */ | 87 | */ |
88 | void setOwner( const QString &os ); | 88 | void setOwner( const QString &os ); |
89 | /** | 89 | /** |
90 | Return the email address of the calendar owner. | 90 | Return the email address of the calendar owner. |
91 | */ | 91 | */ |
92 | const QString &getEmail(); | 92 | const QString &getEmail(); |
93 | /** | 93 | /** |
94 | Set the email address of the calendar owner. | 94 | Set the email address of the calendar owner. |
95 | */ | 95 | */ |
96 | void setEmail( const QString & ); | 96 | void setEmail( const QString & ); |
97 | 97 | ||
98 | /** | 98 | /** |
99 | Set time zone from a timezone string (e.g. -2:00) | 99 | Set time zone from a timezone string (e.g. -2:00) |
100 | */ | 100 | */ |
101 | void setTimeZone( const QString &tz ); | 101 | void setTimeZone( const QString &tz ); |
102 | /** | 102 | /** |
103 | Set time zone from a minutes value (e.g. -60) | 103 | Set time zone from a minutes value (e.g. -60) |
104 | */ | 104 | */ |
105 | void setTimeZone( int tz ); | 105 | void setTimeZone( int tz ); |
106 | /** | 106 | /** |
107 | Return time zone as offest in minutes. | 107 | Return time zone as offest in minutes. |
108 | */ | 108 | */ |
109 | int getTimeZone() const; | 109 | int getTimeZone() const; |
110 | /** | 110 | /** |
111 | Compute an ISO 8601 format string from the time zone. | 111 | Compute an ISO 8601 format string from the time zone. |
112 | */ | 112 | */ |
113 | QString getTimeZoneStr() const; | 113 | QString getTimeZoneStr() const; |
114 | /** | 114 | /** |
115 | Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal | 115 | Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal |
116 | values). | 116 | values). |
117 | */ | 117 | */ |
118 | void setTimeZoneId( const QString & ); | 118 | void setTimeZoneId( const QString & ); |
119 | /** | 119 | /** |
120 | Return time zone id. | 120 | Return time zone id. |
121 | */ | 121 | */ |
122 | QString timeZoneId() const; | 122 | QString timeZoneId() const; |
123 | /** | 123 | /** |
124 | Use local time, not UTC or a time zone. | 124 | Use local time, not UTC or a time zone. |
125 | */ | 125 | */ |
126 | void setLocalTime(); | 126 | void setLocalTime(); |
127 | /** | 127 | /** |
128 | Return whether local time is being used. | 128 | Return whether local time is being used. |
129 | */ | 129 | */ |
130 | bool isLocalTime() const; | 130 | bool isLocalTime() const; |
131 | 131 | ||
132 | /** | 132 | /** |
133 | Add an incidence to calendar. | 133 | Add an incidence to calendar. |
134 | 134 | ||
135 | @return true on success, false on error. | 135 | @return true on success, false on error. |
136 | */ | 136 | */ |
137 | virtual bool addIncidence( Incidence * ); | 137 | virtual bool addIncidence( Incidence * ); |
138 | /** | 138 | /** |
139 | Return filtered list of all incidences of this calendar. | 139 | Return filtered list of all incidences of this calendar. |
140 | */ | 140 | */ |
141 | virtual QPtrList<Incidence> incidences(); | 141 | virtual QPtrList<Incidence> incidences(); |
142 | 142 | ||
143 | /** | 143 | /** |
144 | Return unfiltered list of all incidences of this calendar. | 144 | Return unfiltered list of all incidences of this calendar. |
145 | */ | 145 | */ |
146 | virtual QPtrList<Incidence> rawIncidences(); | 146 | virtual QPtrList<Incidence> rawIncidences(); |
147 | 147 | ||
148 | /** | 148 | /** |
149 | Adds a Event to this calendar object. | 149 | Adds a Event to this calendar object. |
150 | @param anEvent a pointer to the event to add | 150 | @param anEvent a pointer to the event to add |
151 | 151 | ||
152 | @return true on success, false on error. | 152 | @return true on success, false on error. |
153 | */ | 153 | */ |
154 | virtual bool addEventNoDup( Event *event ) = 0; | 154 | virtual bool addEventNoDup( Event *event ) = 0; |
155 | virtual bool addAnniversaryNoDup( Event *event ) = 0; | ||
155 | virtual bool addEvent( Event *anEvent ) = 0; | 156 | virtual bool addEvent( Event *anEvent ) = 0; |
156 | /** | 157 | /** |
157 | Delete event from calendar. | 158 | Delete event from calendar. |
158 | */ | 159 | */ |
159 | virtual void deleteEvent( Event * ) = 0; | 160 | virtual void deleteEvent( Event * ) = 0; |
160 | /** | 161 | /** |
161 | Retrieves an event on the basis of the unique string ID. | 162 | Retrieves an event on the basis of the unique string ID. |
162 | */ | 163 | */ |
163 | virtual Event *event( const QString &UniqueStr ) = 0; | 164 | virtual Event *event( const QString &UniqueStr ) = 0; |
164 | virtual Event *event( int ) = 0; | 165 | virtual Event *event( int ) = 0; |
165 | /** | 166 | /** |
166 | Builds and then returns a list of all events that match for the | 167 | Builds and then returns a list of all events that match for the |
167 | date specified. useful for dayView, etc. etc. | 168 | date specified. useful for dayView, etc. etc. |
168 | The calendar filter is applied. | 169 | The calendar filter is applied. |
169 | */ | 170 | */ |
170 | QPtrList<Event> events( const QDate &date, bool sorted = false); | 171 | QPtrList<Event> events( const QDate &date, bool sorted = false); |
171 | /** | 172 | /** |
172 | Get events, which occur on the given date. | 173 | Get events, which occur on the given date. |
173 | The calendar filter is applied. | 174 | The calendar filter is applied. |
174 | */ | 175 | */ |
175 | QPtrList<Event> events( const QDateTime &qdt ); | 176 | QPtrList<Event> events( const QDateTime &qdt ); |
176 | /** | 177 | /** |
177 | Get events in a range of dates. If inclusive is set to true, only events | 178 | Get events in a range of dates. If inclusive is set to true, only events |
178 | are returned, which are completely included in the range. | 179 | are returned, which are completely included in the range. |
179 | The calendar filter is applied. | 180 | The calendar filter is applied. |
180 | */ | 181 | */ |
181 | QPtrList<Event> events( const QDate &start, const QDate &end, | 182 | QPtrList<Event> events( const QDate &start, const QDate &end, |
182 | bool inclusive = false); | 183 | bool inclusive = false); |
183 | /** | 184 | /** |
184 | Return filtered list of all events in calendar. | 185 | Return filtered list of all events in calendar. |
185 | */ | 186 | */ |
186 | virtual QPtrList<Event> events(); | 187 | virtual QPtrList<Event> events(); |
187 | /** | 188 | /** |
188 | Return unfiltered list of all events in calendar. | 189 | Return unfiltered list of all events in calendar. |
189 | */ | 190 | */ |
190 | virtual QPtrList<Event> rawEvents() = 0; | 191 | virtual QPtrList<Event> rawEvents() = 0; |
191 | 192 | ||
192 | /** | 193 | /** |
193 | Add a todo to the todolist. | 194 | Add a todo to the todolist. |
194 | 195 | ||
195 | @return true on success, false on error. | 196 | @return true on success, false on error. |
196 | */ | 197 | */ |
197 | virtual bool addTodo( Todo *todo ) = 0; | 198 | virtual bool addTodo( Todo *todo ) = 0; |
198 | virtual bool addTodoNoDup( Todo *todo ) = 0; | 199 | virtual bool addTodoNoDup( Todo *todo ) = 0; |
199 | /** | 200 | /** |
200 | Remove a todo from the todolist. | 201 | Remove a todo from the todolist. |
201 | */ | 202 | */ |
202 | virtual void deleteTodo( Todo * ) = 0; | 203 | virtual void deleteTodo( Todo * ) = 0; |
203 | virtual void deleteJournal( Journal * ) = 0; | 204 | virtual void deleteJournal( Journal * ) = 0; |
204 | /** | 205 | /** |
205 | Return filterd list of todos. | 206 | Return filterd list of todos. |
206 | */ | 207 | */ |
207 | virtual QPtrList<Todo> todos(); | 208 | virtual QPtrList<Todo> todos(); |
208 | /** | 209 | /** |
209 | Searches todolist for an event with this unique string identifier, | 210 | Searches todolist for an event with this unique string identifier, |
210 | returns a pointer or null. | 211 | returns a pointer or null. |
211 | */ | 212 | */ |
212 | virtual Todo *todo( const QString &uid ) = 0; | 213 | virtual Todo *todo( const QString &uid ) = 0; |
213 | virtual Todo *todo( int ) = 0; | 214 | virtual Todo *todo( int ) = 0; |
214 | /** | 215 | /** |
215 | Returns list of todos due on the specified date. | 216 | Returns list of todos due on the specified date. |
216 | */ | 217 | */ |
217 | virtual QPtrList<Todo> todos( const QDate &date ) = 0; | 218 | virtual QPtrList<Todo> todos( const QDate &date ) = 0; |
218 | /** | 219 | /** |
219 | Return unfiltered list of todos. | 220 | Return unfiltered list of todos. |
220 | */ | 221 | */ |
221 | virtual QPtrList<Todo> rawTodos() = 0; | 222 | virtual QPtrList<Todo> rawTodos() = 0; |
222 | 223 | ||
223 | /** | 224 | /** |
224 | Add a Journal entry to calendar. | 225 | Add a Journal entry to calendar. |
225 | 226 | ||
226 | @return true on success, false on error. | 227 | @return true on success, false on error. |
227 | */ | 228 | */ |
228 | virtual bool addJournal( Journal * ) = 0; | 229 | virtual bool addJournal( Journal * ) = 0; |
229 | /** | 230 | /** |
230 | Return Journal for given date. | 231 | Return Journal for given date. |
231 | */ | 232 | */ |
232 | virtual Journal *journal( const QDate & ) = 0; | 233 | virtual Journal *journal( const QDate & ) = 0; |
233 | /** | 234 | /** |
234 | Return Journal with given UID. | 235 | Return Journal with given UID. |
235 | */ | 236 | */ |
236 | virtual Journal *journal( const QString &UID ) = 0; | 237 | virtual Journal *journal( const QString &UID ) = 0; |
237 | /** | 238 | /** |
238 | Return list of all Journal entries. | 239 | Return list of all Journal entries. |
239 | */ | 240 | */ |
240 | virtual QPtrList<Journal> journals() = 0; | 241 | virtual QPtrList<Journal> journals() = 0; |
241 | 242 | ||
242 | /** | 243 | /** |
243 | Searches all incidence types for an incidence with this unique | 244 | Searches all incidence types for an incidence with this unique |
244 | string identifier, returns a pointer or null. | 245 | string identifier, returns a pointer or null. |
245 | */ | 246 | */ |
246 | Incidence* incidence( const QString&UID ); | 247 | Incidence* incidence( const QString&UID ); |
247 | 248 | ||
248 | /** | 249 | /** |
249 | Setup relations for an incidence. | 250 | Setup relations for an incidence. |
250 | */ | 251 | */ |