author | zecke <zecke> | 2003-05-07 17:49:07 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-05-07 17:49:07 (UTC) |
commit | c13ada0f5e418b25b177e132ff2e1dfe7821577f (patch) (side-by-side diff) | |
tree | 40e8d6cc67a1de638ef3c278fd827ba0cbea5b76 /libopie2/opiepim/core | |
parent | ac895871f93dce9734189daf9cb95dbbda605096 (diff) | |
download | opie-c13ada0f5e418b25b177e132ff2e1dfe7821577f.zip opie-c13ada0f5e418b25b177e132ff2e1dfe7821577f.tar.gz opie-c13ada0f5e418b25b177e132ff2e1dfe7821577f.tar.bz2 |
implement loading of Recurrence
-rw-r--r-- | libopie2/opiepim/core/opimnotifymanager.cpp | 3 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimnotifymanager.h | 3 | ||||
-rw-r--r-- | libopie2/opiepim/core/orecur.cpp | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/opimnotifymanager.cpp b/libopie2/opiepim/core/opimnotifymanager.cpp index be4a1c2..49af757 100644 --- a/libopie2/opiepim/core/opimnotifymanager.cpp +++ b/libopie2/opiepim/core/opimnotifymanager.cpp @@ -46,24 +46,27 @@ void OPimNotifyManager::setAlarms( const Alarms& al) { } void OPimNotifyManager::setReminders( const Reminders& rem) { m_rem = rem; } /* FIXME!!! */ /** * The idea is to check if the provider for our service * is online * if it is we will use QCOP * if not the Factory to get the backend... * Qtopia1.6 services would be kewl to have here.... */ void OPimNotifyManager::registerNotify( const OPimNotify& ) { } /* FIXME!!! */ /** * same as above... * Also implement Url model * have a MainWindow.... */ void OPimNotifyManager::deregister( const OPimNotify& ) { } +bool OPimNotifyManager::isEmpty()const { + return ( m_rem.isEmpty() && m_al.isEmpty() ); +} diff --git a/libopie2/opiepim/core/opimnotifymanager.h b/libopie2/opiepim/core/opimnotifymanager.h index 0eebc9b..0ac30a1 100644 --- a/libopie2/opiepim/core/opimnotifymanager.h +++ b/libopie2/opiepim/core/opimnotifymanager.h @@ -18,34 +18,37 @@ public: /* we will cast it for you ;) */ void add( const OPimNotify& ); void remove( const OPimNotify& ); /* replaces all with this one! */ void replace( const OPimNotify& ); Reminders reminders()const; Alarms alarms()const; void setAlarms( const Alarms& ); void setReminders( const Reminders& ); /* register is a Ansi C keyword... */ /** * This function will register the Notify to the Alarm Server * or datebook depending on the type of the notify */ void registerNotify( const OPimNotify& ); /** * this will do the opposite.. */ void deregister( const OPimNotify& ); + + bool isEmpty()const; + private: Reminders m_rem; Alarms m_al; class Private; Private *d; }; #endif diff --git a/libopie2/opiepim/core/orecur.cpp b/libopie2/opiepim/core/orecur.cpp index e3b45b4..eae1fdc 100644 --- a/libopie2/opiepim/core/orecur.cpp +++ b/libopie2/opiepim/core/orecur.cpp @@ -483,28 +483,28 @@ QString ORecur::toString()const { buf += " rweekdays=\"" + QString::number( static_cast<int>( data->days ) ) + "\""; if ( data->pos != 0 ) buf += " rposition=\"" + QString::number(data->pos ) + "\""; buf += " rfreq=\"" + QString::number( data->freq ) + "\""; buf += " rhasenddate=\"" + QString::number( static_cast<int>( data->hasEnd ) ) + "\""; if ( data->hasEnd ) buf += " enddt=\"" + QString::number( OTimeZone::utc().fromUTCDateTime( QDateTime( data->end, QTime(12,0,0) ) ) ) + "\""; buf += " created=\"" + QString::number( OTimeZone::utc().fromUTCDateTime( data->create ) ) + "\""; if ( data->list.isEmpty() ) return buf; // save exceptions list here!! ExceptionList::ConstIterator it; ExceptionList list = data->list; buf += " exceptions=\""; QDate date; for ( it = list.begin(); it != list.end(); ++it ) { date = (*it); if ( it != list.begin() ) buf += " "; buf += QCString().sprintf("%04d%02d%02d", date.year(), date.month(), date.day() ); } - buf += "\""; + buf += "\" "; return buf; } |