summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-21 12:34:49 (UTC)
committer zautrix <zautrix>2005-03-21 12:34:49 (UTC)
commit3b7ba9f46c78816bae8c4b30a455e261d7da9f4a (patch) (side-by-side diff)
treedb85cf3f0520828c358aadc3867705a95fcb9d88
parentb40a7cc0a8cf0bd06b0f404f58e89980d1291beb (diff)
downloadkdepimpi-3b7ba9f46c78816bae8c4b30a455e261d7da9f4a.zip
kdepimpi-3b7ba9f46c78816bae8c4b30a455e261d7da9f4a.tar.gz
kdepimpi-3b7ba9f46c78816bae8c4b30a455e261d7da9f4a.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kodaymatrix.cpp23
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
@@ -179,8 +179,9 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
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()) {
@@ -192,11 +193,25 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
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( '<' , "&lt;" );
+ mToolTipText.replace( '>' , "&gt;" );
+#else
+ if ( mToolTipText.find ('<') > 0 ) {
+ mToolTipText.replace( QRegExp("<") , "&lt;" );
+ }
+ if ( mToolTipText.find ('>') > 0 ) {
+ mToolTipText.replace( QRegExp(">") , "&gt;" );
+ }
+#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 )
{
@@ -222,9 +237,9 @@ QColor KODayMatrix::getShadedColor(QColor color)
}
KODayMatrix::~KODayMatrix()
{
- delete mKODaymatrixWhatsThis;
+ // delete mKODaymatrixWhatsThis;
delete [] days;
delete [] daylbls;
delete [] events;
delete mToolTip;
@@ -336,13 +351,17 @@ void KODayMatrix::updateViewTimed()
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;