summaryrefslogtreecommitdiff
path: root/libopie/pim/otodo.cpp
Side-by-side diff
Diffstat (limited to 'libopie/pim/otodo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/otodo.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp
index c84eeeb..38b93f7 100644
--- a/libopie/pim/otodo.cpp
+++ b/libopie/pim/otodo.cpp
@@ -270,25 +270,25 @@ QString OTodo::toShortText() const {
*/
QString OTodo::toRichText() const
{
QString text;
QStringList catlist;
// summary
text += "<b><h3><img src=\"todo/TodoList\">";
if ( !summary().isEmpty() ) {
text += Qtopia::escapeString(summary() ).replace(QRegExp( "[\n]"), "" );
}
text += "</h3></b><br><hr><br>";
-
+
// description
if( !description().isEmpty() ){
text += "<b>" + QObject::tr( "Description:" ) + "</b><br>";
text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ;
}
// priority
int priorityval = priority();
text += "<b>" + QObject::tr( "Priority:") +" </b><img src=\"todo/priority" +
QString::number( priorityval ) + "\">";
// text += "<b>" + QObject::tr( "Priority:") +"</b><img src=\"todo/priority" +
// QString::number( priority() ) + "\"><br>";
@@ -297,45 +297,45 @@ QString OTodo::toRichText() const
case 1 : text += QObject::tr( "Very high" );
break;
case 2 : text += QObject::tr( "High" );
break;
case 3 : text += QObject::tr( "Normal" );
break;
case 4 : text += QObject::tr( "Low" );
break;
case 5 : text += QObject::tr( "Very low" );
break;
};
text += "<br>";
-
+
// progress
text += "<b>" + QObject::tr( "Progress:") + " </b>"
+ QString::number( progress() ) + " %<br>";
-
+
// due date
if (hasDueDate() ){
QDate dd = dueDate();
int off = QDate::currentDate().daysTo( dd );
-
+
text += "<b>" + QObject::tr( "Deadline:" ) + " </b><font color=\"";
if ( off < 0 )
text += "#FF0000";
else if ( off == 0 )
text += "#FFFF00";
else if ( off > 0 )
text += "#00FF00";
text += "\">" + dd.toString() + "</font><br>";
}
-
+
// categories
text += "<b>" + QObject::tr( "Category:") + "</b> ";
text += categoryNames( "Todo List" ).join(", ");
text += "<br>";
return text;
}
bool OTodo::hasNotifiers()const {
if (!data->notifiers) return false;
return !data->notifiers->isEmpty();
}
OPimNotifyManager& OTodo::notifiers() {
@@ -451,27 +451,24 @@ QMap<int, QString> OTodo::toMap() const {
map.insert( DateMonth, QString::number( data->date.month() ) );
map.insert( DateYear, QString::number( data->date.year() ) );
map.insert( Progress, QString::number( data->prog ) );
// map.insert( CrossReference, crossToString() );
/* FIXME!!! map.insert( State, );
map.insert( Recurrence, );
map.insert( Reminders, );
map.
*/
return map;
}
-QMap<QString, QString> OTodo::toExtraMap()const {
- return data->extra;
-}
/**
* change or modify looks at the ref count and either
* creates a new QShared Object or it can modify it
* right in place
*/
void OTodo::changeOrModify() {
if ( data->count != 1 ) {
qWarning("changeOrModify");
data->deref();
OTodoData* d2 = new OTodoData();
copy(data, d2 );
data = d2;