-rw-r--r-- | core/pim/datebook/datebookweek.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/pim/datebook/datebookweek.cpp b/core/pim/datebook/datebookweek.cpp index e16f516..ddd41af 100644 --- a/core/pim/datebook/datebookweek.cpp +++ b/core/pim/datebook/datebookweek.cpp | |||
@@ -484,74 +484,82 @@ void DateBookWeek::generateNormalTooltext( QString& str, | |||
484 | str += TimeString::longDateString( ev.endDate() ); | 484 | str += TimeString::longDateString( ev.endDate() ); |
485 | } else { | 485 | } else { |
486 | // Show end time. | 486 | // Show end time. |
487 | str += TimeString::timeString( ev.end(), ampm, FALSE ); | 487 | str += TimeString::timeString( ev.end(), ampm, FALSE ); |
488 | } | 488 | } |
489 | } | 489 | } |
490 | 490 | ||
491 | void DateBookWeek::slotShowEvent( const EffectiveEvent &ev ) | 491 | void DateBookWeek::slotShowEvent( const EffectiveEvent &ev ) |
492 | { | 492 | { |
493 | if ( tHide->isActive() ) | 493 | if ( tHide->isActive() ) |
494 | tHide->stop(); | 494 | tHide->stop(); |
495 | 495 | ||
496 | // why would someone use "<"? Oh well, fix it up... | 496 | // why would someone use "<"? Oh well, fix it up... |
497 | // I wonder what other things may be messed up... | 497 | // I wonder what other things may be messed up... |
498 | QString strDesc = ev.description(); | 498 | QString strDesc = ev.description(); |
499 | int where = strDesc.find( "<" ); | 499 | int where = strDesc.find( "<" ); |
500 | while ( where != -1 ) { | 500 | while ( where != -1 ) { |
501 | strDesc.remove( where, 1 ); | 501 | strDesc.remove( where, 1 ); |
502 | strDesc.insert( where, "<" ); | 502 | strDesc.insert( where, "<" ); |
503 | where = strDesc.find( "<", where ); | 503 | where = strDesc.find( "<", where ); |
504 | } | 504 | } |
505 | 505 | ||
506 | QString strCat; | 506 | QString strCat; |
507 | // ### FIX later... | 507 | // ### FIX later... |
508 | // QString strCat = ev.category(); | 508 | // QString strCat = ev.category(); |
509 | // where = strCat.find( "<" ); | 509 | // where = strCat.find( "<" ); |
510 | // while ( where != -1 ) { | 510 | // while ( where != -1 ) { |
511 | // strCat.remove( where, 1 ); | 511 | // strCat.remove( where, 1 ); |
512 | // strCat.insert( where, "<" ); | 512 | // strCat.insert( where, "<" ); |
513 | // where = strCat.find( "<", where ); | 513 | // where = strCat.find( "<", where ); |
514 | // } | 514 | // } |
515 | 515 | ||
516 | QString strLocation = ev.location(); | ||
517 | while ( where != -1 ) { | ||
518 | strLocation.remove( where, 1 ); | ||
519 | strLocation.insert( where, "<" ); | ||
520 | where = strLocation.find( "<", where ); | ||
521 | } | ||
522 | |||
516 | QString strNote = ev.notes(); | 523 | QString strNote = ev.notes(); |
517 | where = strNote.find( "<" ); | 524 | where = strNote.find( "<" ); |
518 | while ( where != -1 ) { | 525 | while ( where != -1 ) { |
519 | strNote.remove( where, 1 ); | 526 | strNote.remove( where, 1 ); |
520 | strNote.insert( where, "<" ); | 527 | strNote.insert( where, "<" ); |
521 | where = strNote.find( "<", where ); | 528 | where = strNote.find( "<", where ); |
522 | } | 529 | } |
523 | 530 | ||
524 | QString str = "<b>" + strDesc + "</b><br>" + "<i>" | 531 | QString str = "<b>" + strDesc + "</b><br>" |
525 | + strCat + "</i>" | 532 | + strLocation + "<br>" |
533 | + "<i>" + strCat + "</i>" | ||
526 | + "<br>" + TimeString::longDateString( ev.date() ) | 534 | + "<br>" + TimeString::longDateString( ev.date() ) |
527 | + "<br>"; | 535 | + "<br>"; |
528 | 536 | ||
529 | if (ev.event().type() == Event::Normal ) | 537 | if (ev.event().type() == Event::Normal ) |
530 | generateNormalTooltext( str, ev ); | 538 | generateNormalTooltext( str, ev ); |
531 | else | 539 | else |
532 | generateAllDayTooltext( str ); | 540 | generateAllDayTooltext( str ); |
533 | 541 | ||
534 | str += "<br><br>" + strNote; | 542 | str += "<br><br>" + strNote; |
535 | 543 | ||
536 | lblDesc->setText( str ); | 544 | lblDesc->setText( str ); |
537 | lblDesc->resize( lblDesc->sizeHint() ); | 545 | lblDesc->resize( lblDesc->sizeHint() ); |
538 | // move the label so it is "centerd" horizontally... | 546 | // move the label so it is "centerd" horizontally... |
539 | lblDesc->move( QMAX(0,(width() - lblDesc->width()) / 2), 0 ); | 547 | lblDesc->move( QMAX(0,(width() - lblDesc->width()) / 2), 0 ); |
540 | lblDesc->show(); | 548 | lblDesc->show(); |
541 | } | 549 | } |
542 | 550 | ||
543 | void DateBookWeek::slotHideEvent() | 551 | void DateBookWeek::slotHideEvent() |
544 | { | 552 | { |
545 | tHide->start( 2000, true ); | 553 | tHide->start( 2000, true ); |
546 | } | 554 | } |
547 | 555 | ||
548 | void DateBookWeek::setStartViewTime( int startHere ) | 556 | void DateBookWeek::setStartViewTime( int startHere ) |
549 | { | 557 | { |
550 | startTime = startHere; | 558 | startTime = startHere; |
551 | view->moveToHour( startTime ); | 559 | view->moveToHour( startTime ); |
552 | } | 560 | } |
553 | 561 | ||
554 | int DateBookWeek::startViewTime() const | 562 | int DateBookWeek::startViewTime() const |
555 | { | 563 | { |
556 | return startTime; | 564 | return startTime; |
557 | } | 565 | } |