-rw-r--r-- | kabc/distributionlist.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kabc/distributionlist.h b/kabc/distributionlist.h index ccff487..5f091b1 100644 --- a/kabc/distributionlist.h +++ b/kabc/distributionlist.h | |||
@@ -117,103 +117,101 @@ class DistributionList | |||
117 | @short Manager of distribution lists | 117 | @short Manager of distribution lists |
118 | 118 | ||
119 | This class represents a collection of distribution lists, which are associated | 119 | This class represents a collection of distribution lists, which are associated |
120 | with a given address book. | 120 | with a given address book. |
121 | */ | 121 | */ |
122 | class DistributionListManager | 122 | class DistributionListManager |
123 | { | 123 | { |
124 | public: | 124 | public: |
125 | /** | 125 | /** |
126 | Create manager for given address book. | 126 | Create manager for given address book. |
127 | */ | 127 | */ |
128 | DistributionListManager( AddressBook * ); | 128 | DistributionListManager( AddressBook * ); |
129 | 129 | ||
130 | /** | 130 | /** |
131 | Destructor. | 131 | Destructor. |
132 | */ | 132 | */ |
133 | ~DistributionListManager(); | 133 | ~DistributionListManager(); |
134 | 134 | ||
135 | /** | 135 | /** |
136 | Return distribution list with given name. | 136 | Return distribution list with given name. |
137 | */ | 137 | */ |
138 | DistributionList *list( const QString &name ); | 138 | DistributionList *list( const QString &name ); |
139 | 139 | ||
140 | /** | 140 | /** |
141 | Insert distribution list. If a list with this name already exists, nothing | 141 | Insert distribution list. If a list with this name already exists, nothing |
142 | happens. | 142 | happens. |
143 | */ | 143 | */ |
144 | void insert( DistributionList * ); | 144 | void insert( DistributionList * ); |
145 | 145 | ||
146 | /** | 146 | /** |
147 | Remove distribution list. If a list with this name doesn't exist, nothing | 147 | Remove distribution list. If a list with this name doesn't exist, nothing |
148 | happens. | 148 | happens. |
149 | */ | 149 | */ |
150 | void remove( DistributionList * ); | 150 | void remove( DistributionList * ); |
151 | 151 | ||
152 | /** | 152 | /** |
153 | Return names of all distribution lists managed by this manager. | 153 | Return names of all distribution lists managed by this manager. |
154 | */ | 154 | */ |
155 | QStringList listNames(); | 155 | QStringList listNames(); |
156 | 156 | ||
157 | /** | 157 | /** |
158 | Load distribution lists form disk. | 158 | Load distribution lists form disk. |
159 | */ | 159 | */ |
160 | bool load(); | 160 | bool load(); |
161 | 161 | ||
162 | /** | 162 | /** |
163 | Save distribution lists to disk. | 163 | Save distribution lists to disk. |
164 | */ | 164 | */ |
165 | bool save(); | 165 | bool save(); |
166 | 166 | ||
167 | private: | 167 | private: |
168 | AddressBook *mAddressBook; | 168 | AddressBook *mAddressBook; |
169 | 169 | ||
170 | QPtrList<DistributionList> mLists; | 170 | QPtrList<DistributionList> mLists; |
171 | }; | 171 | }; |
172 | 172 | ||
173 | /** | 173 | /** |
174 | @short Watchdog for distribution lists | 174 | @short Watchdog for distribution lists |
175 | 175 | ||
176 | This class provides a @ref changed() signal that i emitted when the | 176 | This class provides a @ref changed() signal that i emitted when the |
177 | distribution lists has changed in some way. | 177 | distribution lists has changed in some way. |
178 | 178 | ||
179 | Exapmle: | 179 | Exapmle: |
180 | 180 | ||
181 | <pre> | 181 | <pre> |
182 | KABC::DistributionListWatcher *watchdog = KABC::DistributionListWatcher::self() | 182 | KABC::DistributionListWatcher *watchdog = KABC::DistributionListWatcher::self() |
183 | 183 | ||
184 | connect( watchdog, SIGNAL( changed() ), SLOT( doSomething() ) ); | 184 | connect( watchdog, SIGNAL( changed() ), SLOT( doSomething() ) ); |
185 | </pre> | 185 | </pre> |
186 | */ | 186 | */ |
187 | 187 | ||
188 | class DistributionListWatcher : public QObject | 188 | class DistributionListWatcher : public QObject |
189 | { | 189 | { |
190 | Q_OBJECT | 190 | Q_OBJECT |
191 | 191 | ||
192 | public: | 192 | public: |
193 | /** | 193 | /** |
194 | * Returns the watcher object. | 194 | * Returns the watcher object. |
195 | */ | 195 | */ |
196 | static DistributionListWatcher *self(); | 196 | static DistributionListWatcher *self(); |
197 | 197 | ||
198 | 198 | ||
199 | signals: | 199 | signals: |
200 | /** | 200 | /** |
201 | * This signal is emmitted whenever the distribution lists has | 201 | * This signal is emmitted whenever the distribution lists has |
202 | * changed (if a list was added or removed, when a list was | 202 | * changed (if a list was added or removed, when a list was |
203 | * renamed or the entries of the list changed). | 203 | * renamed or the entries of the list changed). |
204 | */ | 204 | */ |
205 | void changed(); | 205 | void changed(); |
206 | 206 | ||
207 | protected: | 207 | protected: |
208 | DistributionListWatcher(); | 208 | DistributionListWatcher(); |
209 | ~DistributionListWatcher(); | 209 | ~DistributionListWatcher(); |
210 | 210 | ||
211 | private: | 211 | private: |
212 | static DistributionListWatcher* mSelf; | 212 | static DistributionListWatcher* mSelf; |
213 | #ifndef KAB_EMBEDDED | 213 | //US KDirWatch *mDirWatch; |
214 | KDirWatch *mDirWatch; | ||
215 | #endif //KAB_EMBEDDED | ||
216 | }; | 214 | }; |
217 | 215 | ||
218 | } | 216 | } |
219 | #endif | 217 | #endif |