author | mickeyl <mickeyl> | 2004-11-16 19:14:18 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-11-16 19:14:18 (UTC) |
commit | ea3945a9bd8f9830f70b1efa133f9df13b19362f (patch) (unidiff) | |
tree | f2ea22cc50e9aa8aa73ee7dea148f41c563c9666 /libopie/pim/opimnotify.h | |
parent | 1c6f490e8541626f68422e0a3a7c7281d7f5b7d3 (diff) | |
download | opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.zip opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.gz opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.bz2 |
libopie1 goes into unsupported
-rw-r--r-- | libopie/pim/opimnotify.h | 144 |
1 files changed, 0 insertions, 144 deletions
diff --git a/libopie/pim/opimnotify.h b/libopie/pim/opimnotify.h deleted file mode 100644 index 58417db..0000000 --- a/libopie/pim/opimnotify.h +++ b/dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | #ifndef OPIE_PIM_NOTIFY_H | ||
2 | #define OPIE_PIM_NOTIFY_H | ||
3 | |||
4 | #include <qdatetime.h> | ||
5 | #include <qvaluelist.h> | ||
6 | |||
7 | /** | ||
8 | * This is the base class of Notifiers. Possible | ||
9 | * notifiers would be Alarms, Reminders | ||
10 | * What they share is that they have | ||
11 | * A DateTime, Type, Duration | ||
12 | * This is what this base class takes care of | ||
13 | * on top of that it's shared | ||
14 | */ | ||
15 | /* | ||
16 | * TALK to eilers: have a class OPimDuration which sets the Duration | ||
17 | * given on the Due/Start Date? -zecke | ||
18 | * discuss: do we need a uid for the notify? -zecke | ||
19 | */ | ||
20 | class OPimNotify { | ||
21 | public: | ||
22 | typedef QValueList<OPimNotify> ValueList; | ||
23 | OPimNotify( const QDateTime& start = QDateTime(), int duration = 0, int parent = 0 ); | ||
24 | OPimNotify( const OPimNotify& ); | ||
25 | virtual ~OPimNotify(); | ||
26 | |||
27 | OPimNotify &operator=(const OPimNotify& ); | ||
28 | bool operator==( const OPimNotify& ); | ||
29 | |||
30 | virtual QString type()const = 0; | ||
31 | |||
32 | /** start date */ | ||
33 | QDateTime dateTime()const; | ||
34 | QString service()const; | ||
35 | |||
36 | /** | ||
37 | * RETURN the parent uid | ||
38 | */ | ||
39 | int parent()const; | ||
40 | |||
41 | /** | ||
42 | * in Seconds | ||
43 | */ | ||
44 | int duration()const; | ||
45 | |||
46 | /** | ||
47 | * Start Time + Duration | ||
48 | */ | ||
49 | QDateTime endTime()const; | ||
50 | |||
51 | void setDateTime( const QDateTime& ); | ||
52 | void setDuration( int dur ); | ||
53 | void setParent(int uid ); | ||
54 | void setService( const QString& ); | ||
55 | |||
56 | |||
57 | private: | ||
58 | inline void copyIntern(); | ||
59 | void deref(); | ||
60 | struct Data; | ||
61 | Data* data; | ||
62 | |||
63 | /* d-pointer */ | ||
64 | class NotifyPrivate; | ||
65 | NotifyPrivate* d; | ||
66 | |||
67 | }; | ||
68 | /** | ||
69 | * An alarm is a sound/mail/buzzer played/send | ||
70 | * at a given time to inform about | ||
71 | * an Event | ||
72 | */ | ||
73 | class OPimAlarm : public OPimNotify { | ||
74 | public: | ||
75 | enum Sound{Loud=1, Silent=0, Custom=2 }; | ||
76 | OPimAlarm( int sound = Silent, const QDateTime& start = QDateTime(), int duration = 0, int parent = 0 ); | ||
77 | OPimAlarm( const OPimAlarm& ); | ||
78 | ~OPimAlarm(); | ||
79 | |||
80 | OPimAlarm &operator=( const OPimAlarm& ); | ||
81 | bool operator==( const OPimAlarm& ); | ||
82 | QString type()const; | ||
83 | |||
84 | int sound()const; | ||
85 | QString file()const; | ||
86 | |||
87 | void setSound( int ); | ||
88 | /* only when sound is custom... */ | ||
89 | void setFile( const QString& sound ); | ||
90 | |||
91 | private: | ||
92 | void deref(); | ||
93 | void copyIntern(); | ||
94 | struct Data; | ||
95 | Data * data; | ||
96 | |||
97 | class Private; | ||
98 | Private* d; | ||
99 | |||
100 | }; | ||
101 | |||
102 | /** | ||
103 | * A Reminder will be put into the | ||
104 | * datebook | ||
105 | * Note that the returned dateTime() may be not valid. | ||
106 | * In these cases one must resolve the uid and get the OEvent | ||
107 | */ | ||
108 | class OPimReminder : public OPimNotify { | ||
109 | public: | ||
110 | |||
111 | /** | ||
112 | * c'tor of a reminder | ||
113 | * @param uid The uid of the Record inside the Datebook | ||
114 | * @param start the StartDate invalid for all day... | ||
115 | * @param duration The duration of the event ( -1 for all day ) | ||
116 | * @param parent The 'parent' record of this reminder | ||
117 | */ | ||
118 | OPimReminder( int uid = 0, const QDateTime& start = QDateTime(), | ||
119 | int duration = 0, int parent = 0 ); | ||
120 | OPimReminder( const OPimReminder& ); | ||
121 | OPimReminder &operator=(const OPimReminder& ); | ||
122 | |||
123 | QString type()const; | ||
124 | |||
125 | bool operator==( const OPimReminder& ); | ||
126 | |||
127 | /** | ||
128 | * the uid of the alarm | ||
129 | * inside the 'datebook' application | ||
130 | */ | ||
131 | int recordUid()const; | ||
132 | void setRecordUid( int uid ); | ||
133 | |||
134 | private: | ||
135 | void deref(); | ||
136 | void copyIntern(); | ||
137 | |||
138 | struct Data; | ||
139 | Data* data; | ||
140 | class Private; | ||
141 | Private *d; | ||
142 | }; | ||
143 | |||
144 | #endif | ||