author | zautrix <zautrix> | 2005-01-15 01:19:32 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-15 01:19:32 (UTC) |
commit | a423c235d0cbc39292102042ed8f4a953e0e37f9 (patch) (side-by-side diff) | |
tree | e6212045a5c20b77692bcc4671c03ac683bf8367 /korganizer | |
parent | 80da9080c1c33c4704806c442179522edce06bd2 (diff) | |
download | kdepimpi-a423c235d0cbc39292102042ed8f4a953e0e37f9.zip kdepimpi-a423c235d0cbc39292102042ed8f4a953e0e37f9.tar.gz kdepimpi-a423c235d0cbc39292102042ed8f4a953e0e37f9.tar.bz2 |
better todo info
-rw-r--r-- | korganizer/koeventviewer.cpp | 16 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 3 |
2 files changed, 18 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 1fcc977..cee0466 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -347,54 +347,68 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) mText += "</font>"; } mMailSubject += i18n( "Todo " )+ event->summary(); if (event->cancelled ()) { mText +="<font color=\"#B00000\">"; addTag("i",i18n("This todo has been cancelled!")); mText.append("<br>"); mText += "</font>"; mMailSubject += i18n("(cancelled)"); } if (!event->location().isEmpty()) { addTag("b",i18n("Location: ")); mText.append(event->location()+"<br>"); mMailSubject += i18n(" at ") + event->location(); } + if (event->hasStartDate()) { + mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); + } if (event->hasDueDate()) { mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); mMailSubject += i18n(" - " )+event->dtDueStr( true ); } addTag("b",i18n("Access: ")); mText.append(event->secrecyStr()+"<br>"); if (!event->description().isEmpty()) { addTag("p",i18n("<b>Details: </b>")); addTag("p",event->description()); } formatCategories(event); mText.append(i18n("<p><b>Priority:</b> %2</p>") .arg(QString::number(event->priority()))); mText.append(i18n("<p><i>%1 % completed</i></p>") .arg(event->percentComplete())); formatReadOnly(event); formatAttendees(event); - + if ( event->relatedTo() ) { + addTag("b",i18n("Parent todo: ")); + mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); + } + QPtrList<Incidence> Relations = event->relations(); + Incidence *to; + if ( Relations.first() ) + addTag("b",i18n("Sub todos:<br>")); + for (to=Relations.first();to;to=Relations.next()) { + mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); + + } setText(mText); } void KOEventViewer::formatCategories(Incidence *event) { if (!event->categoriesStr().isEmpty()) { if (event->categories().count() == 1) { addTag("h3",i18n("Category")); } else { addTag("h3",i18n("Categories")); } addTag("p",event->categoriesStr()); } } void KOEventViewer::formatAttendees(Incidence *event) { diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 772fd95..3979ed2 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -108,32 +108,35 @@ int KOEventViewerDialog::executeS( bool local ) else findButton( Ok )->setFocus(); exec(); return mSyncResult; } void KOEventViewerDialog::updateConfig() { mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); } void KOEventViewerDialog::setEvent(Event *event) { mEventViewer->setEvent(event); mIncidence = event; findButton( Close )->setFocus(); + if ( !mSyncMode ) { + findButton( User1 )->setText( i18n("Agenda")); + } } void KOEventViewerDialog::setIncidence(Incidence *in ) { if ( in->type() == "Event" ) setEvent( (Event*) in ); else if ( in->type() =="Todo" ) setTodo( (Todo*) in ); else if ( in->type() =="Journal" ) setJournal( (Journal*) in ); } void KOEventViewerDialog::addIncidence(Incidence *in) { if ( in->type() == "Event" ) addEvent( (Event*) in ); else if ( in->type() =="Todo" ) mEventViewer->setTodo( (Todo*) in, false ); |