author | zautrix <zautrix> | 2005-04-22 13:00:34 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-22 13:00:34 (UTC) |
commit | 81158fa914f6d0f3aeb049d28d2ecfb5f5c0e261 (patch) (side-by-side diff) | |
tree | d5d622e8e5abd5326edc426398faef24ae52985c | |
parent | 33bc865668aef76416b45e365ba5825315d90564 (diff) | |
download | kdepimpi-81158fa914f6d0f3aeb049d28d2ecfb5f5c0e261.zip kdepimpi-81158fa914f6d0f3aeb049d28d2ecfb5f5c0e261.tar.gz kdepimpi-81158fa914f6d0f3aeb049d28d2ecfb5f5c0e261.tar.bz2 |
fixes
-rw-r--r-- | korganizer/kodaymatrix.cpp | 43 | ||||
-rw-r--r-- | korganizer/kodaymatrix.h | 1 |
2 files changed, 39 insertions, 5 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 53ebdb2..4366265 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -202,2 +202,39 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) mToolTipText += " (" + event->location() + ")"; + //qDebug("TTT: %s ", mToolTipText.latin1()); + mToolTip.append( deTag( mToolTipText ) ); + } + if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { + QPtrList<Todo> todolist = mCalendar->todos(mDate); + Todo *todo; + for(todo=todolist.first();todo != 0;todo=todolist.next()) { + QString mToolTipText; + if ( !todo->doesFloat() ) + mToolTipText += KGlobal::locale()->formatTime(todo->dtDue().time())+" "; + mToolTipText += todo->summary(); + if ( !todo->location().isEmpty() ) + mToolTipText += " (" + todo->location() + ")"; + mToolTipText = deTag( mToolTipText); + mToolTipText = "<b>" + i18n("Todo: ") + "</b>"+ mToolTipText; + mToolTip.append( mToolTipText ); + } + } + mToolTip.sort(); + if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { + Journal *j = mCalendar->journal( mDate ); + if ( j ) { + QString mToolTipText = j->description().left(100); + if ( j->description().length() > 100 ) + mToolTipText += " ..."; + mToolTipText = deTag( mToolTipText); + mToolTipText = "<b>" + i18n("Journal: ") + "</b>"+ mToolTipText; + mToolTip.append( mToolTipText ); + } + } + return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); +} + + +QString KODayMatrix::deTag( QString mToolTipText ) +{ + #if QT_VERSION >= 0x030000 @@ -213,7 +250,3 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) #endif - //qDebug("TTT: %s ", mToolTipText.latin1()); - mToolTip.append( mToolTipText ); - } - mToolTip.sort(); - return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); + return mToolTipText; } diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h index a3216d6..b96e08f 100644 --- a/korganizer/kodaymatrix.h +++ b/korganizer/kodaymatrix.h @@ -209,2 +209,3 @@ signals: protected: + QString deTag( QString mToolTipText ); |