summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.cpp21
1 files changed, 8 insertions, 13 deletions
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
@@ -622,42 +622,37 @@ DateBookDayWidget::DateBookDayWidget( const EffectiveEvent &e,
}
geom.setY( y );
geom.setHeight( h );
geom.setX( 0 );
geom.setWidth(dateBook->dayView()->columnWidth(0)-1);
}
void DateBookDayWidget::setAllDayText( QString &text ) {
text += "<b>" + tr("This is an all day event.") + "</b><br>";
}
void DateBookDayWidget::setEventText( QString& text ) {
bool whichClock = dateBook->dayView()->whichClock();
- text += "<b>" + tr("Time") + "</b>: ";
- if ( ev.startDate() != ev.date() ) {
- // multi-day event. Show start date
- text += TimeString::longDateString( ev.startDate() );
+ if ( ev.startDate() != ev.endDate() ) {
+ text += "<b>" + tr("Start") + "</b>: ";
+ text += TimeString::timeString( ev.event().start().time(), whichClock, FALSE );
+ text += " - " + TimeString::longDateString( ev.startDate() ) + "<br>";
+ text += "<b>" + tr("End") + "</b>: ";
+ text += TimeString::timeString( ev.event().end().time(), whichClock, FALSE );
+ text += " - " + TimeString::longDateString( ev.endDate() ) + "<br>";
} else {
- // Show start time.
+ text += "<b>" + tr("Time") + "</b>: ";
text += TimeString::timeString( ev.start(), whichClock, FALSE );
- }
-
text += "<b>" + tr(" - ") + "</b>";
- if ( ev.endDate() != ev.date() ) {
- // multi-day event. Show end date
- text += TimeString::longDateString( ev.endDate() );
- } else {
- // Show end time.
text += TimeString::timeString( ev.end(), whichClock, FALSE );
}
-
}
DateBookDayWidget::~DateBookDayWidget()
{
}
void DateBookDayWidget::paintEvent( QPaintEvent *e )
{
QPainter p( this );
if (dateBook->getSelectedWidget() == this)
{