author | zautrix <zautrix> | 2005-11-25 15:49:13 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-11-25 15:49:13 (UTC) |
commit | 794a5204686ad9bfc16172b01db35f1f3b7683e5 (patch) (unidiff) | |
tree | 29da2cb35a4d6a0cd6885436087fe0659b58a9f4 /kaddressbook | |
parent | 90b62d1158d00f162a258541e24aaed4c967480b (diff) | |
download | kdepimpi-794a5204686ad9bfc16172b01db35f1f3b7683e5.zip kdepimpi-794a5204686ad9bfc16172b01db35f1f3b7683e5.tar.gz kdepimpi-794a5204686ad9bfc16172b01db35f1f3b7683e5.tar.bz2 |
sync
-rw-r--r-- | kaddressbook/kabcore.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 033e537..2dea619 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -3212,193 +3212,193 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
3212 | qApp->processEvents(); | 3212 | qApp->processEvents(); |
3213 | if (syncManager->isProgressBarCanceled()) | 3213 | if (syncManager->isProgressBarCanceled()) |
3214 | return false; | 3214 | return false; |
3215 | if ( incCounter % modulo == 0 ) | 3215 | if ( incCounter % modulo == 0 ) |
3216 | syncManager->showProgressBar(incCounter); | 3216 | syncManager->showProgressBar(incCounter); |
3217 | uid = el[ incCounter ]; | 3217 | uid = el[ incCounter ]; |
3218 | bool skipIncidence = false; | 3218 | bool skipIncidence = false; |
3219 | if ( uid.left(19) == QString("last-syncAddressee-") ) | 3219 | if ( uid.left(19) == QString("last-syncAddressee-") ) |
3220 | skipIncidence = true; | 3220 | skipIncidence = true; |
3221 | if ( !skipIncidence ) { | 3221 | if ( !skipIncidence ) { |
3222 | inL = local->findByUid( uid ); | 3222 | inL = local->findByUid( uid ); |
3223 | if ( !inL.resource() || inL.resource()->includeInSync() ) { | 3223 | if ( !inL.resource() || inL.resource()->includeInSync() ) { |
3224 | inR = remote->findByUid( uid ); | 3224 | inR = remote->findByUid( uid ); |
3225 | if ( inR.isEmpty() ){ | 3225 | if ( inR.isEmpty() ){ |
3226 | if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) { | 3226 | if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) { |
3227 | // no conflict ********** add or delete local | 3227 | // no conflict ********** add or delete local |
3228 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 3228 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
3229 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { | 3229 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { |
3230 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 3230 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
3231 | local->removeAddressee( inL ); | 3231 | local->removeAddressee( inL ); |
3232 | ++deletedAddresseeL; | 3232 | ++deletedAddresseeL; |
3233 | } else { | 3233 | } else { |
3234 | if ( ! syncManager->mWriteBackExistingOnly ) { | 3234 | if ( ! syncManager->mWriteBackExistingOnly ) { |
3235 | inL.removeID(mCurrentSyncDevice ); | 3235 | inL.removeID(mCurrentSyncDevice ); |
3236 | ++addedAddresseeR; | 3236 | ++addedAddresseeR; |
3237 | inL.setRevision( modifiedCalendar ); | 3237 | inL.setRevision( modifiedCalendar ); |
3238 | local->insertAddressee( inL, false ); | 3238 | local->insertAddressee( inL, false ); |
3239 | inR = inL; | 3239 | inR = inL; |
3240 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); | 3240 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); |
3241 | inR.setResource( 0 ); | 3241 | inR.setResource( 0 ); |
3242 | remote->insertAddressee( inR, false ); | 3242 | remote->insertAddressee( inR, false ); |
3243 | } | 3243 | } |
3244 | } | 3244 | } |
3245 | } else { | 3245 | } else { |
3246 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { | 3246 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { |
3247 | //qDebug("data %s ", inL.revision().toString().latin1()); | 3247 | //qDebug("data %s ", inL.revision().toString().latin1()); |
3248 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 3248 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
3249 | local->removeAddressee( inL ); | 3249 | local->removeAddressee( inL ); |
3250 | ++deletedAddresseeL; | 3250 | ++deletedAddresseeL; |
3251 | } else { | 3251 | } else { |
3252 | if ( ! syncManager->mWriteBackExistingOnly ) { | 3252 | if ( ! syncManager->mWriteBackExistingOnly ) { |
3253 | ++addedAddresseeR; | 3253 | ++addedAddresseeR; |
3254 | inL.setRevision( modifiedCalendar ); | 3254 | inL.setRevision( modifiedCalendar ); |
3255 | local->insertAddressee( inL, false ); | 3255 | local->insertAddressee( inL, false ); |
3256 | inR = inL; | 3256 | inR = inL; |
3257 | inR.setIDStr( ":" ); | 3257 | inR.setIDStr( ":" ); |
3258 | inR.setResource( 0 ); | 3258 | inR.setResource( 0 ); |
3259 | remote->insertAddressee( inR, false ); | 3259 | remote->insertAddressee( inR, false ); |
3260 | } | 3260 | } |
3261 | } | 3261 | } |
3262 | } | 3262 | } |
3263 | } else { | 3263 | } else { |
3264 | ++filteredOUT; | 3264 | ++filteredOUT; |
3265 | } | 3265 | } |
3266 | } | 3266 | } |
3267 | } | 3267 | } |
3268 | } | 3268 | } |
3269 | ++incCounter; | 3269 | ++incCounter; |
3270 | } | 3270 | } |
3271 | el.clear(); | 3271 | el.clear(); |
3272 | syncManager->hideProgressBar(); | 3272 | syncManager->hideProgressBar(); |
3273 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); | 3273 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); |
3274 | // get rid of micro seconds | 3274 | // get rid of micro seconds |
3275 | QTime t = mLastAddressbookSync.time(); | 3275 | QTime t = mLastAddressbookSync.time(); |
3276 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); | 3276 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); |
3277 | addresseeLSync.setRevision( mLastAddressbookSync ); | 3277 | addresseeLSync.setRevision( mLastAddressbookSync ); |
3278 | addresseeRSync.setRevision( mLastAddressbookSync ); | 3278 | addresseeRSync.setRevision( mLastAddressbookSync ); |
3279 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; | 3279 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; |
3280 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); | 3280 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); |
3281 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; | 3281 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; |
3282 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); | 3282 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); |
3283 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; | 3283 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; |
3284 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); | 3284 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); |
3285 | addresseeRSync.setNote( "" ) ; | 3285 | addresseeRSync.setNote( "" ) ; |
3286 | addresseeLSync.setNote( "" ); | 3286 | addresseeLSync.setNote( "" ); |
3287 | 3287 | ||
3288 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) | 3288 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) |
3289 | remote->insertAddressee( addresseeRSync, false ); | 3289 | remote->insertAddressee( addresseeRSync, false ); |
3290 | local->insertAddressee( addresseeLSync, false ); | 3290 | local->insertAddressee( addresseeLSync, false ); |
3291 | QString mes; | 3291 | QString mes; |
3292 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR, filteredIN, filteredOUT ); | 3292 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR, filteredIN, filteredOUT ); |
3293 | qDebug( mes ); | 3293 | qDebug( mes ); |
3294 | mes = i18n("Local addressbook changed!\n") +mes; | 3294 | mes = i18n("Local addressbook changed!\n") +mes; |
3295 | if ( syncManager->mShowSyncSummary ) { | 3295 | if ( syncManager->mShowSyncSummary ) { |
3296 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, | 3296 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, |
3297 | i18n("KA/Pi Synchronization"),i18n("Write back"))) { | 3297 | i18n("KA/Pi Synchronization"),i18n("Write back"))) { |
3298 | qDebug("KA: WB cancelled "); | 3298 | qDebug("KA: WB cancelled "); |
3299 | syncManager->mWriteBackFile = false; | 3299 | syncManager->mWriteBackFile = false; |
3300 | return syncOK; | 3300 | return syncOK; |
3301 | } | 3301 | } |
3302 | } | 3302 | } |
3303 | return syncOK; | 3303 | return syncOK; |
3304 | } | 3304 | } |
3305 | 3305 | ||
3306 | 3306 | ||
3307 | //this is a overwritten callbackmethods from the syncinterface | 3307 | //this is a overwritten callbackmethods from the syncinterface |
3308 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | 3308 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode,QString resource) |
3309 | { | 3309 | { |
3310 | 3310 | ||
3311 | //pending prepare addresseeview for output | 3311 | //pending prepare addresseeview for output |
3312 | //pending detect, if remote file has REV field. if not switch to external sync | 3312 | //pending detect, if remote file has REV field. if not switch to external sync |
3313 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 3313 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
3314 | if ( manager != syncManager ) | 3314 | if ( manager != syncManager ) |
3315 | qDebug("KABCore::sync:: ERROR! :: manager != syncManager "); | 3315 | qDebug("KABCore::sync:: ERROR! :: manager != syncManager "); |
3316 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 3316 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
3317 | 3317 | ||
3318 | AddressBook abLocal(filename,"syncContact"); | 3318 | AddressBook abLocal(filename,"syncContact"); |
3319 | bool syncOK = false; | 3319 | bool syncOK = false; |
3320 | if ( abLocal.load() ) { | 3320 | if ( abLocal.load() ) { |
3321 | qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode ); | 3321 | qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode ); |
3322 | bool external = false; | 3322 | bool external = false; |
3323 | bool isXML = false; | 3323 | bool isXML = false; |
3324 | if ( filename.right(4) == ".xml") { | 3324 | if ( filename.right(4) == ".xml") { |
3325 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3325 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3326 | isXML = true; | 3326 | isXML = true; |
3327 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); | 3327 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); |
3328 | } else { | 3328 | } else { |
3329 | external = !manager->mIsKapiFile; | 3329 | external = !manager->mIsKapiFile; |
3330 | if ( external ) { | 3330 | if ( external ) { |
3331 | qDebug("KA: Sync::Setting vcf mode to external "); | 3331 | qDebug("KA: Sync::Setting vcf mode to external "); |
3332 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3332 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3333 | AddressBook::Iterator it; | 3333 | AddressBook::Iterator it; |
3334 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 3334 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
3335 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); | 3335 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); |
3336 | (*it).computeCsum( mCurrentSyncDevice ); | 3336 | (*it).computeCsum( mCurrentSyncDevice ); |
3337 | } | 3337 | } |
3338 | } | 3338 | } |
3339 | } | 3339 | } |
3340 | //AddressBook::Iterator it; | 3340 | //AddressBook::Iterator it; |
3341 | //QStringList vcards; | 3341 | //QStringList vcards; |
3342 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 3342 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
3343 | // qDebug("Name %s ", (*it).familyName().latin1()); | 3343 | // qDebug("Name %s ", (*it).familyName().latin1()); |
3344 | //} | 3344 | //} |
3345 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); | 3345 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); |
3346 | syncManager->hideProgressBar(); | 3346 | syncManager->hideProgressBar(); |
3347 | if ( syncOK ) { | 3347 | if ( syncOK ) { |
3348 | if ( syncManager->mWriteBackFile ) | 3348 | if ( syncManager->mWriteBackFile ) |
3349 | { | 3349 | { |
3350 | if ( external ) | 3350 | if ( external ) |
3351 | abLocal.removeSyncAddressees( !isXML); | 3351 | abLocal.removeSyncAddressees( !isXML); |
3352 | qDebug("KA: Sync::Saving remote AB "); | 3352 | qDebug("KA: Sync::Saving remote AB "); |
3353 | if ( ! abLocal.saveAB()) | 3353 | if ( ! abLocal.saveAB()) |
3354 | qDebug("KA: sync::Error writing back AB to file "); | 3354 | qDebug("KA: sync::Error writing back AB to file "); |
3355 | if ( external ) { | 3355 | if ( external ) { |
3356 | // afterwrite processing | 3356 | // afterwrite processing |
3357 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); | 3357 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); |
3358 | } | 3358 | } |
3359 | } | 3359 | } |
3360 | } | 3360 | } |
3361 | setModified(); | 3361 | setModified(); |
3362 | 3362 | ||
3363 | } | 3363 | } |
3364 | abLocal.removeResources(); | 3364 | abLocal.removeResources(); |
3365 | if ( syncOK ) | 3365 | if ( syncOK ) |
3366 | mViewManager->refreshView(); | 3366 | mViewManager->refreshView(); |
3367 | return syncOK; | 3367 | return syncOK; |
3368 | 3368 | ||
3369 | } | 3369 | } |
3370 | void KABCore::removeSyncInfo( QString syncProfile) | 3370 | void KABCore::removeSyncInfo( QString syncProfile) |
3371 | { | 3371 | { |
3372 | qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1()); | 3372 | qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1()); |
3373 | mAddressBook->removeSyncInfo( syncProfile ); | 3373 | mAddressBook->removeSyncInfo( syncProfile ); |
3374 | setModified(); | 3374 | setModified(); |
3375 | } | 3375 | } |
3376 | 3376 | ||
3377 | 3377 | ||
3378 | //this is a overwritten callbackmethods from the syncinterface | 3378 | //this is a overwritten callbackmethods from the syncinterface |
3379 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) | 3379 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) |
3380 | { | 3380 | { |
3381 | if ( resource == "phone" ) | 3381 | if ( resource == "phone" ) |
3382 | return syncPhone(); | 3382 | return syncPhone(); |
3383 | disableBR( true ); | 3383 | disableBR( true ); |
3384 | if ( manager != syncManager ) | 3384 | if ( manager != syncManager ) |
3385 | qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); | 3385 | qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); |
3386 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 3386 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
3387 | 3387 | ||
3388 | AddressBook abLocal( resource,"syncContact"); | 3388 | AddressBook abLocal( resource,"syncContact"); |
3389 | bool syncOK = false; | 3389 | bool syncOK = false; |
3390 | message(i18n("Loading DTM address data..."), false); | 3390 | message(i18n("Loading DTM address data..."), false); |
3391 | if ( abLocal.load() ) { | 3391 | if ( abLocal.load() ) { |
3392 | qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 3392 | qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
3393 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3393 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3394 | message(i18n("Sync preprocessing..."),false); | 3394 | message(i18n("Sync preprocessing..."),false); |
3395 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); | 3395 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); |
3396 | message(i18n("Synchronizing..."),false); | 3396 | message(i18n("Synchronizing..."),false); |
3397 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 3397 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
3398 | syncManager->hideProgressBar(); | 3398 | syncManager->hideProgressBar(); |
3399 | if ( syncOK ) { | 3399 | if ( syncOK ) { |
3400 | if ( syncManager->mWriteBackFile ) { | 3400 | if ( syncManager->mWriteBackFile ) { |
3401 | abLocal.removeSyncAddressees( false ); | 3401 | abLocal.removeSyncAddressees( false ); |
3402 | message(i18n("Saving DTM address data..."),false); | 3402 | message(i18n("Saving DTM address data..."),false); |
3403 | abLocal.saveAB(); | 3403 | abLocal.saveAB(); |
3404 | message(i18n("Sync postprocessing..."),false); | 3404 | message(i18n("Sync postprocessing..."),false); |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 42b7709..c4a0b3b 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -419,117 +419,117 @@ class KABCore : public QWidget, public KSyncInterface | |||
419 | // QSplitter *mDetailsSplitter; | 419 | // QSplitter *mDetailsSplitter; |
420 | KDGanttMinimizeSplitter *mExtensionBarSplitter; | 420 | KDGanttMinimizeSplitter *mExtensionBarSplitter; |
421 | ViewContainer *mDetails; | 421 | ViewContainer *mDetails; |
422 | KDGanttMinimizeSplitter* mMiniSplitter; | 422 | KDGanttMinimizeSplitter* mMiniSplitter; |
423 | XXPortManager *mXXPortManager; | 423 | XXPortManager *mXXPortManager; |
424 | JumpButtonBar *mJumpButtonBar; | 424 | JumpButtonBar *mJumpButtonBar; |
425 | IncSearchWidget *mIncSearchWidget; | 425 | IncSearchWidget *mIncSearchWidget; |
426 | ExtensionManager *mExtensionManager; | 426 | ExtensionManager *mExtensionManager; |
427 | 427 | ||
428 | KCMultiDialog *mConfigureDialog; | 428 | KCMultiDialog *mConfigureDialog; |
429 | 429 | ||
430 | #ifndef KAB_EMBEDDED | 430 | #ifndef KAB_EMBEDDED |
431 | LDAPSearchDialog *mLdapSearchDialog; | 431 | LDAPSearchDialog *mLdapSearchDialog; |
432 | #endif //KAB_EMBEDDED | 432 | #endif //KAB_EMBEDDED |
433 | // QDict<AddresseeEditorDialog> mEditorDict; | 433 | // QDict<AddresseeEditorDialog> mEditorDict; |
434 | AddresseeEditorDialog *mEditorDialog; | 434 | AddresseeEditorDialog *mEditorDialog; |
435 | bool mReadWrite; | 435 | bool mReadWrite; |
436 | bool mModified; | 436 | bool mModified; |
437 | bool mIsPart; | 437 | bool mIsPart; |
438 | bool mMultipleViewsAtOnce; | 438 | bool mMultipleViewsAtOnce; |
439 | 439 | ||
440 | 440 | ||
441 | //US file menu | 441 | //US file menu |
442 | KAction *mActionMail; | 442 | KAction *mActionMail; |
443 | KAction *mActionBeam; | 443 | KAction *mActionBeam; |
444 | KToggleAction *mActionBR; | 444 | KToggleAction *mActionBR; |
445 | KAction *mActionExport2phone; | 445 | KAction *mActionExport2phone; |
446 | KAction* mActionPrint; | 446 | KAction* mActionPrint; |
447 | KAction* mActionPrintDetails; | 447 | KAction* mActionPrintDetails; |
448 | KAction* mActionNewContact; | 448 | KAction* mActionNewContact; |
449 | KAction *mActionSave; | 449 | KAction *mActionSave; |
450 | KAction *mActionEditAddressee; | 450 | KAction *mActionEditAddressee; |
451 | KAction *mActionMailVCard; | 451 | KAction *mActionMailVCard; |
452 | KAction *mActionBeamVCard; | 452 | KAction *mActionBeamVCard; |
453 | 453 | ||
454 | KAction *mActionQuit; | 454 | KAction *mActionQuit; |
455 | 455 | ||
456 | //US edit menu | 456 | //US edit menu |
457 | KAction *mActionCopy; | 457 | KAction *mActionCopy; |
458 | KAction *mActionCut; | 458 | KAction *mActionCut; |
459 | KAction *mActionPaste; | 459 | KAction *mActionPaste; |
460 | KAction *mActionSelectAll; | 460 | KAction *mActionSelectAll; |
461 | KAction *mActionUndo; | 461 | KAction *mActionUndo; |
462 | KAction *mActionRedo; | 462 | KAction *mActionRedo; |
463 | KAction *mActionDelete; | 463 | KAction *mActionDelete; |
464 | 464 | ||
465 | //US settings menu | 465 | //US settings menu |
466 | KAction *mActionConfigResources; | 466 | KAction *mActionConfigResources; |
467 | KAction *mActionConfigGlobal; | 467 | KAction *mActionConfigGlobal; |
468 | KAction *mActionConfigKAddressbook; | 468 | KAction *mActionConfigKAddressbook; |
469 | KAction *mActionConfigShortcuts; | 469 | KAction *mActionConfigShortcuts; |
470 | KAction *mActionConfigureToolbars; | 470 | KAction *mActionConfigureToolbars; |
471 | KAction *mActionKeyBindings; | 471 | KAction *mActionKeyBindings; |
472 | KToggleAction *mActionJumpBar; | 472 | KToggleAction *mActionJumpBar; |
473 | KToggleAction *mActionDetails; | 473 | KToggleAction *mActionDetails; |
474 | KAction *mActionWhoAmI; | 474 | KAction *mActionWhoAmI; |
475 | KAction *mActionCategories; | 475 | KAction *mActionCategories; |
476 | KAction *mActionEditCategories; | 476 | KAction *mActionEditCategories; |
477 | KAction *mActionManageCategories; | 477 | KAction *mActionManageCategories; |
478 | KAction *mActionAboutKAddressbook; | 478 | KAction *mActionAboutKAddressbook; |
479 | KAction *mActionLicence; | 479 | KAction *mActionLicence; |
480 | KAction *mActionFaq; | 480 | KAction *mActionFaq; |
481 | KAction *mActionWN; | 481 | KAction *mActionWN; |
482 | KAction *mActionSyncHowto; | 482 | KAction *mActionSyncHowto; |
483 | KAction *mActionStorageHowto; | 483 | KAction *mActionStorageHowto; |
484 | KAction *mActionKdeSyncHowto; | 484 | KAction *mActionKdeSyncHowto; |
485 | KAction *mActionMultiSyncHowto; | 485 | KAction *mActionMultiSyncHowto; |
486 | 486 | ||
487 | KAction *mActionDeleteView; | 487 | KAction *mActionDeleteView; |
488 | 488 | ||
489 | QPopupMenu *viewMenu; | 489 | QPopupMenu *viewMenu; |
490 | QPopupMenu *filterMenu; | 490 | QPopupMenu *filterMenu; |
491 | QPopupMenu *settingsMenu; | 491 | QPopupMenu *settingsMenu; |
492 | QPopupMenu *changeMenu; | 492 | QPopupMenu *changeMenu; |
493 | QPopupMenu *beamMenu; | 493 | QPopupMenu *beamMenu; |
494 | //US QAction *mActionSave; | 494 | //US QAction *mActionSave; |
495 | QPopupMenu *ImportMenu; | 495 | QPopupMenu *ImportMenu; |
496 | QPopupMenu *ExportMenu; | 496 | QPopupMenu *ExportMenu; |
497 | //LR additional methods | 497 | //LR additional methods |
498 | KAction *mActionRemoveVoice; | 498 | KAction *mActionRemoveVoice; |
499 | KAction *mActionSetFormattedName; | 499 | KAction *mActionSetFormattedName; |
500 | KAction * mActionImportOL; | 500 | KAction * mActionImportOL; |
501 | 501 | ||
502 | #ifndef KAB_EMBEDDED | 502 | #ifndef KAB_EMBEDDED |
503 | KAddressBookService *mAddressBookService; | 503 | KAddressBookService *mAddressBookService; |
504 | #endif //KAB_EMBEDDED | 504 | #endif //KAB_EMBEDDED |
505 | 505 | ||
506 | class KABCorePrivate; | 506 | class KABCorePrivate; |
507 | KABCorePrivate *d; | 507 | KABCorePrivate *d; |
508 | //US bool mBlockSaveFlag; | 508 | //US bool mBlockSaveFlag; |
509 | 509 | ||
510 | #ifdef KAB_EMBEDDED | 510 | #ifdef KAB_EMBEDDED |
511 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient | 511 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient |
512 | #endif //KAB_EMBEDDED | 512 | #endif //KAB_EMBEDDED |
513 | 513 | ||
514 | //this are the overwritten callbackmethods from the syncinterface | 514 | //this are the overwritten callbackmethods from the syncinterface |
515 | virtual bool sync(KSyncManager* manager, QString filename, int mode); | 515 | virtual bool sync(KSyncManager* manager, QString filename, int mode,QString resource); |
516 | virtual bool syncExternal(KSyncManager* manager, QString resource); | 516 | virtual bool syncExternal(KSyncManager* manager, QString resource); |
517 | virtual void removeSyncInfo( QString syncProfile); | 517 | virtual void removeSyncInfo( QString syncProfile); |
518 | bool syncPhone(); | 518 | bool syncPhone(); |
519 | void message( QString m , bool startTimer = true); | 519 | void message( QString m , bool startTimer = true); |
520 | 520 | ||
521 | // LR ******************************* | 521 | // LR ******************************* |
522 | // sync stuff! | 522 | // sync stuff! |
523 | QString sentSyncFile(); | 523 | QString sentSyncFile(); |
524 | QPopupMenu *syncMenu; | 524 | QPopupMenu *syncMenu; |
525 | KSyncManager* syncManager; | 525 | KSyncManager* syncManager; |
526 | int mGlobalSyncMode; | 526 | int mGlobalSyncMode; |
527 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); | 527 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); |
528 | KABC::Addressee getLastSyncAddressee(); | 528 | KABC::Addressee getLastSyncAddressee(); |
529 | QDateTime mLastAddressbookSync; | 529 | QDateTime mLastAddressbookSync; |
530 | int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); | 530 | int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); |
531 | // ********************* | 531 | // ********************* |
532 | 532 | ||
533 | }; | 533 | }; |
534 | 534 | ||
535 | #endif | 535 | #endif |