-rw-r--r-- | core/pim/today/today.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 69bcb68..d10082f 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -390,89 +390,88 @@ void Today::startTodo() { | |||
390 | QCopEnvelope e("QPE/System", "execute(QString)"); | 390 | QCopEnvelope e("QPE/System", "execute(QString)"); |
391 | e << QString("todolist"); | 391 | e << QString("todolist"); |
392 | } | 392 | } |
393 | 393 | ||
394 | /* | 394 | /* |
395 | * launch opiemail | 395 | * launch opiemail |
396 | */ | 396 | */ |
397 | void Today::startMail() { | 397 | void Today::startMail() { |
398 | QCopEnvelope e("QPE/System", "execute(QString)"); | 398 | QCopEnvelope e("QPE/System", "execute(QString)"); |
399 | e << QString("opiemail"); | 399 | e << QString("opiemail"); |
400 | } | 400 | } |
401 | 401 | ||
402 | /* | 402 | /* |
403 | * Destroys the object and frees any allocated resources | 403 | * Destroys the object and frees any allocated resources |
404 | */ | 404 | */ |
405 | Today::~Today() { | 405 | Today::~Today() { |
406 | // no need to delete child widgets, Qt does it all for us | 406 | // no need to delete child widgets, Qt does it all for us |
407 | } | 407 | } |
408 | 408 | ||
409 | 409 | ||
410 | DateBookEvent::DateBookEvent(const EffectiveEvent &ev, | 410 | DateBookEvent::DateBookEvent(const EffectiveEvent &ev, |
411 | QWidget* parent = 0, | 411 | QWidget* parent = 0, |
412 | const char* name = 0, | 412 | const char* name = 0, |
413 | WFlags fl = 0) : | 413 | WFlags fl = 0) : |
414 | ClickableLabel(parent,name,fl), event(ev) { | 414 | ClickableLabel(parent,name,fl), event(ev) { |
415 | 415 | ||
416 | QString msg; | 416 | QString msg; |
417 | QTime time = QTime::currentTime(); | 417 | QTime time = QTime::currentTime(); |
418 | 418 | ||
419 | if (!ONLY_LATER) { | 419 | if (!ONLY_LATER) { |
420 | msg += "<B>" + (ev).description() + "</B>"; | 420 | msg += "<B>" + (ev).description() + "</B>"; |
421 | if ( (ev).event().hasAlarm() ) { | 421 | if ( (ev).event().hasAlarm() ) { |
422 | msg += " <b>[with alarm]</b>"; | 422 | msg += " <b>[with alarm]</b>"; |
423 | } | 423 | } |
424 | // include location or not | 424 | // include location or not |
425 | if (SHOW_LOCATION == 1) { | 425 | if (SHOW_LOCATION == 1) { |
426 | msg += "<BR><i>" + (ev).location(); | 426 | msg += "<BR><i>" + (ev).location(); |
427 | msg += "</i>"; | 427 | msg += "</i>"; |
428 | } | 428 | } |
429 | 429 | ||
430 | if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) { | 430 | if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) { |
431 | msg += "<br>All day"; | 431 | msg += "<br>All day"; |
432 | } else { | 432 | } else { |
433 | // start time of event | 433 | // start time of event |
434 | msg += "<br>" + TimeString::timeString(QTime((ev).event().start().time()) ) | 434 | msg += "<br>" + TimeString::timeString(QTime((ev).event().start().time()) ) |
435 | // end time of event | 435 | // end time of event |
436 | + "<b> - </b>" + TimeString::timeString(QTime((ev).event().end().time()) ); | 436 | + "<b> - </b>" + TimeString::timeString(QTime((ev).event().end().time()) ); |
437 | } | 437 | } |
438 | msg += "<BR>"; | ||
439 | // include possible note or not | 438 | // include possible note or not |
440 | if (SHOW_NOTES == 1) { | 439 | if (SHOW_NOTES == 1) { |
441 | msg += " <i>note</i>:" +((ev).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | 440 | msg += "<br> <i>note</i>:" +((ev).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; |
442 | } | 441 | } |
443 | } else if ((time.toString() <= TimeString::dateString((ev).event().end())) ) { | 442 | } else if ((time.toString() <= TimeString::dateString((ev).event().end())) ) { |
444 | msg += "<B>" + (ev).description() + "</B>"; | 443 | msg += "<B>" + (ev).description() + "</B>"; |
445 | if ( (ev).event().hasAlarm() ) { | 444 | if ( (ev).event().hasAlarm() ) { |
446 | msg += " <b>[with alarm]</b>"; | 445 | msg += " <b>[with alarm]</b>"; |
447 | } | 446 | } |
448 | // include location or not | 447 | // include location or not |
449 | if (SHOW_LOCATION == 1) { | 448 | if (SHOW_LOCATION == 1) { |
450 | msg+= "<BR><i>" + (ev).location(); | 449 | msg += "<BR><i>" + (ev).location(); |
451 | msg += "</i>"; | 450 | msg += "</i>"; |
452 | } | 451 | } |
453 | 452 | ||
454 | if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) { | 453 | if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) { |
455 | msg += "<br>All day"; | 454 | msg += "<br>All day"; |
456 | } else { | 455 | } else { |
457 | // start time of event | 456 | // start time of event |
458 | msg += "<br>" + TimeString::timeString(QTime((ev).event().start().time()) ) | 457 | msg += "<br>" + TimeString::timeString(QTime((ev).event().start().time()) ) |
459 | // end time of event | 458 | // end time of event |
460 | + "<b> - </b>" + TimeString::timeString(QTime((ev).event().end().time()) ); | 459 | + "<b> - </b>" + TimeString::timeString(QTime((ev).event().end().time()) ); |
461 | } | 460 | } |
462 | // include possible note or not | 461 | // include possible note or not |
463 | if (SHOW_NOTES == 1) { | 462 | if (SHOW_NOTES == 1) { |
464 | msg += "<br> <i>note</i>:" +((ev).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | 463 | msg += "<br> <i>note</i>:" +((ev).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; |
465 | } | 464 | } |
466 | } | 465 | } |
467 | 466 | ||
468 | setText(msg); | 467 | setText(msg); |
469 | connect(this, SIGNAL(clicked()), this, SLOT(editMe())); | 468 | connect(this, SIGNAL(clicked()), this, SLOT(editMe())); |
470 | setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) ); | 469 | setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) ); |
471 | } | 470 | } |
472 | 471 | ||
473 | void DateBookEvent::editMe() { | 472 | void DateBookEvent::editMe() { |
474 | emit editEvent(event.event()); | 473 | emit editEvent(event.event()); |
475 | } | 474 | } |
476 | 475 | ||
477 | 476 | ||
478 | 477 | ||