-rw-r--r-- | libopie/pim/otodo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp index cde2b3d..b4d4aa9 100644 --- a/libopie/pim/otodo.cpp +++ b/libopie/pim/otodo.cpp | |||
@@ -210,97 +210,97 @@ void OTodo::setRecurrence( const ORecur& rec) { | |||
210 | void OTodo::setMaintainer( const OPimMaintainer& pim ) { | 210 | void OTodo::setMaintainer( const OPimMaintainer& pim ) { |
211 | changeOrModify(); | 211 | changeOrModify(); |
212 | data->maintainer = pim; | 212 | data->maintainer = pim; |
213 | } | 213 | } |
214 | bool OTodo::isOverdue( ) | 214 | bool OTodo::isOverdue( ) |
215 | { | 215 | { |
216 | if( data->hasDate && !data->isCompleted) | 216 | if( data->hasDate && !data->isCompleted) |
217 | return QDate::currentDate() > data->date; | 217 | return QDate::currentDate() > data->date; |
218 | return false; | 218 | return false; |
219 | } | 219 | } |
220 | void OTodo::setProgress(ushort progress ) | 220 | void OTodo::setProgress(ushort progress ) |
221 | { | 221 | { |
222 | changeOrModify(); | 222 | changeOrModify(); |
223 | data->prog = progress; | 223 | data->prog = progress; |
224 | } | 224 | } |
225 | QString OTodo::toShortText() const { | 225 | QString OTodo::toShortText() const { |
226 | return summary(); | 226 | return summary(); |
227 | } | 227 | } |
228 | /*! | 228 | /*! |
229 | Returns a richt text string | 229 | Returns a richt text string |
230 | */ | 230 | */ |
231 | QString OTodo::toRichText() const | 231 | QString OTodo::toRichText() const |
232 | { | 232 | { |
233 | QString text; | 233 | QString text; |
234 | QStringList catlist; | 234 | QStringList catlist; |
235 | 235 | ||
236 | // Description of the todo | 236 | // Description of the todo |
237 | if ( !summary().isEmpty() ) { | 237 | if ( !summary().isEmpty() ) { |
238 | text += "<b>" + QObject::tr( "Summary:") + "</b><br>"; | 238 | text += "<b>" + QObject::tr( "Summary:") + "</b><br>"; |
239 | text += Qtopia::escapeString(summary() ).replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; | 239 | text += Qtopia::escapeString(summary() ).replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; |
240 | } | 240 | } |
241 | if( !description().isEmpty() ){ | 241 | if( !description().isEmpty() ){ |
242 | text += "<b>" + QObject::tr( "Description:" ) + "</b><br>"; | 242 | text += "<b>" + QObject::tr( "Description:" ) + "</b><br>"; |
243 | text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ; | 243 | text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ; |
244 | } | 244 | } |
245 | text += "<br><br><br>"; | 245 | text += "<br><br><br>"; |
246 | 246 | ||
247 | text += "<b>" + QObject::tr( "Priority:") +" </b>" | 247 | text += "<b>" + QObject::tr( "Priority:") +" </b>" |
248 | + QString::number( priority() ) + " <br>"; | 248 | + QString::number( priority() ) + " <br>"; |
249 | text += "<b>" + QObject::tr( "Progress:") + " </b>" | 249 | text += "<b>" + QObject::tr( "Progress:") + " </b>" |
250 | + QString::number( progress() ) + " %<br>"; | 250 | + QString::number( progress() ) + " %<br>"; |
251 | if (hasDueDate() ){ | 251 | if (hasDueDate() ){ |
252 | text += "<b>" + QObject::tr( "Deadline:") + " </b>"; | 252 | text += "<b>" + QObject::tr( "Deadline:") + " </b>"; |
253 | text += dueDate().toString(); | 253 | text += dueDate().toString(); |
254 | text += "<br>"; | 254 | text += "<br>"; |
255 | } | 255 | } |
256 | 256 | ||
257 | text += "<b>" + QObject::tr( "Category:") + "</b> "; | 257 | text += "<b>" + QObject::tr( "Category:") + "</b> "; |
258 | text += categoryNames().join(", "); | 258 | text += categoryNames( "Todo List" ).join(", "); |
259 | text += "<br>"; | 259 | text += "<br>"; |
260 | 260 | ||
261 | return text; | 261 | return text; |
262 | } | 262 | } |
263 | OPimNotifyManager& OTodo::notifiers() { | 263 | OPimNotifyManager& OTodo::notifiers() { |
264 | return data->notifiers; | 264 | return data->notifiers; |
265 | } | 265 | } |
266 | 266 | ||
267 | bool OTodo::operator<( const OTodo &toDoEvent )const{ | 267 | bool OTodo::operator<( const OTodo &toDoEvent )const{ |
268 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; | 268 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; |
269 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; | 269 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; |
270 | if( hasDueDate() && toDoEvent.hasDueDate() ){ | 270 | if( hasDueDate() && toDoEvent.hasDueDate() ){ |
271 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide | 271 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide |
272 | return priority() < toDoEvent.priority(); | 272 | return priority() < toDoEvent.priority(); |
273 | }else{ | 273 | }else{ |
274 | return dueDate() < toDoEvent.dueDate(); | 274 | return dueDate() < toDoEvent.dueDate(); |
275 | } | 275 | } |
276 | } | 276 | } |
277 | return false; | 277 | return false; |
278 | } | 278 | } |
279 | bool OTodo::operator<=(const OTodo &toDoEvent )const | 279 | bool OTodo::operator<=(const OTodo &toDoEvent )const |
280 | { | 280 | { |
281 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; | 281 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; |
282 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return true; | 282 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return true; |
283 | if( hasDueDate() && toDoEvent.hasDueDate() ){ | 283 | if( hasDueDate() && toDoEvent.hasDueDate() ){ |
284 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide | 284 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide |
285 | return priority() <= toDoEvent.priority(); | 285 | return priority() <= toDoEvent.priority(); |
286 | }else{ | 286 | }else{ |
287 | return dueDate() <= toDoEvent.dueDate(); | 287 | return dueDate() <= toDoEvent.dueDate(); |
288 | } | 288 | } |
289 | } | 289 | } |
290 | return true; | 290 | return true; |
291 | } | 291 | } |
292 | bool OTodo::operator>(const OTodo &toDoEvent )const | 292 | bool OTodo::operator>(const OTodo &toDoEvent )const |
293 | { | 293 | { |
294 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return false; | 294 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return false; |
295 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; | 295 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; |
296 | if( hasDueDate() && toDoEvent.hasDueDate() ){ | 296 | if( hasDueDate() && toDoEvent.hasDueDate() ){ |
297 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide | 297 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide |
298 | return priority() > toDoEvent.priority(); | 298 | return priority() > toDoEvent.priority(); |
299 | }else{ | 299 | }else{ |
300 | return dueDate() > toDoEvent.dueDate(); | 300 | return dueDate() > toDoEvent.dueDate(); |
301 | } | 301 | } |
302 | } | 302 | } |
303 | return false; | 303 | return false; |
304 | } | 304 | } |
305 | bool OTodo::operator>=(const OTodo &toDoEvent )const | 305 | bool OTodo::operator>=(const OTodo &toDoEvent )const |
306 | { | 306 | { |