author | eilers <eilers> | 2003-02-18 11:55:59 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-02-18 11:55:59 (UTC) |
commit | 00e9f7731c19604a8e79df9e935ec833fc1937f8 (patch) (side-by-side diff) | |
tree | 7bf9b8230832e2138af7e73740b28eafc4c33101 /libopie/pim/otodo.cpp | |
parent | 065f26b161f6df269cfbf9c75751c09453350995 (diff) | |
download | opie-00e9f7731c19604a8e79df9e935ec833fc1937f8.zip opie-00e9f7731c19604a8e79df9e935ec833fc1937f8.tar.gz opie-00e9f7731c19604a8e79df9e935ec833fc1937f8.tar.bz2 |
Fixing categoryNames in opimrecord which was just checking for Todo List
Now we get the categories in addressbook, too !
-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) { void OTodo::setMaintainer( const OPimMaintainer& pim ) { changeOrModify(); data->maintainer = pim; } bool OTodo::isOverdue( ) { if( data->hasDate && !data->isCompleted) return QDate::currentDate() > data->date; return false; } void OTodo::setProgress(ushort progress ) { changeOrModify(); data->prog = progress; } QString OTodo::toShortText() const { return summary(); } /*! Returns a richt text string */ QString OTodo::toRichText() const { QString text; QStringList catlist; // Description of the todo if ( !summary().isEmpty() ) { text += "<b>" + QObject::tr( "Summary:") + "</b><br>"; text += Qtopia::escapeString(summary() ).replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; } if( !description().isEmpty() ){ text += "<b>" + QObject::tr( "Description:" ) + "</b><br>"; text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ; } text += "<br><br><br>"; text += "<b>" + QObject::tr( "Priority:") +" </b>" + QString::number( priority() ) + " <br>"; text += "<b>" + QObject::tr( "Progress:") + " </b>" + QString::number( progress() ) + " %<br>"; if (hasDueDate() ){ text += "<b>" + QObject::tr( "Deadline:") + " </b>"; text += dueDate().toString(); text += "<br>"; } text += "<b>" + QObject::tr( "Category:") + "</b> "; - text += categoryNames().join(", "); + text += categoryNames( "Todo List" ).join(", "); text += "<br>"; return text; } OPimNotifyManager& OTodo::notifiers() { return data->notifiers; } bool OTodo::operator<( const OTodo &toDoEvent )const{ if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; if( hasDueDate() && toDoEvent.hasDueDate() ){ if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide return priority() < toDoEvent.priority(); }else{ return dueDate() < toDoEvent.dueDate(); } } return false; } bool OTodo::operator<=(const OTodo &toDoEvent )const { if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; if( !hasDueDate() && toDoEvent.hasDueDate() ) return true; if( hasDueDate() && toDoEvent.hasDueDate() ){ if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide return priority() <= toDoEvent.priority(); }else{ return dueDate() <= toDoEvent.dueDate(); } } return true; } bool OTodo::operator>(const OTodo &toDoEvent )const { if( !hasDueDate() && !toDoEvent.hasDueDate() ) return false; if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; if( hasDueDate() && toDoEvent.hasDueDate() ){ if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide return priority() > toDoEvent.priority(); }else{ return dueDate() > toDoEvent.dueDate(); } } return false; } bool OTodo::operator>=(const OTodo &toDoEvent )const { |