summaryrefslogtreecommitdiffabout
path: root/libkcal/kincidenceformatter.cpp
authorzautrix <zautrix>2005-01-30 01:41:12 (UTC)
committer zautrix <zautrix>2005-01-30 01:41:12 (UTC)
commit949c6e28c83668176fd9c29e12668322c6ae627f (patch) (side-by-side diff)
treef5b21c9fe6d9f1906a7bca6899b44bcf359f2cc6 /libkcal/kincidenceformatter.cpp
parenta8fae20ad7bcb59df9a603c88accf3a10401c2f9 (diff)
downloadkdepimpi-949c6e28c83668176fd9c29e12668322c6ae627f.zip
kdepimpi-949c6e28c83668176fd9c29e12668322c6ae627f.tar.gz
kdepimpi-949c6e28c83668176fd9c29e12668322c6ae627f.tar.bz2
bugs
Diffstat (limited to 'libkcal/kincidenceformatter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/kincidenceformatter.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index 2c45f21..c52f2b3 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -180,15 +180,21 @@ void KIncidenceFormatter::setTodo(Todo *event )
}
if (event->hasDueDate()) {
mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate)));
}
mText.append(i18n("<p><b>Priority:</b> %2</p>")
.arg(QString::number(event->priority())));
-
+
+ if ( event->percentComplete() == 100 && event->hasCompletedDate() ) {
+ mText.append(i18n("<p><i>Completed on %1</i></p>")
+ .arg( event->completedStr() ));
+ } else {
mText.append(i18n("<p><i>%1 % completed</i></p>")
.arg(event->percentComplete()));
+ }
+
addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() );
formatCategories(event);
if (!event->description().isEmpty()) {
addTag("p",i18n("<b>Details: </b>"));
addTag("p",event->description());
}
@@ -243,12 +249,13 @@ void KIncidenceFormatter::addTag(const QString & tag,const QString & text)
void KIncidenceFormatter::formatAttendees(Incidence *event)
{
QPtrList<Attendee> attendees = event->attendees();
if (attendees.count()) {
QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
+ QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small);
addTag("h3",i18n("Organizer"));
mText.append("<ul><li>");
#if 0
//ndef KORG_NOKABC
KABC::AddressBook *add_book = KABC::StdAddressBook::self();
@@ -303,14 +310,17 @@ void KIncidenceFormatter::formatAttendees(Incidence *event)
else mText += a->email();
mText += "</a>\n";
#endif
if (!a->email().isEmpty()) {
if (iconPath) {
- mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">";
- mText += "<IMG src=\"" + iconPath + "\">";
+ mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">";
+ if ( a->RSVP() )
+ mText += "<IMG src=\"" + iconPath + "\">";
+ else
+ mText += "<IMG src=\"" + NOiconPath + "\">";
mText += "</a>\n";
}
}
if (a->status() != Attendee::NeedsAction )
mText +="[" + a->statusStr() + "] ";
if (a->role() == Attendee::Chair )