summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/otodo.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/otodo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/otodo.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp
index c84eeeb..38b93f7 100644
--- a/libopie2/opiepim/otodo.cpp
+++ b/libopie2/opiepim/otodo.cpp
@@ -276,13 +276,13 @@ QString OTodo::toRichText() const
276 // summary 276 // summary
277 text += "<b><h3><img src=\"todo/TodoList\">"; 277 text += "<b><h3><img src=\"todo/TodoList\">";
278 if ( !summary().isEmpty() ) { 278 if ( !summary().isEmpty() ) {
279 text += Qtopia::escapeString(summary() ).replace(QRegExp( "[\n]"), "" ); 279 text += Qtopia::escapeString(summary() ).replace(QRegExp( "[\n]"), "" );
280 } 280 }
281 text += "</h3></b><br><hr><br>"; 281 text += "</h3></b><br><hr><br>";
282 282
283 // description 283 // description
284 if( !description().isEmpty() ){ 284 if( !description().isEmpty() ){
285 text += "<b>" + QObject::tr( "Description:" ) + "</b><br>"; 285 text += "<b>" + QObject::tr( "Description:" ) + "</b><br>";
286 text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ; 286 text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ;
287 } 287 }
288 288
@@ -303,33 +303,33 @@ QString OTodo::toRichText() const
303 case 4 : text += QObject::tr( "Low" ); 303 case 4 : text += QObject::tr( "Low" );
304 break; 304 break;
305 case 5 : text += QObject::tr( "Very low" ); 305 case 5 : text += QObject::tr( "Very low" );
306 break; 306 break;
307 }; 307 };
308 text += "<br>"; 308 text += "<br>";
309 309
310 // progress 310 // progress
311 text += "<b>" + QObject::tr( "Progress:") + " </b>" 311 text += "<b>" + QObject::tr( "Progress:") + " </b>"
312 + QString::number( progress() ) + " %<br>"; 312 + QString::number( progress() ) + " %<br>";
313 313
314 // due date 314 // due date
315 if (hasDueDate() ){ 315 if (hasDueDate() ){
316 QDate dd = dueDate(); 316 QDate dd = dueDate();
317 int off = QDate::currentDate().daysTo( dd ); 317 int off = QDate::currentDate().daysTo( dd );
318 318
319 text += "<b>" + QObject::tr( "Deadline:" ) + " </b><font color=\""; 319 text += "<b>" + QObject::tr( "Deadline:" ) + " </b><font color=\"";
320 if ( off < 0 ) 320 if ( off < 0 )
321 text += "#FF0000"; 321 text += "#FF0000";
322 else if ( off == 0 ) 322 else if ( off == 0 )
323 text += "#FFFF00"; 323 text += "#FFFF00";
324 else if ( off > 0 ) 324 else if ( off > 0 )
325 text += "#00FF00"; 325 text += "#00FF00";
326 326
327 text += "\">" + dd.toString() + "</font><br>"; 327 text += "\">" + dd.toString() + "</font><br>";
328 } 328 }
329 329
330 // categories 330 // categories
331 text += "<b>" + QObject::tr( "Category:") + "</b> "; 331 text += "<b>" + QObject::tr( "Category:") + "</b> ";
332 text += categoryNames( "Todo List" ).join(", "); 332 text += categoryNames( "Todo List" ).join(", ");
333 text += "<br>"; 333 text += "<br>";
334 334
335 return text; 335 return text;
@@ -457,15 +457,12 @@ QMap<int, QString> OTodo::toMap() const {
457 map.insert( Reminders, ); 457 map.insert( Reminders, );
458 map. 458 map.
459 */ 459 */
460 return map; 460 return map;
461} 461}
462 462
463QMap<QString, QString> OTodo::toExtraMap()const {
464 return data->extra;
465}
466/** 463/**
467 * change or modify looks at the ref count and either 464 * change or modify looks at the ref count and either
468 * creates a new QShared Object or it can modify it 465 * creates a new QShared Object or it can modify it
469 * right in place 466 * right in place
470 */ 467 */
471void OTodo::changeOrModify() { 468void OTodo::changeOrModify() {