-rw-r--r-- | korganizer/kodaymatrix.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 5133519..9c1f5f3 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -175,32 +175,47 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) } if ( !event->doesFloat() ) { if ( mDate == event->dtStart().date () ) time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; else if ( mDate == event->dtEnd().date () ) time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; } + qDebug("event->isMultiDay() %s", event->summary().latin1() ); text = time + event->summary(); mToolTipText += prefix + text; } else { if (event->doesFloat()) { text = event->summary(); mToolTipText += text; } else { text = KGlobal::locale()->formatTime(event->dtStart().time()); text += " " + event->summary(); mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); } } + if ( !event->location().isEmpty() ) + mToolTipText += " (" + event->location() + ")"; +#if QT_VERSION >= 0x030000 + mToolTipText.replace( '<' , "<" ); + mToolTipText.replace( '>' , ">" ); +#else + if ( mToolTipText.find ('<') > 0 ) { + mToolTipText.replace( QRegExp("<") , "<" ); + } + if ( mToolTipText.find ('>') > 0 ) { + mToolTipText.replace( QRegExp(">") , ">" ); + } +#endif mToolTip.append( mToolTipText ); } mToolTip.sort(); + qDebug("%s ", mToolTip.join("<br>").latin1()); return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); } void KODayMatrix::setCalendar( Calendar *cal ) { mCalendar = cal; setAcceptDrops( mCalendar ); @@ -218,17 +233,17 @@ QColor KODayMatrix::getShadedColor(QColor color) v = 192+v/4; shaded.setHsv(h,s,v); return shaded; } KODayMatrix::~KODayMatrix() { - delete mKODaymatrixWhatsThis; + // delete mKODaymatrixWhatsThis; delete [] days; delete [] daylbls; delete [] events; delete mToolTip; } /* void KODayMatrix::setStartDate(QDate start) @@ -332,21 +347,25 @@ void KODayMatrix::updateViewTimed() if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) || (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) { numEvents--; } if ( event->categories().contains( i18n("Holiday") ) || event->categories().contains( "Holiday" )) { if ( !holiStr.isEmpty() ) holiStr += "\n"; holiStr += event->summary(); + if ( !event->location().isEmpty() ) + holiStr += " (" + event->location() + ")"; } if ( event->categories().contains( i18n("Birthday") ) || event->categories().contains( "Birthday" )) { if ( !holiStr.isEmpty() ) holiStr += "\n"; - holiStr += event->summary(); + holiStr += i18n("Birthday") + ": "+event->summary(); + if ( !event->location().isEmpty() ) + holiStr += " (" + event->location() + ")"; bDays.setBit(i); } } events[i] = numEvents; //if it is a holy day then draw it red. Sundays are consider holidays, too if ( (KOGlobals::self()->calendarSystem()->dayOfWeek(days[i]) == KOGlobals::self()->calendarSystem()->weekDayOfPray()) || !holiStr.isEmpty()) { mHolidays[i] = holiStr; |