author | mickeyl <mickeyl> | 2004-02-24 12:46:23 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-24 12:46:23 (UTC) |
commit | 911473db35a9fce5f3589f03c27210456faaba86 (patch) (unidiff) | |
tree | 7d55b6117b24de6ab18747b00a4641d38001c0ed /libopie2/opiepim/backend/otodoaccessvcal.cpp | |
parent | a2ead23c3614fe581261455cb4c3f31cee2098f3 (diff) | |
download | opie-911473db35a9fce5f3589f03c27210456faaba86.zip opie-911473db35a9fce5f3589f03c27210456faaba86.tar.gz opie-911473db35a9fce5f3589f03c27210456faaba86.tar.bz2 |
*phew* here is the class and file rename patch. not converted yet: backend,
but that will be not visible to application classes so we can change it later.
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessvcal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessvcal.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.cpp b/libopie2/opiepim/backend/otodoaccessvcal.cpp index e364ee2..0a1baf9 100644 --- a/libopie2/opiepim/backend/otodoaccessvcal.cpp +++ b/libopie2/opiepim/backend/otodoaccessvcal.cpp | |||
@@ -37,8 +37,8 @@ | |||
37 | using namespace Opie; | 37 | using namespace Opie; |
38 | 38 | ||
39 | namespace { | 39 | namespace { |
40 | static OTodo eventByVObj( VObject *obj ){ | 40 | static OPimTodo eventByVObj( VObject *obj ){ |
41 | OTodo event; | 41 | OPimTodo event; |
42 | VObject *ob; | 42 | VObject *ob; |
43 | QCString name; | 43 | QCString name; |
44 | // no uid, attendees, ... and no fun | 44 | // no uid, attendees, ... and no fun |
@@ -91,7 +91,7 @@ namespace { | |||
91 | event.setUid( 1 ); | 91 | event.setUid( 1 ); |
92 | return event; | 92 | return event; |
93 | }; | 93 | }; |
94 | static VObject *vobjByEvent( const OTodo &event ) { | 94 | static VObject *vobjByEvent( const OPimTodo &event ) { |
95 | VObject *task = newVObject( VCTodoProp ); | 95 | VObject *task = newVObject( VCTodoProp ); |
96 | if( task == 0 ) | 96 | if( task == 0 ) |
97 | return 0l; | 97 | return 0l; |
@@ -138,13 +138,13 @@ namespace { | |||
138 | } | 138 | } |
139 | 139 | ||
140 | namespace Opie { | 140 | namespace Opie { |
141 | OTodoAccessVCal::OTodoAccessVCal( const QString& path ) | 141 | OPimTodoAccessVCal::OPimTodoAccessVCal( const QString& path ) |
142 | : m_dirty(false), m_file( path ) | 142 | : m_dirty(false), m_file( path ) |
143 | { | 143 | { |
144 | } | 144 | } |
145 | OTodoAccessVCal::~OTodoAccessVCal() { | 145 | OPimTodoAccessVCal::~OPimTodoAccessVCal() { |
146 | } | 146 | } |
147 | bool OTodoAccessVCal::load() { | 147 | bool OPimTodoAccessVCal::load() { |
148 | m_map.clear(); | 148 | m_map.clear(); |
149 | m_dirty = false; | 149 | m_dirty = false; |
150 | 150 | ||
@@ -163,7 +163,7 @@ bool OTodoAccessVCal::load() { | |||
163 | vobj = ::nextVObject( &it ); | 163 | vobj = ::nextVObject( &it ); |
164 | QCString name = ::vObjectName( vobj ); | 164 | QCString name = ::vObjectName( vobj ); |
165 | if( name == VCTodoProp ){ | 165 | if( name == VCTodoProp ){ |
166 | OTodo to = eventByVObj( vobj ); | 166 | OPimTodo to = eventByVObj( vobj ); |
167 | m_map.insert( to.uid(), to ); | 167 | m_map.insert( to.uid(), to ); |
168 | } | 168 | } |
169 | } | 169 | } |
@@ -172,10 +172,10 @@ bool OTodoAccessVCal::load() { | |||
172 | 172 | ||
173 | return true; | 173 | return true; |
174 | } | 174 | } |
175 | bool OTodoAccessVCal::reload() { | 175 | bool OPimTodoAccessVCal::reload() { |
176 | return load(); | 176 | return load(); |
177 | } | 177 | } |
178 | bool OTodoAccessVCal::save() { | 178 | bool OPimTodoAccessVCal::save() { |
179 | if (!m_dirty ) | 179 | if (!m_dirty ) |
180 | return true; | 180 | return true; |
181 | 181 | ||
@@ -187,7 +187,7 @@ bool OTodoAccessVCal::save() { | |||
187 | obj = newVObject( VCCalProp ); | 187 | obj = newVObject( VCCalProp ); |
188 | addPropValue( obj, VCVersionProp, "1.0" ); | 188 | addPropValue( obj, VCVersionProp, "1.0" ); |
189 | VObject *vo; | 189 | VObject *vo; |
190 | for(QMap<int, OTodo>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ | 190 | for(QMap<int, OPimTodo>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ |
191 | vo = vobjByEvent( it.data() ); | 191 | vo = vobjByEvent( it.data() ); |
192 | addVObjectProp(obj, vo ); | 192 | addVObjectProp(obj, vo ); |
193 | } | 193 | } |
@@ -198,41 +198,41 @@ bool OTodoAccessVCal::save() { | |||
198 | m_dirty = false; | 198 | m_dirty = false; |
199 | return true; | 199 | return true; |
200 | } | 200 | } |
201 | void OTodoAccessVCal::clear() { | 201 | void OPimTodoAccessVCal::clear() { |
202 | m_map.clear(); | 202 | m_map.clear(); |
203 | m_dirty = true; | 203 | m_dirty = true; |
204 | } | 204 | } |
205 | bool OTodoAccessVCal::add( const OTodo& to ) { | 205 | bool OPimTodoAccessVCal::add( const OPimTodo& to ) { |
206 | m_map.insert( to.uid(), to ); | 206 | m_map.insert( to.uid(), to ); |
207 | m_dirty = true; | 207 | m_dirty = true; |
208 | return true; | 208 | return true; |
209 | } | 209 | } |
210 | bool OTodoAccessVCal::remove( int uid ) { | 210 | bool OPimTodoAccessVCal::remove( int uid ) { |
211 | m_map.remove( uid ); | 211 | m_map.remove( uid ); |
212 | m_dirty = true; | 212 | m_dirty = true; |
213 | return true; | 213 | return true; |
214 | } | 214 | } |
215 | void OTodoAccessVCal::removeAllCompleted() { | 215 | void OPimTodoAccessVCal::removeAllCompleted() { |
216 | for ( QMap<int, OTodo>::Iterator it = m_map.begin(); it != m_map.end(); ++it ) { | 216 | for ( QMap<int, OPimTodo>::Iterator it = m_map.begin(); it != m_map.end(); ++it ) { |
217 | if ( (*it).isCompleted() ) | 217 | if ( (*it).isCompleted() ) |
218 | m_map.remove( it ); | 218 | m_map.remove( it ); |
219 | } | 219 | } |
220 | } | 220 | } |
221 | bool OTodoAccessVCal::replace( const OTodo& to ) { | 221 | bool OPimTodoAccessVCal::replace( const OPimTodo& to ) { |
222 | m_map.replace( to.uid(), to ); | 222 | m_map.replace( to.uid(), to ); |
223 | m_dirty = true; | 223 | m_dirty = true; |
224 | return true; | 224 | return true; |
225 | } | 225 | } |
226 | OTodo OTodoAccessVCal::find(int uid )const { | 226 | OPimTodo OPimTodoAccessVCal::find(int uid )const { |
227 | return m_map[uid]; | 227 | return m_map[uid]; |
228 | } | 228 | } |
229 | QArray<int> OTodoAccessVCal::sorted( bool, int, int, int ) { | 229 | QArray<int> OPimTodoAccessVCal::sorted( bool, int, int, int ) { |
230 | QArray<int> ar(0); | 230 | QArray<int> ar(0); |
231 | return ar; | 231 | return ar; |
232 | } | 232 | } |
233 | QArray<int> OTodoAccessVCal::allRecords()const { | 233 | QArray<int> OPimTodoAccessVCal::allRecords()const { |
234 | QArray<int> ar( m_map.count() ); | 234 | QArray<int> ar( m_map.count() ); |
235 | QMap<int, OTodo>::ConstIterator it; | 235 | QMap<int, OPimTodo>::ConstIterator it; |
236 | int i = 0; | 236 | int i = 0; |
237 | for ( it = m_map.begin(); it != m_map.end(); ++it ) { | 237 | for ( it = m_map.begin(); it != m_map.end(); ++it ) { |
238 | ar[i] = it.key(); | 238 | ar[i] = it.key(); |
@@ -240,41 +240,41 @@ QArray<int> OTodoAccessVCal::allRecords()const { | |||
240 | } | 240 | } |
241 | return ar; | 241 | return ar; |
242 | } | 242 | } |
243 | QArray<int> OTodoAccessVCal::matchRegexp(const QRegExp& /* r */)const { | 243 | QArray<int> OPimTodoAccessVCal::matchRegexp(const QRegExp& /* r */)const { |
244 | QArray<int> ar(0); | 244 | QArray<int> ar(0); |
245 | return ar; | 245 | return ar; |
246 | } | 246 | } |
247 | QArray<int> OTodoAccessVCal::queryByExample( const OTodo&, int, const QDateTime& ) { | 247 | QArray<int> OPimTodoAccessVCal::queryByExample( const OPimTodo&, int, const QDateTime& ) { |
248 | QArray<int> ar(0); | 248 | QArray<int> ar(0); |
249 | return ar; | 249 | return ar; |
250 | } | 250 | } |
251 | QArray<int> OTodoAccessVCal::effectiveToDos( const QDate& , | 251 | QArray<int> OPimTodoAccessVCal::effectiveToDos( const QDate& , |
252 | const QDate& , | 252 | const QDate& , |
253 | bool ) { | 253 | bool ) { |
254 | QArray<int> ar(0); | 254 | QArray<int> ar(0); |
255 | return ar; | 255 | return ar; |
256 | } | 256 | } |
257 | QArray<int> OTodoAccessVCal::overDue() { | 257 | QArray<int> OPimTodoAccessVCal::overDue() { |
258 | QArray<int> ar(0); | 258 | QArray<int> ar(0); |
259 | return ar; | 259 | return ar; |
260 | } | 260 | } |
261 | QBitArray OTodoAccessVCal::supports()const { | 261 | QBitArray OPimTodoAccessVCal::supports()const { |
262 | static QBitArray ar = sup(); | 262 | static QBitArray ar = sup(); |
263 | 263 | ||
264 | return ar; | 264 | return ar; |
265 | } | 265 | } |
266 | QBitArray OTodoAccessVCal::sup() { | 266 | QBitArray OPimTodoAccessVCal::sup() { |
267 | QBitArray ar ( OTodo::CompletedDate +1 ); | 267 | QBitArray ar ( OPimTodo::CompletedDate +1 ); |
268 | ar.fill( true ); | 268 | ar.fill( true ); |
269 | 269 | ||
270 | ar[OTodo::CrossReference] = false; | 270 | ar[OPimTodo::CrossReference] = false; |
271 | ar[OTodo::State ] = false; | 271 | ar[OPimTodo::State ] = false; |
272 | ar[OTodo::Reminders] = false; | 272 | ar[OPimTodo::Reminders] = false; |
273 | ar[OTodo::Notifiers] = false; | 273 | ar[OPimTodo::Notifiers] = false; |
274 | ar[OTodo::Maintainer] = false; | 274 | ar[OPimTodo::Maintainer] = false; |
275 | ar[OTodo::Progress] = false; | 275 | ar[OPimTodo::Progress] = false; |
276 | ar[OTodo::Alarms ] = false; | 276 | ar[OPimTodo::Alarms ] = false; |
277 | ar[OTodo::Recurrence] = false; | 277 | ar[OPimTodo::Recurrence] = false; |
278 | 278 | ||
279 | return ar; | 279 | return ar; |
280 | } | 280 | } |