author | zautrix <zautrix> | 2005-03-21 14:42:01 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-21 14:42:01 (UTC) |
commit | 6e5a0c6cff04fff115e63b62537c5274dc7a5564 (patch) (unidiff) | |
tree | 5d40aadc33768fa31036aefdf965462248358361 | |
parent | 3bd97904e69bf586122ad82d279c37db0861eefb (diff) | |
download | kdepimpi-6e5a0c6cff04fff115e63b62537c5274dc7a5564.zip kdepimpi-6e5a0c6cff04fff115e63b62537c5274dc7a5564.tar.gz kdepimpi-6e5a0c6cff04fff115e63b62537c5274dc7a5564.tar.bz2 |
fix
-rw-r--r-- | korganizer/kodaymatrix.cpp | 5 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 4 | ||||
-rw-r--r-- | libkcal/kincidenceformatter.cpp | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 493382d..a776cb6 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -170,71 +170,72 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) | |||
170 | if (mDate == event->dtStart().date()) { | 170 | if (mDate == event->dtStart().date()) { |
171 | prefix ="->" ;multiday = 1; | 171 | prefix ="->" ;multiday = 1; |
172 | } else if (mDate == event->dtEnd().date()) { | 172 | } else if (mDate == event->dtEnd().date()) { |
173 | prefix ="<-" ;multiday = 3; | 173 | prefix ="<-" ;multiday = 3; |
174 | } | 174 | } |
175 | } | 175 | } |
176 | if ( !event->doesFloat() ) { | 176 | if ( !event->doesFloat() ) { |
177 | if ( mDate == event->dtStart().date () ) | 177 | if ( mDate == event->dtStart().date () ) |
178 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; | 178 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; |
179 | else if ( mDate == event->dtEnd().date () ) | 179 | else if ( mDate == event->dtEnd().date () ) |
180 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; | 180 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; |
181 | 181 | ||
182 | } | 182 | } |
183 | text = time + event->summary(); | 183 | text = time + event->summary(); |
184 | mToolTipText += prefix + text; | 184 | mToolTipText += prefix + text; |
185 | } else { | 185 | } else { |
186 | if (event->doesFloat()) { | 186 | if (event->doesFloat()) { |
187 | text = event->summary(); | 187 | text = event->summary(); |
188 | mToolTipText += text; | 188 | mToolTipText += text; |
189 | } | 189 | } |
190 | else { | 190 | else { |
191 | text = KGlobal::locale()->formatTime(event->dtStart().time()); | 191 | text = KGlobal::locale()->formatTime(event->dtStart().time()); |
192 | text += " " + event->summary(); | 192 | text += " " + event->summary(); |
193 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); | 193 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); |
194 | } | 194 | } |
195 | } | 195 | } |
196 | if ( !event->location().isEmpty() ) | 196 | if ( !event->location().isEmpty() ) |
197 | mToolTipText += " (" + event->location() + ")"; | 197 | mToolTipText += " (" + event->location() + ")"; |
198 | #if QT_VERSION >= 0x030000 | 198 | #if QT_VERSION >= 0x030000 |
199 | mToolTipText.replace( '<' , "<" ); | 199 | mToolTipText.replace( '<' , "<" ); |
200 | mToolTipText.replace( '>' , ">" ); | 200 | mToolTipText.replace( '>' , ">" ); |
201 | #else | 201 | #else |
202 | if ( mToolTipText.find ('<') > 0 ) { | 202 | if ( mToolTipText.find ('<') >= 0 ) { |
203 | mToolTipText.replace( QRegExp("<") , "<" ); | 203 | mToolTipText.replace( QRegExp("<") , "<" ); |
204 | } | 204 | } |
205 | if ( mToolTipText.find ('>') > 0 ) { | 205 | if ( mToolTipText.find ('>') >= 0 ) { |
206 | mToolTipText.replace( QRegExp(">") , ">" ); | 206 | mToolTipText.replace( QRegExp(">") , ">" ); |
207 | } | 207 | } |
208 | #endif | 208 | #endif |
209 | //qDebug("TTT: %s ", mToolTipText.latin1()); | ||
209 | mToolTip.append( mToolTipText ); | 210 | mToolTip.append( mToolTipText ); |
210 | } | 211 | } |
211 | mToolTip.sort(); | 212 | mToolTip.sort(); |
212 | return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); | 213 | return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); |
213 | } | 214 | } |
214 | void KODayMatrix::setCalendar( Calendar *cal ) | 215 | void KODayMatrix::setCalendar( Calendar *cal ) |
215 | { | 216 | { |
216 | mCalendar = cal; | 217 | mCalendar = cal; |
217 | 218 | ||
218 | setAcceptDrops( mCalendar ); | 219 | setAcceptDrops( mCalendar ); |
219 | 220 | ||
220 | updateEvents(); | 221 | updateEvents(); |
221 | } | 222 | } |
222 | 223 | ||
223 | QColor KODayMatrix::getShadedColor(QColor color) | 224 | QColor KODayMatrix::getShadedColor(QColor color) |
224 | { | 225 | { |
225 | QColor shaded; | 226 | QColor shaded; |
226 | int h=0; | 227 | int h=0; |
227 | int s=0; | 228 | int s=0; |
228 | int v=0; | 229 | int v=0; |
229 | color.hsv(&h,&s,&v); | 230 | color.hsv(&h,&s,&v); |
230 | s = s/4; | 231 | s = s/4; |
231 | v = 192+v/4; | 232 | v = 192+v/4; |
232 | shaded.setHsv(h,s,v); | 233 | shaded.setHsv(h,s,v); |
233 | 234 | ||
234 | return shaded; | 235 | return shaded; |
235 | } | 236 | } |
236 | 237 | ||
237 | KODayMatrix::~KODayMatrix() | 238 | KODayMatrix::~KODayMatrix() |
238 | { | 239 | { |
239 | // delete mKODaymatrixWhatsThis; | 240 | // delete mKODaymatrixWhatsThis; |
240 | delete [] days; | 241 | delete [] days; |
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 135ca73..1508638 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -669,53 +669,53 @@ void KOEventViewer::setEvent(Event *event) | |||
669 | clearEvents(); | 669 | clearEvents(); |
670 | if ( mSyncMode ) | 670 | if ( mSyncMode ) |
671 | appendEvent(event, 1); | 671 | appendEvent(event, 1); |
672 | else | 672 | else |
673 | appendEvent(event); | 673 | appendEvent(event); |
674 | } | 674 | } |
675 | 675 | ||
676 | void KOEventViewer::addEvent(Event *event) | 676 | void KOEventViewer::addEvent(Event *event) |
677 | { | 677 | { |
678 | if ( mSyncMode ) | 678 | if ( mSyncMode ) |
679 | appendEvent(event, 2); | 679 | appendEvent(event, 2); |
680 | else | 680 | else |
681 | appendEvent(event); | 681 | appendEvent(event); |
682 | } | 682 | } |
683 | 683 | ||
684 | void KOEventViewer::clearEvents(bool now) | 684 | void KOEventViewer::clearEvents(bool now) |
685 | { | 685 | { |
686 | mText = ""; | 686 | mText = ""; |
687 | if (now) setText(mText); | 687 | if (now) setText(mText); |
688 | } | 688 | } |
689 | 689 | ||
690 | void KOEventViewer::addText(QString text) | 690 | void KOEventViewer::addText(QString text) |
691 | { | 691 | { |
692 | mText.append(text); | 692 | mText.append(text); |
693 | setText(mText); | 693 | setText(mText); |
694 | } | 694 | } |
695 | QString KOEventViewer::deTag(QString text) | 695 | QString KOEventViewer::deTag(QString text) |
696 | { | 696 | { |
697 | #if QT_VERSION >= 0x030000 | 697 | #if QT_VERSION >= 0x030000 |
698 | text.replace( '<' , "<" ); | 698 | text.replace( '<' , "<" ); |
699 | text.replace( '>' , ">" ); | 699 | text.replace( '>' , ">" ); |
700 | #else | 700 | #else |
701 | if ( text.find ('<') > 0 ) { | 701 | if ( text.find ('<') >= 0 ) { |
702 | text.replace( QRegExp("<") , "<" ); | 702 | text.replace( QRegExp("<") , "<" ); |
703 | } | 703 | } |
704 | if ( text.find ('>') > 0 ) { | 704 | if ( text.find ('>') >= 0 ) { |
705 | text.replace( QRegExp(">") , ">" ); | 705 | text.replace( QRegExp(">") , ">" ); |
706 | } | 706 | } |
707 | #endif | 707 | #endif |
708 | return text; | 708 | return text; |
709 | } | 709 | } |
710 | void KOEventViewer::keyPressEvent ( QKeyEvent * e ) | 710 | void KOEventViewer::keyPressEvent ( QKeyEvent * e ) |
711 | { | 711 | { |
712 | switch ( e->key() ) { | 712 | switch ( e->key() ) { |
713 | case Qt::Key_Return: | 713 | case Qt::Key_Return: |
714 | case Qt::Key_Enter : | 714 | case Qt::Key_Enter : |
715 | e->ignore(); | 715 | e->ignore(); |
716 | break; | 716 | break; |
717 | default: | 717 | default: |
718 | QTextBrowser::keyPressEvent ( e ); | 718 | QTextBrowser::keyPressEvent ( e ); |
719 | break; | 719 | break; |
720 | } | 720 | } |
721 | } | 721 | } |
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index 57a9ede..e506a96 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp | |||
@@ -353,41 +353,41 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) | |||
353 | 353 | ||
354 | if (!a->email().isEmpty()) { | 354 | if (!a->email().isEmpty()) { |
355 | if (iconPath) { | 355 | if (iconPath) { |
356 | mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; | 356 | mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; |
357 | if ( a->RSVP() ) | 357 | if ( a->RSVP() ) |
358 | mText += "<IMG src=\"" + iconPath + "\">"; | 358 | mText += "<IMG src=\"" + iconPath + "\">"; |
359 | else | 359 | else |
360 | mText += "<IMG src=\"" + NOiconPath + "\">"; | 360 | mText += "<IMG src=\"" + NOiconPath + "\">"; |
361 | mText += "</a>\n"; | 361 | mText += "</a>\n"; |
362 | } | 362 | } |
363 | } | 363 | } |
364 | if (a->status() != Attendee::NeedsAction ) | 364 | if (a->status() != Attendee::NeedsAction ) |
365 | mText +="[" + a->statusStr() + "] "; | 365 | mText +="[" + a->statusStr() + "] "; |
366 | if (a->role() == Attendee::Chair ) | 366 | if (a->role() == Attendee::Chair ) |
367 | mText +="(" + a->roleStr().left(1) + ".)"; | 367 | mText +="(" + a->roleStr().left(1) + ".)"; |
368 | } | 368 | } |
369 | mText.append("</li></ul>"); | 369 | mText.append("</li></ul>"); |
370 | } | 370 | } |
371 | } | 371 | } |
372 | 372 | ||
373 | void KIncidenceFormatter::formatReadOnly(Incidence *event) | 373 | void KIncidenceFormatter::formatReadOnly(Incidence *event) |
374 | { | 374 | { |
375 | if (event->isReadOnly()) { | 375 | if (event->isReadOnly()) { |
376 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); | 376 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); |
377 | } | 377 | } |
378 | } | 378 | } |
379 | QString KIncidenceFormatter::deTag(QString text) | 379 | QString KIncidenceFormatter::deTag(QString text) |
380 | { | 380 | { |
381 | #if QT_VERSION >= 0x030000 | 381 | #if QT_VERSION >= 0x030000 |
382 | text.replace( '<' , "<" ); | 382 | text.replace( '<' , "<" ); |
383 | text.replace( '>' , ">" ); | 383 | text.replace( '>' , ">" ); |
384 | #else | 384 | #else |
385 | if ( text.find ('<') > 0 ) { | 385 | if ( text.find ('<') >= 0 ) { |
386 | text.replace( QRegExp("<") , "<" ); | 386 | text.replace( QRegExp("<") , "<" ); |
387 | } | 387 | } |
388 | if ( text.find ('>') > 0 ) { | 388 | if ( text.find ('>') >= 0 ) { |
389 | text.replace( QRegExp(">") , ">" ); | 389 | text.replace( QRegExp(">") , ">" ); |
390 | } | 390 | } |
391 | #endif | 391 | #endif |
392 | return text; | 392 | return text; |
393 | } | 393 | } |