opimnotifymanager.h
Go to the documentation of this file.00001 #ifndef OPIE_PIM_NOTIFY_MANAGER_H 00002 #define OPIE_PIM_NOTIFY_MANAGER_H 00003 00004 #include <qvaluelist.h> 00005 00006 #include <opie/opimnotify.h> 00007 00011 class OPimNotifyManager { 00012 public: 00013 typedef QValueList<OPimReminder> Reminders; 00014 typedef QValueList<OPimAlarm> Alarms; 00015 OPimNotifyManager( const Reminders& rems = Reminders(), const Alarms& alarms = Alarms() ); 00016 ~OPimNotifyManager(); 00017 00018 /* we will cast it for you ;) */ 00019 void add( const OPimNotify& ); 00020 void remove( const OPimNotify& ); 00021 /* replaces all with this one! */ 00022 void replace( const OPimNotify& ); 00023 00024 Reminders reminders()const; 00025 00029 Alarms alarms()const; 00030 00040 OPimAlarm alarmAtDateTime( const QDateTime& when, bool& found ) const; 00041 00042 void setAlarms( const Alarms& ); 00043 void setReminders( const Reminders& ); 00044 00045 /* register is a Ansi C keyword... */ 00050 void registerNotify( const OPimNotify& ); 00051 00055 void deregister( const OPimNotify& ); 00056 00057 bool isEmpty()const; 00058 00062 QString alarmsToString() const; 00066 QString remindersToString() const; 00067 00072 void alarmsFromString( const QString& str ); 00073 00078 void remindersFromString( const QString& str ); 00079 00080 00081 00082 private: 00083 Reminders m_rem; 00084 Alarms m_al; 00085 00086 class Private; 00087 Private *d; 00088 00089 }; 00090 00091 #endif
