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