-rw-r--r-- | korganizer/koagendaitem.cpp | 53 |
1 files changed, 31 insertions, 22 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 62281d4..39355b4 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -114,24 +114,2 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | |||
114 | select(false); | 114 | select(false); |
115 | QString tipText = mIncidence->summary(); | ||
116 | // QToolTip::add(this,tipText); | ||
117 | QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence )); | ||
118 | if ( !mIncidence->doesFloat() ) | ||
119 | if ( mIncidence->type() == "Event" ) { | ||
120 | if ( (static_cast<Event*>(mIncidence))->isMultiDay() ) { | ||
121 | tipText += "\n"+i18n("From: ")+mIncidence->dtStartStr(); | ||
122 | tipText += "\n"+i18n("To: ")+(static_cast<Event*>(mIncidence))->dtEndStr(); | ||
123 | } | ||
124 | else { | ||
125 | tipText += "\n"+i18n("Time: ")+mIncidence->dtStartTimeStr(); | ||
126 | tipText += " - "+(static_cast<Event*>(mIncidence))->dtEndTimeStr(); | ||
127 | } | ||
128 | } | ||
129 | else if ( mIncidence->type() == "Todo" ) { | ||
130 | tipText += "\n"+i18n("Due: ")+ (static_cast<Todo*>(mIncidence))->dtDueTimeStr(); | ||
131 | } | ||
132 | |||
133 | if (!mIncidence->location().isEmpty()) { | ||
134 | tipText += "\n"+i18n("Location: ")+mIncidence->location(); | ||
135 | } | ||
136 | QToolTip::add(this,tipText,toolTipGroup(),""); | ||
137 | QFontMetrics fontinf(KOPrefs::instance()->mAgendaViewFont); | 115 | QFontMetrics fontinf(KOPrefs::instance()->mAgendaViewFont); |
@@ -490,2 +468,3 @@ void KOAgendaItem::computeText() | |||
490 | { | 468 | { |
469 | |||
491 | mDisplayedText = mIncidence->summary(); | 470 | mDisplayedText = mIncidence->summary(); |
@@ -518,2 +497,32 @@ void KOAgendaItem::computeText() | |||
518 | } | 497 | } |
498 | |||
499 | QString tipText = mIncidence->summary(); | ||
500 | QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence )); | ||
501 | if ( !mIncidence->doesFloat() ) { | ||
502 | if ( mIncidence->type() == "Event" ) { | ||
503 | if ( (static_cast<Event*>(mIncidence))->isMultiDay() ) { | ||
504 | tipText += "\n"+i18n("From: ")+mIncidence->dtStartStr(); | ||
505 | tipText += "\n"+i18n("To: ")+(static_cast<Event*>(mIncidence))->dtEndStr(); | ||
506 | } | ||
507 | else { | ||
508 | tipText += "\n"+i18n("Time: ")+mIncidence->dtStartTimeStr(); | ||
509 | tipText += " - "+(static_cast<Event*>(mIncidence))->dtEndTimeStr(); | ||
510 | } | ||
511 | } | ||
512 | else if ( mIncidence->type() == "Todo" ) { | ||
513 | if (mIncidence->hasStartDate()) | ||
514 | tipText += "\n"+i18n("Start: ")+ (static_cast<Todo*>(mIncidence))->dtStartStr(); | ||
515 | tipText += "\n"+i18n("Due: ")+ (static_cast<Todo*>(mIncidence))->dtDueStr(); | ||
516 | } | ||
517 | } else if ( mIncidence->type() == "Todo" ) { | ||
518 | if (mIncidence->hasStartDate()) | ||
519 | tipText += "\n"+i18n("Start: ")+ (static_cast<Todo*>(mIncidence))->dtStartDateStr(); | ||
520 | tipText += "\n"+i18n("Due: ")+ (static_cast<Todo*>(mIncidence))->dtDueDateStr(); | ||
521 | } | ||
522 | |||
523 | if (!mIncidence->location().isEmpty()) { | ||
524 | tipText += "\n"+i18n("Location: ")+mIncidence->location(); | ||
525 | } | ||
526 | QToolTip::add(this,tipText,toolTipGroup(),""); | ||
527 | |||
519 | } | 528 | } |