summaryrefslogtreecommitdiff
path: root/libopie/pim/orecur.cpp
authorzecke <zecke>2003-05-07 17:49:07 (UTC)
committer zecke <zecke>2003-05-07 17:49:07 (UTC)
commitc13ada0f5e418b25b177e132ff2e1dfe7821577f (patch) (unidiff)
tree40e8d6cc67a1de638ef3c278fd827ba0cbea5b76 /libopie/pim/orecur.cpp
parentac895871f93dce9734189daf9cb95dbbda605096 (diff)
downloadopie-c13ada0f5e418b25b177e132ff2e1dfe7821577f.zip
opie-c13ada0f5e418b25b177e132ff2e1dfe7821577f.tar.gz
opie-c13ada0f5e418b25b177e132ff2e1dfe7821577f.tar.bz2
implement loading of Recurrence
Diffstat (limited to 'libopie/pim/orecur.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/orecur.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/pim/orecur.cpp b/libopie/pim/orecur.cpp
index e3b45b4..eae1fdc 100644
--- a/libopie/pim/orecur.cpp
+++ b/libopie/pim/orecur.cpp
@@ -459,52 +459,52 @@ QString ORecur::toString()const {
459 459
460 buf += " rtype=\""; 460 buf += " rtype=\"";
461 switch ( data->type ) { 461 switch ( data->type ) {
462 case ORecur::Daily: 462 case ORecur::Daily:
463 buf += "Daily"; 463 buf += "Daily";
464 break; 464 break;
465 case ORecur::Weekly: 465 case ORecur::Weekly:
466 buf += "Weekly"; 466 buf += "Weekly";
467 break; 467 break;
468 case ORecur::MonthlyDay: 468 case ORecur::MonthlyDay:
469 buf += "MonthlyDay"; 469 buf += "MonthlyDay";
470 break; 470 break;
471 case ORecur::MonthlyDate: 471 case ORecur::MonthlyDate:
472 buf += "MonthlyDate"; 472 buf += "MonthlyDate";
473 break; 473 break;
474 case ORecur::Yearly: 474 case ORecur::Yearly:
475 buf += "Yearly"; 475 buf += "Yearly";
476 break; 476 break;
477 default: 477 default:
478 buf += "NoRepeat"; 478 buf += "NoRepeat";
479 break; 479 break;
480 } 480 }
481 buf += "\""; 481 buf += "\"";
482 if (data->days > 0 ) 482 if (data->days > 0 )
483 buf += " rweekdays=\"" + QString::number( static_cast<int>( data->days ) ) + "\""; 483 buf += " rweekdays=\"" + QString::number( static_cast<int>( data->days ) ) + "\"";
484 if ( data->pos != 0 ) 484 if ( data->pos != 0 )
485 buf += " rposition=\"" + QString::number(data->pos ) + "\""; 485 buf += " rposition=\"" + QString::number(data->pos ) + "\"";
486 486
487 buf += " rfreq=\"" + QString::number( data->freq ) + "\""; 487 buf += " rfreq=\"" + QString::number( data->freq ) + "\"";
488 buf += " rhasenddate=\"" + QString::number( static_cast<int>( data->hasEnd ) ) + "\""; 488 buf += " rhasenddate=\"" + QString::number( static_cast<int>( data->hasEnd ) ) + "\"";
489 if ( data->hasEnd ) 489 if ( data->hasEnd )
490 buf += " enddt=\"" 490 buf += " enddt=\""
491 + QString::number( OTimeZone::utc().fromUTCDateTime( QDateTime( data->end, QTime(12,0,0) ) ) ) 491 + QString::number( OTimeZone::utc().fromUTCDateTime( QDateTime( data->end, QTime(12,0,0) ) ) )
492 + "\""; 492 + "\"";
493 buf += " created=\"" + QString::number( OTimeZone::utc().fromUTCDateTime( data->create ) ) + "\""; 493 buf += " created=\"" + QString::number( OTimeZone::utc().fromUTCDateTime( data->create ) ) + "\"";
494 494
495 if ( data->list.isEmpty() ) return buf; 495 if ( data->list.isEmpty() ) return buf;
496 // save exceptions list here!! 496 // save exceptions list here!!
497 ExceptionList::ConstIterator it; 497 ExceptionList::ConstIterator it;
498 ExceptionList list = data->list; 498 ExceptionList list = data->list;
499 buf += " exceptions=\""; 499 buf += " exceptions=\"";
500 QDate date; 500 QDate date;
501 for ( it = list.begin(); it != list.end(); ++it ) { 501 for ( it = list.begin(); it != list.end(); ++it ) {
502 date = (*it); 502 date = (*it);
503 if ( it != list.begin() ) buf += " "; 503 if ( it != list.begin() ) buf += " ";
504 504
505 buf += QCString().sprintf("%04d%02d%02d", date.year(), date.month(), date.day() ); 505 buf += QCString().sprintf("%04d%02d%02d", date.year(), date.month(), date.day() );
506 } 506 }
507 buf += "\""; 507 buf += "\" ";
508 508
509 return buf; 509 return buf;
510} 510}