From 5d488108161a2dfe1377ac38226b5d8a3a438d11 Mon Sep 17 00:00:00 2001 From: umopapisdn Date: Sat, 22 Mar 2003 00:35:37 +0000 Subject: More informative dayview text: An event that begins and ends on the same day is only mentioned by start and end time. An event that spans across multiple days, is also mentioned with start and end date. --- (limited to 'core/pim') diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index aaf3e16..a6a1be3 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp @@ -631,24 +631,19 @@ void DateBookDayWidget::setAllDayText( QString &text ) { } void DateBookDayWidget::setEventText( QString& text ) { bool whichClock = dateBook->dayView()->whichClock(); - text += "" + tr("Time") + ": "; - if ( ev.startDate() != ev.date() ) { - // multi-day event. Show start date - text += TimeString::longDateString( ev.startDate() ); + if ( ev.startDate() != ev.endDate() ) { + text += "" + tr("Start") + ": "; + text += TimeString::timeString( ev.event().start().time(), whichClock, FALSE ); + text += " - " + TimeString::longDateString( ev.startDate() ) + "
"; + text += "" + tr("End") + ": "; + text += TimeString::timeString( ev.event().end().time(), whichClock, FALSE ); + text += " - " + TimeString::longDateString( ev.endDate() ) + "
"; } else { - // Show start time. + text += "" + tr("Time") + ": "; text += TimeString::timeString( ev.start(), whichClock, FALSE ); - } - - text += "" + tr(" - ") + ""; - if ( ev.endDate() != ev.date() ) { - // multi-day event. Show end date - text += TimeString::longDateString( ev.endDate() ); - } else { - // Show end time. + text += "" + tr(" - ") + ""; text += TimeString::timeString( ev.end(), whichClock, FALSE ); } - } DateBookDayWidget::~DateBookDayWidget() -- cgit v0.9.0.2