author | zautrix <zautrix> | 2005-07-03 15:58:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-03 15:58:48 (UTC) |
commit | 9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e (patch) (side-by-side diff) | |
tree | 4e5e6a4e6eac36df79891d61ed1d1cd76ed6105d /korganizer/koeventviewer.cpp | |
parent | 0c632bafd2d058504118dc8957fc4808a784f548 (diff) | |
download | kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.zip kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.gz kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.bz2 |
fixes
Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventviewer.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index f6c252b..2d0bfff 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -105,16 +105,26 @@ void KOEventViewer::printMe() drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); p.end(); #endif } void KOEventViewer::setSource(const QString& n) { + if ( n.left(8) == "todo_uid" ) { + int midstr = 9; +#ifdef DESKTOP_VERSION + midstr = 11; +#endif + qDebug("-%s- ", n.mid(midstr).latin1()); + emit showIncidence( n.mid(midstr) ); + return; + } + if ( n.left(3) == "uid" ) #ifdef DESKTOP_VERSION { KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); KABC::AddressBook::Iterator it; for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { // LR I do not understand, why the uid string is different on zaurus and desktop QString uid = "uid://"+(*it).uid(); @@ -525,24 +535,36 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) } else { addTag("p",i18n("<b>Last modified: ") +" </b>"); addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); } } if ( event->relatedTo() ) { addTag("b",i18n("Parent todo:<br>")); - mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); + + QString t_name = "[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] ";// +event->relatedTo()->summary()); + + mText += t_name; + mText += "<a href=\"todo_uid:" + event->relatedTo()->uid() + "\">"; + mText += deTag(event->relatedTo()->summary()); + mText += "</a><br>"; + + // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<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( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); + QString t_name = "[" +QString::number(((Todo*)to)->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%] ";// +to->relatedTo()->summary()); + mText += t_name; + mText += "<a href=\"todo_uid:" + to->uid() + "\">"; + mText += deTag(to->summary()); + mText += "</a><br>"; } if ( KOPrefs::instance()->mEVshowDetails ) { if (!event->description().isEmpty()) { addTag("p",i18n("<b>Details: </b>")); addTag("p",deTag(event->description())); } |