author | zautrix <zautrix> | 2004-10-26 22:19:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-26 22:19:18 (UTC) |
commit | 6385f303bef3cbcd19d097a7b05c30e144d5dd6e (patch) (unidiff) | |
tree | 770795d94ea6ec1dc8bcaa67cc174a9c0add564a /libkcal/incidencebase.cpp | |
parent | 13e996beddabc5e88f4f2fe49b2ce6cb8408eb30 (diff) | |
download | kdepimpi-6385f303bef3cbcd19d097a7b05c30e144d5dd6e.zip kdepimpi-6385f303bef3cbcd19d097a7b05c30e144d5dd6e.tar.gz kdepimpi-6385f303bef3cbcd19d097a7b05c30e144d5dd6e.tar.bz2 |
implemented remove sync info for kopi and kapi
-rw-r--r-- | libkcal/incidencebase.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index b36dc1a..9aa517c 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp | |||
@@ -308,97 +308,100 @@ int IncidenceBase::duration() const | |||
308 | { | 308 | { |
309 | return mDuration; | 309 | return mDuration; |
310 | } | 310 | } |
311 | 311 | ||
312 | void IncidenceBase::setHasDuration(bool b) | 312 | void IncidenceBase::setHasDuration(bool b) |
313 | { | 313 | { |
314 | mHasDuration = b; | 314 | mHasDuration = b; |
315 | } | 315 | } |
316 | 316 | ||
317 | bool IncidenceBase::hasDuration() const | 317 | bool IncidenceBase::hasDuration() const |
318 | { | 318 | { |
319 | return mHasDuration; | 319 | return mHasDuration; |
320 | } | 320 | } |
321 | 321 | ||
322 | void IncidenceBase::setSyncStatus(int stat) | 322 | void IncidenceBase::setSyncStatus(int stat) |
323 | { | 323 | { |
324 | if (mReadOnly) return; | 324 | if (mReadOnly) return; |
325 | mSyncStatus = stat; | 325 | mSyncStatus = stat; |
326 | } | 326 | } |
327 | 327 | ||
328 | int IncidenceBase::syncStatus() const | 328 | int IncidenceBase::syncStatus() const |
329 | { | 329 | { |
330 | return mSyncStatus; | 330 | return mSyncStatus; |
331 | } | 331 | } |
332 | 332 | ||
333 | void IncidenceBase::setPilotId( int id ) | 333 | void IncidenceBase::setPilotId( int id ) |
334 | { | 334 | { |
335 | if (mReadOnly) return; | 335 | if (mReadOnly) return; |
336 | mPilotId = id; | 336 | mPilotId = id; |
337 | } | 337 | } |
338 | 338 | ||
339 | int IncidenceBase::pilotId() const | 339 | int IncidenceBase::pilotId() const |
340 | { | 340 | { |
341 | return mPilotId; | 341 | return mPilotId; |
342 | } | 342 | } |
343 | 343 | ||
344 | int IncidenceBase::tempSyncStat() const | 344 | int IncidenceBase::tempSyncStat() const |
345 | { | 345 | { |
346 | return mTempSyncStat; | 346 | return mTempSyncStat; |
347 | } | 347 | } |
348 | void IncidenceBase::setTempSyncStat( int id ) | 348 | void IncidenceBase::setTempSyncStat( int id ) |
349 | { | 349 | { |
350 | if (mReadOnly) return; | 350 | if (mReadOnly) return; |
351 | mTempSyncStat = id; | 351 | mTempSyncStat = id; |
352 | } | 352 | } |
353 | 353 | ||
354 | void IncidenceBase::removeID(const QString &prof) | 354 | void IncidenceBase::removeID(const QString &prof) |
355 | { | 355 | { |
356 | mExternalId = KIdManager::removeId ( mExternalId, prof); | 356 | if ( prof.isEmpty() ) |
357 | mExternalId = ":"; | ||
358 | else | ||
359 | mExternalId = KIdManager::removeId ( mExternalId, prof); | ||
357 | 360 | ||
358 | } | 361 | } |
359 | void IncidenceBase::setID( const QString & prof , const QString & id ) | 362 | void IncidenceBase::setID( const QString & prof , const QString & id ) |
360 | { | 363 | { |
361 | mExternalId = KIdManager::setId ( mExternalId, prof, id ); | 364 | mExternalId = KIdManager::setId ( mExternalId, prof, id ); |
362 | } | 365 | } |
363 | QString IncidenceBase::getID( const QString & prof) | 366 | QString IncidenceBase::getID( const QString & prof) |
364 | { | 367 | { |
365 | return KIdManager::getId ( mExternalId, prof ); | 368 | return KIdManager::getId ( mExternalId, prof ); |
366 | } | 369 | } |
367 | 370 | ||
368 | // example :Sharp_DTM;22;23566:TP;-1;8654:TPP;18;0: | 371 | // example :Sharp_DTM;22;23566:TP;-1;8654:TPP;18;0: |
369 | // format name;III;JJJ: III >= 0, may be -1. JJJ always >= 0 | 372 | // format name;III;JJJ: III >= 0, may be -1. JJJ always >= 0 |
370 | void IncidenceBase::setCsum( const QString & prof , const QString & id ) | 373 | void IncidenceBase::setCsum( const QString & prof , const QString & id ) |
371 | { | 374 | { |
372 | mExternalId = KIdManager::setCsum ( mExternalId, prof, id ); | 375 | mExternalId = KIdManager::setCsum ( mExternalId, prof, id ); |
373 | } | 376 | } |
374 | QString IncidenceBase::getCsum( const QString & prof) | 377 | QString IncidenceBase::getCsum( const QString & prof) |
375 | { | 378 | { |
376 | return KIdManager::getCsum ( mExternalId, prof ); | 379 | return KIdManager::getCsum ( mExternalId, prof ); |
377 | } | 380 | } |
378 | 381 | ||
379 | void IncidenceBase::setIDStr( const QString & s ) | 382 | void IncidenceBase::setIDStr( const QString & s ) |
380 | { | 383 | { |
381 | if (mReadOnly) return; | 384 | if (mReadOnly) return; |
382 | mExternalId = s; | 385 | mExternalId = s; |
383 | } | 386 | } |
384 | 387 | ||
385 | QString IncidenceBase::IDStr() const | 388 | QString IncidenceBase::IDStr() const |
386 | { | 389 | { |
387 | return mExternalId ; | 390 | return mExternalId ; |
388 | } | 391 | } |
389 | void IncidenceBase::registerObserver( IncidenceBase::Observer *observer ) | 392 | void IncidenceBase::registerObserver( IncidenceBase::Observer *observer ) |
390 | { | 393 | { |
391 | if( !mObservers.contains(observer) ) mObservers.append( observer ); | 394 | if( !mObservers.contains(observer) ) mObservers.append( observer ); |
392 | } | 395 | } |
393 | 396 | ||
394 | void IncidenceBase::unRegisterObserver( IncidenceBase::Observer *observer ) | 397 | void IncidenceBase::unRegisterObserver( IncidenceBase::Observer *observer ) |
395 | { | 398 | { |
396 | mObservers.remove( observer ); | 399 | mObservers.remove( observer ); |
397 | } | 400 | } |
398 | 401 | ||
399 | void IncidenceBase::updated() | 402 | void IncidenceBase::updated() |
400 | { | 403 | { |
401 | QPtrListIterator<Observer> it(mObservers); | 404 | QPtrListIterator<Observer> it(mObservers); |
402 | while( it.current() ) { | 405 | while( it.current() ) { |
403 | Observer *o = it.current(); | 406 | Observer *o = it.current(); |
404 | ++it; | 407 | ++it; |