opimnotify.h
Go to the documentation of this file.00001 #ifndef OPIE_PIM_NOTIFY_H
00002 #define OPIE_PIM_NOTIFY_H
00003
00004 #include <qdatetime.h>
00005 #include <qvaluelist.h>
00006
00015
00016
00017
00018
00019
00020 class OPimNotify {
00021 public:
00022 typedef QValueList<OPimNotify> ValueList;
00023 OPimNotify( const QDateTime& start = QDateTime(), int duration = 0, int parent = 0 );
00024 OPimNotify( const OPimNotify& );
00025 virtual ~OPimNotify();
00026
00027 OPimNotify &operator=(const OPimNotify& );
00028 bool operator==( const OPimNotify& );
00029
00030 virtual QString type()const = 0;
00031
00033 QDateTime dateTime()const;
00034 QString service()const;
00035
00039 int parent()const;
00040
00044 int duration()const;
00045
00049 QDateTime endTime()const;
00050
00051 void setDateTime( const QDateTime& );
00052 void setDuration( int dur );
00053 void setParent(int uid );
00054 void setService( const QString& );
00055
00056
00057 private:
00058 inline void copyIntern();
00059 void deref();
00060 struct Data;
00061 Data* data;
00062
00063
00064 class NotifyPrivate;
00065 NotifyPrivate* d;
00066
00067 };
00073 class OPimAlarm : public OPimNotify {
00074 public:
00075 enum Sound{Loud=1, Silent=0, Custom=2 };
00076 OPimAlarm( int sound = Silent, const QDateTime& start = QDateTime(), int duration = 0, int parent = 0 );
00077 OPimAlarm( const OPimAlarm& );
00078 ~OPimAlarm();
00079
00080 OPimAlarm &operator=( const OPimAlarm& );
00081 bool operator==( const OPimAlarm& );
00082 QString type()const;
00083
00084 int sound()const;
00085 QString file()const;
00086
00087 void setSound( int );
00088
00089 void setFile( const QString& sound );
00090
00091 private:
00092 void deref();
00093 void copyIntern();
00094 struct Data;
00095 Data * data;
00096
00097 class Private;
00098 Private* d;
00099
00100 };
00101
00108 class OPimReminder : public OPimNotify {
00109 public:
00110
00118 OPimReminder( int uid = 0, const QDateTime& start = QDateTime(),
00119 int duration = 0, int parent = 0 );
00120 OPimReminder( const OPimReminder& );
00121 OPimReminder &operator=(const OPimReminder& );
00122
00123 QString type()const;
00124
00125 bool operator==( const OPimReminder& );
00126
00131 int recordUid()const;
00132 void setRecordUid( int uid );
00133
00134 private:
00135 void deref();
00136 void copyIntern();
00137
00138 struct Data;
00139 Data* data;
00140 class Private;
00141 Private *d;
00142 };
00143
00144 #endif
This file is part of the documentation for OPIE Version 1.1.