-rw-r--r-- | libopie2/opiepim/core/opimevent.cpp | 30 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimevent.h | 2 |
2 files changed, 20 insertions, 12 deletions
diff --git a/libopie2/opiepim/core/opimevent.cpp b/libopie2/opiepim/core/opimevent.cpp index 8bf8b25..9d46651 100644 --- a/libopie2/opiepim/core/opimevent.cpp +++ b/libopie2/opiepim/core/opimevent.cpp @@ -557,2 +557,4 @@ QMap<int, QString> OPimEvent::toMap() const retMap.insert( OPimEvent::FType, isAllDay() ? "AllDay" : "" ); + if ( notifiers().alarms().count() ){ + // Currently we just support one alarm.. (eilers) OPimAlarm alarm = notifiers().alarms() [ 0 ]; @@ -560,2 +562,3 @@ QMap<int, QString> OPimEvent::toMap() const retMap.insert( OPimEvent::FSound, ( alarm.sound() == OPimAlarm::Loud ) ? "loud" : "silent" ); + } @@ -621,13 +624,2 @@ void OPimEvent::fromMap( const QMap<int, QString>& map ) - int alarmTime = -1; - if ( !map[ OPimEvent::FAlarm ].isEmpty() ) - alarmTime = map[ OPimEvent::FAlarm ].toInt(); - - int sound = ( ( map[ OPimEvent::FSound ] == "loud" ) ? OPimAlarm::Loud : OPimAlarm::Silent ); - if ( ( alarmTime != -1 ) ) - { - QDateTime dt = startDateTime().addSecs( -1 * alarmTime * 60 ); - OPimAlarm al( sound , dt ); - notifiers().add( al ); - } if ( !map[ OPimEvent::FTimeZone ].isEmpty() && ( map[ OPimEvent::FTimeZone ] != "None" ) ) @@ -661,2 +653,18 @@ void OPimEvent::fromMap( const QMap<int, QString>& map ) + int alarmTime = -1; + if ( !map[ OPimEvent::FAlarm ].isEmpty() ) + alarmTime = map[ OPimEvent::FAlarm ].toInt(); + + int sound = ( ( map[ OPimEvent::FSound ] == "loud" ) ? OPimAlarm::Loud : OPimAlarm::Silent ); + if ( ( alarmTime != -1 ) ) + { + QDateTime dt = startDateTime().addSecs( -1 * alarmTime * 60 ); + OPimAlarm al( sound , dt ); + notifiers().add( al ); + } + + + if ( !map[ OPimEvent::FNote ].isEmpty() ) + setNote( map[ OPimEvent::FNote ] ); + if ( !map[ OPimEvent::FRecParent ].isEmpty() ) diff --git a/libopie2/opiepim/core/opimevent.h b/libopie2/opiepim/core/opimevent.h index 56fe917..5553cac 100644 --- a/libopie2/opiepim/core/opimevent.h +++ b/libopie2/opiepim/core/opimevent.h @@ -81,3 +81,3 @@ class OPimEvent : public OPimRecord FCategories = Qtopia::CATEGORY_ID, - FDescription = 0, + FDescription /* = 0 Why this ? (eilers) */, FLocation, |