Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index cf8f996..03265d2 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp | |||
@@ -213,92 +213,94 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
213 | mPhoneConnection = new QLineEdit( temphb); | 213 | mPhoneConnection = new QLineEdit( temphb); |
214 | button = new QPushButton( i18n("Help..."), temphb ); | 214 | button = new QPushButton( i18n("Help..."), temphb ); |
215 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); | 215 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); |
216 | 216 | ||
217 | 217 | ||
218 | temphb = new QHBox( phoneWidget ); | 218 | temphb = new QHBox( phoneWidget ); |
219 | new QLabel( i18n("Model(opt.): "), temphb ); | 219 | new QLabel( i18n("Model(opt.): "), temphb ); |
220 | mPhoneModel = new QLineEdit( temphb); | 220 | mPhoneModel = new QLineEdit( temphb); |
221 | button = new QPushButton( i18n("Help..."), temphb ); | 221 | button = new QPushButton( i18n("Help..."), temphb ); |
222 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); | 222 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); |
223 | 223 | ||
224 | // *** local | 224 | // *** local |
225 | localFileWidget = new QVBox( topFrame); | 225 | localFileWidget = new QVBox( topFrame); |
226 | topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); | 226 | topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); |
227 | ++iii; | 227 | ++iii; |
228 | temphb = new QHBox( localFileWidget ); | 228 | temphb = new QHBox( localFileWidget ); |
229 | 229 | ||
230 | lab = new QLabel( i18n("Local file Cal:"), temphb ); | 230 | lab = new QLabel( i18n("Local file Cal:"), temphb ); |
231 | lab = new QLabel( i18n("Local file ABook:"), temphb ); | 231 | lab = new QLabel( i18n("Local file ABook:"), temphb ); |
232 | lab = new QLabel( i18n("Local file PWMgr:"), temphb ); | 232 | lab = new QLabel( i18n("Local file PWMgr:"), temphb ); |
233 | temphb = new QHBox( localFileWidget ); | 233 | temphb = new QHBox( localFileWidget ); |
234 | button = new QPushButton( i18n("Choose..."), temphb ); | 234 | button = new QPushButton( i18n("Choose..."), temphb ); |
235 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); | 235 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); |
236 | button = new QPushButton( i18n("Choose..."), temphb ); | 236 | button = new QPushButton( i18n("Choose..."), temphb ); |
237 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); | 237 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); |
238 | button = new QPushButton( i18n("Choose..."), temphb ); | 238 | button = new QPushButton( i18n("Choose..."), temphb ); |
239 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); | 239 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); |
240 | temphb = new QHBox( localFileWidget ); | 240 | temphb = new QHBox( localFileWidget ); |
241 | 241 | ||
242 | mRemoteFile = new QLineEdit( temphb); | 242 | mRemoteFile = new QLineEdit( temphb); |
243 | mRemoteFileAB = new QLineEdit( temphb); | 243 | mRemoteFileAB = new QLineEdit( temphb); |
244 | mRemoteFilePWM = new QLineEdit( temphb); | 244 | mRemoteFilePWM = new QLineEdit( temphb); |
245 | mIsKapiFileL = new QCheckBox( i18n("Addressbook file (*.vcf) is used by KA/Pi"), localFileWidget ); | ||
246 | |||
245 | 247 | ||
246 | // *** remote | 248 | // *** remote |
247 | remoteFileWidget = new QVBox( topFrame); | 249 | remoteFileWidget = new QVBox( topFrame); |
248 | topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); | 250 | topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); |
249 | ++iii; | 251 | ++iii; |
250 | temphb = new QHBox( remoteFileWidget ); | 252 | temphb = new QHBox( remoteFileWidget ); |
251 | new QLabel( i18n("Calendar:"), temphb); | 253 | new QLabel( i18n("Calendar:"), temphb); |
252 | new QLabel( i18n("AddressBook:"), temphb); | 254 | new QLabel( i18n("AddressBook:"), temphb); |
253 | new QLabel( i18n("PWManager:"), temphb); | 255 | new QLabel( i18n("PWManager:"), temphb); |
254 | 256 | ||
255 | lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); | 257 | lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); |
256 | temphb = new QHBox( remoteFileWidget ); | 258 | temphb = new QHBox( remoteFileWidget ); |
257 | mRemotePrecommand = new QLineEdit(temphb); | 259 | mRemotePrecommand = new QLineEdit(temphb); |
258 | mRemotePrecommandAB = new QLineEdit(temphb); | 260 | mRemotePrecommandAB = new QLineEdit(temphb); |
259 | mRemotePrecommandPWM = new QLineEdit(temphb); | 261 | mRemotePrecommandPWM = new QLineEdit(temphb); |
260 | 262 | ||
261 | lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); | 263 | lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); |
262 | temphb = new QHBox( remoteFileWidget ); | 264 | temphb = new QHBox( remoteFileWidget ); |
263 | mLocalTempFile = new QLineEdit(temphb); | 265 | mLocalTempFile = new QLineEdit(temphb); |
264 | mLocalTempFileAB = new QLineEdit(temphb); | 266 | mLocalTempFileAB = new QLineEdit(temphb); |
265 | mLocalTempFilePWM = new QLineEdit(temphb); | 267 | mLocalTempFilePWM = new QLineEdit(temphb); |
266 | 268 | ||
267 | lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); | 269 | lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); |
268 | temphb = new QHBox( remoteFileWidget ); | 270 | temphb = new QHBox( remoteFileWidget ); |
269 | mRemotePostcommand = new QLineEdit(temphb ); | 271 | mRemotePostcommand = new QLineEdit(temphb ); |
270 | mRemotePostcommandAB = new QLineEdit(temphb ); | 272 | mRemotePostcommandAB = new QLineEdit(temphb ); |
271 | mRemotePostcommandPWM = new QLineEdit(temphb ); | 273 | mRemotePostcommandPWM = new QLineEdit(temphb ); |
272 | 274 | mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget ); | |
273 | lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); | 275 | lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); |
274 | temphb = new QHBox( remoteFileWidget ); | 276 | temphb = new QHBox( remoteFileWidget ); |
275 | button = new QPushButton( i18n("ssh/scp"), temphb ); | 277 | button = new QPushButton( i18n("ssh/scp"), temphb ); |
276 | connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); | 278 | connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); |
277 | button = new QPushButton( i18n("ftp"), temphb ); | 279 | button = new QPushButton( i18n("ftp"), temphb ); |
278 | connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); | 280 | connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); |
279 | lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); | 281 | lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); |
280 | 282 | ||
281 | // *** pi-sync | 283 | // *** pi-sync |
282 | piWidget = new QVBox( topFrame); | 284 | piWidget = new QVBox( topFrame); |
283 | topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); | 285 | topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); |
284 | ++iii; | 286 | ++iii; |
285 | temphb = new QHBox( piWidget ); | 287 | temphb = new QHBox( piWidget ); |
286 | new QLabel( i18n("Calendar:"), temphb); | 288 | new QLabel( i18n("Calendar:"), temphb); |
287 | new QLabel( i18n("AddressBook:"), temphb); | 289 | new QLabel( i18n("AddressBook:"), temphb); |
288 | new QLabel( i18n("PWManager:"), temphb); | 290 | new QLabel( i18n("PWManager:"), temphb); |
289 | 291 | ||
290 | lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); | 292 | lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); |
291 | temphb = new QHBox( piWidget ); | 293 | temphb = new QHBox( piWidget ); |
292 | mRemotePw = new QLineEdit(temphb); | 294 | mRemotePw = new QLineEdit(temphb); |
293 | mRemotePwAB = new QLineEdit(temphb); | 295 | mRemotePwAB = new QLineEdit(temphb); |
294 | mRemotePwPWM = new QLineEdit(temphb); | 296 | mRemotePwPWM = new QLineEdit(temphb); |
295 | 297 | ||
296 | lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); | 298 | lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); |
297 | temphb = new QHBox( piWidget ); | 299 | temphb = new QHBox( piWidget ); |
298 | mRemoteIP = new QLineEdit(temphb); | 300 | mRemoteIP = new QLineEdit(temphb); |
299 | mRemoteIPAB = new QLineEdit(temphb); | 301 | mRemoteIPAB = new QLineEdit(temphb); |
300 | mRemoteIPPWM = new QLineEdit(temphb); | 302 | mRemoteIPPWM = new QLineEdit(temphb); |
301 | 303 | ||
302 | lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); | 304 | lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); |
303 | temphb = new QHBox( piWidget ); | 305 | temphb = new QHBox( piWidget ); |
304 | mRemotePort = new QLineEdit(temphb); | 306 | mRemotePort = new QLineEdit(temphb); |
@@ -428,104 +430,113 @@ void KSyncPrefsDialog::profileChanged( int item ) | |||
428 | mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() ); | 430 | mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() ); |
429 | mWriteBackFuture->setChecked( prof->getWriteBackFuture()); | 431 | mWriteBackFuture->setChecked( prof->getWriteBackFuture()); |
430 | mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); | 432 | mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); |
431 | 433 | ||
432 | switch ( prof->getSyncPrefs() ) { | 434 | switch ( prof->getSyncPrefs() ) { |
433 | case 0: | 435 | case 0: |
434 | loc->setChecked( true); | 436 | loc->setChecked( true); |
435 | break; | 437 | break; |
436 | case 1: | 438 | case 1: |
437 | rem->setChecked( true ); | 439 | rem->setChecked( true ); |
438 | break; | 440 | break; |
439 | case 2: | 441 | case 2: |
440 | newest->setChecked( true); | 442 | newest->setChecked( true); |
441 | break; | 443 | break; |
442 | case 3: | 444 | case 3: |
443 | ask->setChecked( true); | 445 | ask->setChecked( true); |
444 | break; | 446 | break; |
445 | case 4: | 447 | case 4: |
446 | f_loc->setChecked( true); | 448 | f_loc->setChecked( true); |
447 | break; | 449 | break; |
448 | case 5: | 450 | case 5: |
449 | f_rem->setChecked( true); | 451 | f_rem->setChecked( true); |
450 | break; | 452 | break; |
451 | case 6: | 453 | case 6: |
452 | //both->setChecked( true); | 454 | //both->setChecked( true); |
453 | break; | 455 | break; |
454 | default: | 456 | default: |
455 | break; | 457 | break; |
456 | } | 458 | } |
457 | mIsLocal->setChecked(prof->getIsLocalFileSync()) ; | 459 | mIsLocal->setChecked(prof->getIsLocalFileSync()) ; |
458 | mIsPhone->setChecked(prof->getIsPhoneSync()) ; | 460 | mIsPhone->setChecked(prof->getIsPhoneSync()) ; |
459 | mIsPi->setChecked(prof->getIsPiSync()) ; | 461 | mIsPi->setChecked(prof->getIsPiSync()) ; |
462 | mIsKapiFileL->setChecked(prof->getIsKapiFile()) ; | ||
463 | mIsKapiFileR->setChecked(prof->getIsKapiFile()) ; | ||
464 | |||
460 | mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() &&!prof->getIsPiSync() ); | 465 | mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() &&!prof->getIsPiSync() ); |
461 | proGr->setEnabled( item > 2 ); | 466 | proGr->setEnabled( item > 2 ); |
462 | if ( item < 3 ) { | 467 | if ( item < 3 ) { |
463 | localFileWidget->hide(); | 468 | localFileWidget->hide(); |
464 | remoteFileWidget->hide(); | 469 | remoteFileWidget->hide(); |
465 | phoneWidget->hide(); | 470 | phoneWidget->hide(); |
466 | piWidget->hide(); | 471 | piWidget->hide(); |
467 | 472 | ||
468 | } else | 473 | } else |
469 | kindChanged( prof->getIsLocalFileSync() ); | 474 | kindChanged( prof->getIsLocalFileSync() ); |
470 | } | 475 | } |
471 | 476 | ||
472 | void KSyncPrefsDialog::fillSSH() | 477 | void KSyncPrefsDialog::fillSSH() |
473 | { | 478 | { |
474 | mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); | 479 | mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); |
475 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); | 480 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); |
476 | mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); | 481 | mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); |
477 | mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); | 482 | mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); |
478 | mLocalTempFileAB->setText("/tmp/std.vcf" ); | 483 | mLocalTempFileAB->setText("/tmp/std.vcf" ); |
479 | mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" ); | 484 | mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" ); |
480 | mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); | 485 | mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); |
481 | mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); | 486 | mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); |
482 | mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" ); | 487 | mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" ); |
483 | } | 488 | } |
484 | void KSyncPrefsDialog::fillFTP() | 489 | void KSyncPrefsDialog::fillFTP() |
485 | { | 490 | { |
486 | mRemotePrecommand->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics" ); | 491 | mRemotePrecommand->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics" ); |
487 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); | 492 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); |
488 | mRemotePostcommand->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); | 493 | mRemotePostcommand->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); |
489 | mRemotePrecommandAB->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf" ); | 494 | mRemotePrecommandAB->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf" ); |
490 | mLocalTempFileAB->setText("/tmp/std.vcf" ); | 495 | mLocalTempFileAB->setText("/tmp/std.vcf" ); |
491 | mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); | 496 | mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); |
492 | 497 | ||
493 | mRemotePrecommandPWM->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm" ); | 498 | mRemotePrecommandPWM->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm" ); |
494 | mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); | 499 | mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); |
495 | mRemotePostcommandPWM->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); | 500 | mRemotePostcommandPWM->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); |
496 | 501 | ||
497 | } | 502 | } |
498 | void KSyncPrefsDialog::kindChanged( bool b ) | 503 | void KSyncPrefsDialog::kindChanged( bool b ) |
499 | { | 504 | { |
505 | |||
506 | if ( mIsLocal->isChecked () ) { | ||
507 | mIsKapiFileL->setChecked( mIsKapiFileR->isChecked() ); | ||
508 | } else { | ||
509 | mIsKapiFileR->setChecked( mIsKapiFileL->isChecked() ); | ||
510 | } | ||
500 | 511 | ||
501 | if ( mIsLocal->isChecked () ) | 512 | if ( mIsLocal->isChecked () ) |
502 | localFileWidget->show(); | 513 | localFileWidget->show(); |
503 | else | 514 | else |
504 | localFileWidget->hide(); | 515 | localFileWidget->hide(); |
505 | 516 | ||
506 | if ( mIsNotLocal->isChecked () ) | 517 | if ( mIsNotLocal->isChecked () ) |
507 | remoteFileWidget->show(); | 518 | remoteFileWidget->show(); |
508 | else | 519 | else |
509 | remoteFileWidget->hide(); | 520 | remoteFileWidget->hide(); |
510 | 521 | ||
511 | if ( mIsPhone->isChecked () ) { | 522 | if ( mIsPhone->isChecked () ) { |
512 | phoneWidget->show(); | 523 | phoneWidget->show(); |
513 | } | 524 | } |
514 | else { | 525 | else { |
515 | phoneWidget->hide(); | 526 | phoneWidget->hide(); |
516 | } | 527 | } |
517 | if ( mIsPi->isChecked () ) { | 528 | if ( mIsPi->isChecked () ) { |
518 | piWidget->show(); | 529 | piWidget->show(); |
519 | } | 530 | } |
520 | else { | 531 | else { |
521 | piWidget->hide(); | 532 | piWidget->hide(); |
522 | } | 533 | } |
523 | 534 | ||
524 | } | 535 | } |
525 | void KSyncPrefsDialog::deleteProfile() | 536 | void KSyncPrefsDialog::deleteProfile() |
526 | { | 537 | { |
527 | //qDebug("KSyncPrefsDialog::deleteProfile() "); | 538 | //qDebug("KSyncPrefsDialog::deleteProfile() "); |
528 | if ( currentSelection >= 0 ) { | 539 | if ( currentSelection >= 0 ) { |
529 | if ( currentSelection < 3 ) { | 540 | if ( currentSelection < 3 ) { |
530 | KMessageBox::error(this,i18n("This profil cannot be deleted!\n"),i18n("KO/Pi config error")); | 541 | KMessageBox::error(this,i18n("This profil cannot be deleted!\n"),i18n("KO/Pi config error")); |
531 | return; | 542 | return; |
@@ -550,64 +561,65 @@ void KSyncPrefsDialog::saveProfile() | |||
550 | prof->setRemotePwAB( mRemotePwAB->text()); | 561 | prof->setRemotePwAB( mRemotePwAB->text()); |
551 | prof->setRemoteIPAB( mRemoteIPAB->text()); | 562 | prof->setRemoteIPAB( mRemoteIPAB->text()); |
552 | prof->setRemotePortAB( mRemotePortAB->text()); | 563 | prof->setRemotePortAB( mRemotePortAB->text()); |
553 | 564 | ||
554 | prof->setRemotePwPWM( mRemotePwPWM->text()); | 565 | prof->setRemotePwPWM( mRemotePwPWM->text()); |
555 | prof->setRemoteIPPWM( mRemoteIPPWM->text()); | 566 | prof->setRemoteIPPWM( mRemoteIPPWM->text()); |
556 | prof->setRemotePortPWM( mRemotePortPWM->text()); | 567 | prof->setRemotePortPWM( mRemotePortPWM->text()); |
557 | 568 | ||
558 | prof->setPreSyncCommand( mRemotePrecommand->text()); | 569 | prof->setPreSyncCommand( mRemotePrecommand->text()); |
559 | prof->setPostSyncCommand( mRemotePostcommand->text() ); | 570 | prof->setPostSyncCommand( mRemotePostcommand->text() ); |
560 | prof->setLocalTempFile( mLocalTempFile->text()); | 571 | prof->setLocalTempFile( mLocalTempFile->text()); |
561 | prof->setRemoteFileName( mRemoteFile->text() ); | 572 | prof->setRemoteFileName( mRemoteFile->text() ); |
562 | prof->setPreSyncCommandAB( mRemotePrecommandAB->text()); | 573 | prof->setPreSyncCommandAB( mRemotePrecommandAB->text()); |
563 | prof->setPostSyncCommandAB( mRemotePostcommandAB->text() ); | 574 | prof->setPostSyncCommandAB( mRemotePostcommandAB->text() ); |
564 | prof->setLocalTempFileAB( mLocalTempFileAB->text()); | 575 | prof->setLocalTempFileAB( mLocalTempFileAB->text()); |
565 | prof->setRemoteFileNameAB( mRemoteFileAB->text() ); | 576 | prof->setRemoteFileNameAB( mRemoteFileAB->text() ); |
566 | prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); | 577 | prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); |
567 | prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); | 578 | prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); |
568 | prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); | 579 | prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); |
569 | prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); | 580 | prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); |
570 | prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); | 581 | prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); |
571 | prof->setAskForPreferences( mAskForPreferences->isChecked()); | 582 | prof->setAskForPreferences( mAskForPreferences->isChecked()); |
572 | prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); | 583 | prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); |
573 | prof->setWriteBackFile( mWriteBackFile->isChecked()); | 584 | prof->setWriteBackFile( mWriteBackFile->isChecked()); |
574 | prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); | 585 | prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); |
575 | prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); | 586 | prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); |
576 | prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() ); | 587 | prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() ); |
577 | int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; | 588 | int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; |
578 | prof->setSyncPrefs( syncprefs); | 589 | prof->setSyncPrefs( syncprefs); |
579 | prof->setIsLocalFileSync( mIsLocal->isChecked() ); | 590 | prof->setIsLocalFileSync( mIsLocal->isChecked() ); |
580 | prof->setIsPhoneSync( mIsPhone->isChecked() ); | 591 | prof->setIsPhoneSync( mIsPhone->isChecked() ); |
581 | prof->setIsPiSync( mIsPi->isChecked() ); | 592 | prof->setIsPiSync( mIsPi->isChecked() ); |
593 | prof->setIsKapiFile( mIsKapiFileL->isChecked() ); | ||
582 | prof->setWriteBackFuture(mWriteBackFuture->isChecked()); | 594 | prof->setWriteBackFuture(mWriteBackFuture->isChecked()); |
583 | prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); | 595 | prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); |
584 | if ( mWriteContactToSIM ) | 596 | if ( mWriteContactToSIM ) |
585 | prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); | 597 | prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); |
586 | prof->setPhoneDevice( mPhoneDevice->text() ); | 598 | prof->setPhoneDevice( mPhoneDevice->text() ); |
587 | prof->setPhoneConnection( mPhoneConnection->text() ); | 599 | prof->setPhoneConnection( mPhoneConnection->text() ); |
588 | prof->setPhoneModel( mPhoneModel->text() ); | 600 | prof->setPhoneModel( mPhoneModel->text() ); |
589 | 601 | ||
590 | } | 602 | } |
591 | 603 | ||
592 | } | 604 | } |
593 | 605 | ||
594 | void KSyncPrefsDialog::insertProfiles() | 606 | void KSyncPrefsDialog::insertProfiles() |
595 | { | 607 | { |
596 | int curItem = mProfileBox->currentItem(); | 608 | int curItem = mProfileBox->currentItem(); |
597 | mProfileBox->blockSignals( true ); | 609 | mProfileBox->blockSignals( true ); |
598 | mProfileBox->clear(); | 610 | mProfileBox->clear(); |
599 | mProfileBox->insertStringList (mSyncProfileNames ); | 611 | mProfileBox->insertStringList (mSyncProfileNames ); |
600 | int item = mSyncProfileNames.count() -1; | 612 | int item = mSyncProfileNames.count() -1; |
601 | if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() ) | 613 | if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() ) |
602 | mProfileBox->setCurrentItem( curItem ); | 614 | mProfileBox->setCurrentItem( curItem ); |
603 | else if ( item >= 0 ) { | 615 | else if ( item >= 0 ) { |
604 | mProfileBox->setCurrentItem( item ); | 616 | mProfileBox->setCurrentItem( item ); |
605 | } | 617 | } |
606 | currentSelection = -1; | 618 | currentSelection = -1; |
607 | if ( mSyncProfileNames.count() > 0 ) { | 619 | if ( mSyncProfileNames.count() > 0 ) { |
608 | //qDebug(" profileChanged( mProfileBox->currentItem() "); | 620 | //qDebug(" profileChanged( mProfileBox->currentItem() "); |
609 | profileChanged( mProfileBox->currentItem() ); | 621 | profileChanged( mProfileBox->currentItem() ); |
610 | currentSelection = mProfileBox->currentItem(); | 622 | currentSelection = mProfileBox->currentItem(); |
611 | } | 623 | } |
612 | mProfileBox->blockSignals( false ); | 624 | mProfileBox->blockSignals( false ); |
613 | } | 625 | } |