author | zautrix <zautrix> | 2005-04-22 13:00:34 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-22 13:00:34 (UTC) |
commit | 81158fa914f6d0f3aeb049d28d2ecfb5f5c0e261 (patch) (unidiff) | |
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 | |||
@@ -201,4 +201,41 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) | |||
201 | if ( !event->location().isEmpty() ) | 201 | if ( !event->location().isEmpty() ) |
202 | mToolTipText += " (" + event->location() + ")"; | 202 | mToolTipText += " (" + event->location() + ")"; |
203 | //qDebug("TTT: %s ", mToolTipText.latin1()); | ||
204 | mToolTip.append( deTag( mToolTipText ) ); | ||
205 | } | ||
206 | if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { | ||
207 | QPtrList<Todo> todolist = mCalendar->todos(mDate); | ||
208 | Todo *todo; | ||
209 | for(todo=todolist.first();todo != 0;todo=todolist.next()) { | ||
210 | QString mToolTipText; | ||
211 | if ( !todo->doesFloat() ) | ||
212 | mToolTipText += KGlobal::locale()->formatTime(todo->dtDue().time())+" "; | ||
213 | mToolTipText += todo->summary(); | ||
214 | if ( !todo->location().isEmpty() ) | ||
215 | mToolTipText += " (" + todo->location() + ")"; | ||
216 | mToolTipText = deTag( mToolTipText); | ||
217 | mToolTipText = "<b>" + i18n("Todo: ") + "</b>"+ mToolTipText; | ||
218 | mToolTip.append( mToolTipText ); | ||
219 | } | ||
220 | } | ||
221 | mToolTip.sort(); | ||
222 | if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { | ||
223 | Journal *j = mCalendar->journal( mDate ); | ||
224 | if ( j ) { | ||
225 | QString mToolTipText = j->description().left(100); | ||
226 | if ( j->description().length() > 100 ) | ||
227 | mToolTipText += " ..."; | ||
228 | mToolTipText = deTag( mToolTipText); | ||
229 | mToolTipText = "<b>" + i18n("Journal: ") + "</b>"+ mToolTipText; | ||
230 | mToolTip.append( mToolTipText ); | ||
231 | } | ||
232 | } | ||
233 | return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); | ||
234 | } | ||
235 | |||
236 | |||
237 | QString KODayMatrix::deTag( QString mToolTipText ) | ||
238 | { | ||
239 | |||
203 | #if QT_VERSION >= 0x030000 | 240 | #if QT_VERSION >= 0x030000 |
204 | mToolTipText.replace( '<' , "<" ); | 241 | mToolTipText.replace( '<' , "<" ); |
@@ -212,9 +249,5 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) | |||
212 | } | 249 | } |
213 | #endif | 250 | #endif |
214 | //qDebug("TTT: %s ", mToolTipText.latin1()); | 251 | return mToolTipText; |
215 | mToolTip.append( mToolTipText ); | ||
216 | } | ||
217 | mToolTip.sort(); | ||
218 | return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); | ||
219 | } | 252 | } |
220 | void KODayMatrix::setCalendar( Calendar *cal ) | 253 | void KODayMatrix::setCalendar( Calendar *cal ) |
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h index a3216d6..b96e08f 100644 --- a/korganizer/kodaymatrix.h +++ b/korganizer/kodaymatrix.h | |||
@@ -208,4 +208,5 @@ signals: | |||
208 | 208 | ||
209 | protected: | 209 | protected: |
210 | QString deTag( QString mToolTipText ); | ||
210 | 211 | ||
211 | void paintEvent(QPaintEvent *ev); | 212 | void paintEvent(QPaintEvent *ev); |