-rw-r--r-- | libopie/pim/opimnotifymanager.cpp | 4 | ||||
-rw-r--r-- | libopie/pim/otodo.cpp | 8 | ||||
-rw-r--r-- | libopie/pim/otodo.h | 8 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimnotifymanager.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.cpp | 8 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.h | 8 |
6 files changed, 34 insertions, 6 deletions
diff --git a/libopie/pim/opimnotifymanager.cpp b/libopie/pim/opimnotifymanager.cpp index 49af757..06b5987 100644 --- a/libopie/pim/opimnotifymanager.cpp +++ b/libopie/pim/opimnotifymanager.cpp | |||
@@ -59,14 +59,16 @@ void OPimNotifyManager::registerNotify( const OPimNotify& ) { | |||
59 | 59 | ||
60 | } | 60 | } |
61 | /* FIXME!!! */ | 61 | /* FIXME!!! */ |
62 | /** | 62 | /** |
63 | * same as above... | 63 | * same as above... |
64 | * Also implement Url model | 64 | * Also implement Url model |
65 | * have a MainWindow.... | 65 | * have a MainWindow.... |
66 | */ | 66 | */ |
67 | void OPimNotifyManager::deregister( const OPimNotify& ) { | 67 | void OPimNotifyManager::deregister( const OPimNotify& ) { |
68 | 68 | ||
69 | } | 69 | } |
70 | bool OPimNotifyManager::isEmpty()const { | 70 | bool OPimNotifyManager::isEmpty()const { |
71 | return ( m_rem.isEmpty() && m_al.isEmpty() ); | 71 | qWarning("is Empty called on OPimNotifyManager %d %d", m_rem.count(), m_al.count() ); |
72 | if ( m_rem.isEmpty() && m_al.isEmpty() ) return true; | ||
73 | else return false; | ||
72 | } | 74 | } |
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp index f3df119..a29d88e 100644 --- a/libopie/pim/otodo.cpp +++ b/libopie/pim/otodo.cpp | |||
@@ -289,31 +289,37 @@ QString OTodo::toRichText() const | |||
289 | text += dueDate().toString(); | 289 | text += dueDate().toString(); |
290 | text += "<br>"; | 290 | text += "<br>"; |
291 | } | 291 | } |
292 | 292 | ||
293 | text += "<b>" + QObject::tr( "Category:") + "</b> "; | 293 | text += "<b>" + QObject::tr( "Category:") + "</b> "; |
294 | text += categoryNames( "Todo List" ).join(", "); | 294 | text += categoryNames( "Todo List" ).join(", "); |
295 | text += "<br>"; | 295 | text += "<br>"; |
296 | 296 | ||
297 | return text; | 297 | return text; |
298 | } | 298 | } |
299 | bool OTodo::hasNotifiers()const { | 299 | bool OTodo::hasNotifiers()const { |
300 | if (!data->notifiers) return false; | 300 | if (!data->notifiers) return false; |
301 | return data->notifiers->isEmpty(); | 301 | return !data->notifiers->isEmpty(); |
302 | } | 302 | } |
303 | OPimNotifyManager& OTodo::notifiers() { | 303 | OPimNotifyManager& OTodo::notifiers() { |
304 | if (!data->notifiers ) | 304 | if (!data->notifiers ) |
305 | data->notifiers = new OPimNotifyManager; | 305 | data->notifiers = new OPimNotifyManager; |
306 | return (*data->notifiers); | 306 | return (*data->notifiers); |
307 | } | 307 | } |
308 | const OPimNotifyManager& OTodo::notifiers()const{ | ||
309 | if (!data->notifiers ) | ||
310 | data->notifiers = new OPimNotifyManager; | ||
311 | |||
312 | return (*data->notifiers); | ||
313 | } | ||
308 | 314 | ||
309 | bool OTodo::operator<( const OTodo &toDoEvent )const{ | 315 | bool OTodo::operator<( const OTodo &toDoEvent )const{ |
310 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; | 316 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; |
311 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; | 317 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; |
312 | if( hasDueDate() && toDoEvent.hasDueDate() ){ | 318 | if( hasDueDate() && toDoEvent.hasDueDate() ){ |
313 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide | 319 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide |
314 | return priority() < toDoEvent.priority(); | 320 | return priority() < toDoEvent.priority(); |
315 | }else{ | 321 | }else{ |
316 | return dueDate() < toDoEvent.dueDate(); | 322 | return dueDate() < toDoEvent.dueDate(); |
317 | } | 323 | } |
318 | } | 324 | } |
319 | return false; | 325 | return false; |
diff --git a/libopie/pim/otodo.h b/libopie/pim/otodo.h index 0e7c73f..4d5ee36 100644 --- a/libopie/pim/otodo.h +++ b/libopie/pim/otodo.h | |||
@@ -166,32 +166,38 @@ public: | |||
166 | * A small summary of the todo | 166 | * A small summary of the todo |
167 | */ | 167 | */ |
168 | QString summary() const; | 168 | QString summary() const; |
169 | 169 | ||
170 | /** | 170 | /** |
171 | * @reimplemented | 171 | * @reimplemented |
172 | * Return this todoevent in a RichText formatted QString | 172 | * Return this todoevent in a RichText formatted QString |
173 | */ | 173 | */ |
174 | QString toRichText() const; | 174 | QString toRichText() const; |
175 | 175 | ||
176 | bool hasNotifiers()const; | 176 | bool hasNotifiers()const; |
177 | /* | 177 | /* |
178 | * check if the sharing is still fine!! -zecke | 178 | * FIXME check if the sharing is still fine!! -zecke |
179 | * ### CHECK If API is fine | ||
179 | */ | 180 | */ |
180 | /** | 181 | /** |
181 | * return a reference to our notifiers... | 182 | * return a reference to our notifiers... |
182 | */ | 183 | */ |
183 | OPimNotifyManager ¬ifiers(); | 184 | OPimNotifyManager ¬ifiers(); |
184 | 185 | ||
185 | /** | 186 | /** |
187 | * | ||
188 | */ | ||
189 | const OPimNotifyManager ¬ifiers()const; | ||
190 | |||
191 | /** | ||
186 | * reimplementations | 192 | * reimplementations |
187 | */ | 193 | */ |
188 | QString type()const; | 194 | QString type()const; |
189 | QString toShortText()const; | 195 | QString toShortText()const; |
190 | QMap<QString, QString> toExtraMap()const; | 196 | QMap<QString, QString> toExtraMap()const; |
191 | QString recordField(int id )const; | 197 | QString recordField(int id )const; |
192 | 198 | ||
193 | /** | 199 | /** |
194 | * toMap puts all data into the map. int relates | 200 | * toMap puts all data into the map. int relates |
195 | * to ToDoEvent RecordFields enum | 201 | * to ToDoEvent RecordFields enum |
196 | */ | 202 | */ |
197 | QMap<int, QString> toMap()const; | 203 | QMap<int, QString> toMap()const; |
diff --git a/libopie2/opiepim/core/opimnotifymanager.cpp b/libopie2/opiepim/core/opimnotifymanager.cpp index 49af757..06b5987 100644 --- a/libopie2/opiepim/core/opimnotifymanager.cpp +++ b/libopie2/opiepim/core/opimnotifymanager.cpp | |||
@@ -59,14 +59,16 @@ void OPimNotifyManager::registerNotify( const OPimNotify& ) { | |||
59 | 59 | ||
60 | } | 60 | } |
61 | /* FIXME!!! */ | 61 | /* FIXME!!! */ |
62 | /** | 62 | /** |
63 | * same as above... | 63 | * same as above... |
64 | * Also implement Url model | 64 | * Also implement Url model |
65 | * have a MainWindow.... | 65 | * have a MainWindow.... |
66 | */ | 66 | */ |
67 | void OPimNotifyManager::deregister( const OPimNotify& ) { | 67 | void OPimNotifyManager::deregister( const OPimNotify& ) { |
68 | 68 | ||
69 | } | 69 | } |
70 | bool OPimNotifyManager::isEmpty()const { | 70 | bool OPimNotifyManager::isEmpty()const { |
71 | return ( m_rem.isEmpty() && m_al.isEmpty() ); | 71 | qWarning("is Empty called on OPimNotifyManager %d %d", m_rem.count(), m_al.count() ); |
72 | if ( m_rem.isEmpty() && m_al.isEmpty() ) return true; | ||
73 | else return false; | ||
72 | } | 74 | } |
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index f3df119..a29d88e 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp | |||
@@ -289,31 +289,37 @@ QString OTodo::toRichText() const | |||
289 | text += dueDate().toString(); | 289 | text += dueDate().toString(); |
290 | text += "<br>"; | 290 | text += "<br>"; |
291 | } | 291 | } |
292 | 292 | ||
293 | text += "<b>" + QObject::tr( "Category:") + "</b> "; | 293 | text += "<b>" + QObject::tr( "Category:") + "</b> "; |
294 | text += categoryNames( "Todo List" ).join(", "); | 294 | text += categoryNames( "Todo List" ).join(", "); |
295 | text += "<br>"; | 295 | text += "<br>"; |
296 | 296 | ||
297 | return text; | 297 | return text; |
298 | } | 298 | } |
299 | bool OTodo::hasNotifiers()const { | 299 | bool OTodo::hasNotifiers()const { |
300 | if (!data->notifiers) return false; | 300 | if (!data->notifiers) return false; |
301 | return data->notifiers->isEmpty(); | 301 | return !data->notifiers->isEmpty(); |
302 | } | 302 | } |
303 | OPimNotifyManager& OTodo::notifiers() { | 303 | OPimNotifyManager& OTodo::notifiers() { |
304 | if (!data->notifiers ) | 304 | if (!data->notifiers ) |
305 | data->notifiers = new OPimNotifyManager; | 305 | data->notifiers = new OPimNotifyManager; |
306 | return (*data->notifiers); | 306 | return (*data->notifiers); |
307 | } | 307 | } |
308 | const OPimNotifyManager& OTodo::notifiers()const{ | ||
309 | if (!data->notifiers ) | ||
310 | data->notifiers = new OPimNotifyManager; | ||
311 | |||
312 | return (*data->notifiers); | ||
313 | } | ||
308 | 314 | ||
309 | bool OTodo::operator<( const OTodo &toDoEvent )const{ | 315 | bool OTodo::operator<( const OTodo &toDoEvent )const{ |
310 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; | 316 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; |
311 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; | 317 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; |
312 | if( hasDueDate() && toDoEvent.hasDueDate() ){ | 318 | if( hasDueDate() && toDoEvent.hasDueDate() ){ |
313 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide | 319 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide |
314 | return priority() < toDoEvent.priority(); | 320 | return priority() < toDoEvent.priority(); |
315 | }else{ | 321 | }else{ |
316 | return dueDate() < toDoEvent.dueDate(); | 322 | return dueDate() < toDoEvent.dueDate(); |
317 | } | 323 | } |
318 | } | 324 | } |
319 | return false; | 325 | return false; |
diff --git a/libopie2/opiepim/otodo.h b/libopie2/opiepim/otodo.h index 0e7c73f..4d5ee36 100644 --- a/libopie2/opiepim/otodo.h +++ b/libopie2/opiepim/otodo.h | |||
@@ -166,32 +166,38 @@ public: | |||
166 | * A small summary of the todo | 166 | * A small summary of the todo |
167 | */ | 167 | */ |
168 | QString summary() const; | 168 | QString summary() const; |
169 | 169 | ||
170 | /** | 170 | /** |
171 | * @reimplemented | 171 | * @reimplemented |
172 | * Return this todoevent in a RichText formatted QString | 172 | * Return this todoevent in a RichText formatted QString |
173 | */ | 173 | */ |
174 | QString toRichText() const; | 174 | QString toRichText() const; |
175 | 175 | ||
176 | bool hasNotifiers()const; | 176 | bool hasNotifiers()const; |
177 | /* | 177 | /* |
178 | * check if the sharing is still fine!! -zecke | 178 | * FIXME check if the sharing is still fine!! -zecke |
179 | * ### CHECK If API is fine | ||
179 | */ | 180 | */ |
180 | /** | 181 | /** |
181 | * return a reference to our notifiers... | 182 | * return a reference to our notifiers... |
182 | */ | 183 | */ |
183 | OPimNotifyManager ¬ifiers(); | 184 | OPimNotifyManager ¬ifiers(); |
184 | 185 | ||
185 | /** | 186 | /** |
187 | * | ||
188 | */ | ||
189 | const OPimNotifyManager ¬ifiers()const; | ||
190 | |||
191 | /** | ||
186 | * reimplementations | 192 | * reimplementations |
187 | */ | 193 | */ |
188 | QString type()const; | 194 | QString type()const; |
189 | QString toShortText()const; | 195 | QString toShortText()const; |
190 | QMap<QString, QString> toExtraMap()const; | 196 | QMap<QString, QString> toExtraMap()const; |
191 | QString recordField(int id )const; | 197 | QString recordField(int id )const; |
192 | 198 | ||
193 | /** | 199 | /** |
194 | * toMap puts all data into the map. int relates | 200 | * toMap puts all data into the map. int relates |
195 | * to ToDoEvent RecordFields enum | 201 | * to ToDoEvent RecordFields enum |
196 | */ | 202 | */ |
197 | QMap<int, QString> toMap()const; | 203 | QMap<int, QString> toMap()const; |