summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncprefsdialog.cpp
Unidiff
Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprefsdialog.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index f05c846..0caa27e 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -169,49 +169,49 @@ void KSyncPrefsDialog::setupSyncAlgTab()
169 topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1); 169 topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1);
170 ++iii; 170 ++iii;
171 171
172 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame ); 172 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame );
173 topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); 173 topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
174 ++iii; 174 ++iii;
175 175
176 mWriteBackExisting= new QCheckBox( i18n("-- Write back (on remote) existing entries only"), topFrame ); 176 mWriteBackExisting= new QCheckBox( i18n("-- Write back (on remote) existing entries only"), topFrame );
177 topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); 177 topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1);
178 ++iii; 178 ++iii;
179 179
180 mWriteBackFuture= new QCheckBox( i18n("-- Write back (calendar) entries in future only"), topFrame ); 180 mWriteBackFuture= new QCheckBox( i18n("-- Write back (calendar) entries in future only"), topFrame );
181 topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); 181 topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
182 ++iii; 182 ++iii;
183 topLayout->addMultiCellWidget(new QLabel( i18n("---- Max. weeks in future: ") , topFrame ), iii,iii,0,0); 183 topLayout->addMultiCellWidget(new QLabel( i18n("---- Max. weeks in future: ") , topFrame ), iii,iii,0,0);
184 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, topFrame); 184 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, topFrame);
185 topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); 185 topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1);
186 ++iii; 186 ++iii;
187 187
188 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); 188 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
189 gr = proGr; 189 gr = proGr;
190 topLayout->addMultiCellWidget(gr, iii,iii,0,1); 190 topLayout->addMultiCellWidget(gr, iii,iii,0,1);
191 ++iii; 191 ++iii;
192 mIsLocal = new QRadioButton ( i18n("Local file"), gr ); 192 mIsLocal = new QRadioButton ( i18n("Local file"), gr );
193 mIsPi = new QRadioButton ( i18n("Quick Pi-Sync"), gr ); 193 mIsPi = new QRadioButton ( i18n("Pi-Sync ( direct Kx/Pi to Kx/Pi sync )"), gr );
194 connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 194 connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
195 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); 195 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr );
196 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 196 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
197 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); 197 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr );
198 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 198 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
199 199
200 200
201 phoneWidget = new QVBox( topFrame); 201 phoneWidget = new QVBox( topFrame);
202 topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); 202 topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
203 ++iii; 203 ++iii;
204 mWriteContactToSIM= new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); 204 mWriteContactToSIM= new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
205 QHBox* temphb = new QHBox( phoneWidget ); 205 QHBox* temphb = new QHBox( phoneWidget );
206 new QLabel( i18n("I/O device: "), temphb ); 206 new QLabel( i18n("I/O device: "), temphb );
207 mPhoneDevice = new QLineEdit( temphb); 207 mPhoneDevice = new QLineEdit( temphb);
208 button = new QPushButton( i18n("Help..."), temphb ); 208 button = new QPushButton( i18n("Help..."), temphb );
209 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); 209 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );
210 210
211 211
212 temphb = new QHBox( phoneWidget ); 212 temphb = new QHBox( phoneWidget );
213 new QLabel( i18n("Connection: "), temphb ); 213 new QLabel( i18n("Connection: "), temphb );
214 mPhoneConnection = new QLineEdit( temphb); 214 mPhoneConnection = new QLineEdit( temphb);
215 button = new QPushButton( i18n("Help..."), temphb ); 215 button = new QPushButton( i18n("Help..."), temphb );
216 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); 216 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) );
217 217
@@ -435,49 +435,50 @@ void KSyncPrefsDialog::profileChanged( int item )
435 break; 435 break;
436 case 1: 436 case 1:
437 rem->setChecked( true ); 437 rem->setChecked( true );
438 break; 438 break;
439 case 2: 439 case 2:
440 newest->setChecked( true); 440 newest->setChecked( true);
441 break; 441 break;
442 case 3: 442 case 3:
443 ask->setChecked( true); 443 ask->setChecked( true);
444 break; 444 break;
445 case 4: 445 case 4:
446 f_loc->setChecked( true); 446 f_loc->setChecked( true);
447 break; 447 break;
448 case 5: 448 case 5:
449 f_rem->setChecked( true); 449 f_rem->setChecked( true);
450 break; 450 break;
451 case 6: 451 case 6:
452 //both->setChecked( true); 452 //both->setChecked( true);
453 break; 453 break;
454 default: 454 default:
455 break; 455 break;
456 } 456 }
457 mIsLocal->setChecked(prof->getIsLocalFileSync()) ; 457 mIsLocal->setChecked(prof->getIsLocalFileSync()) ;
458 mIsPhone->setChecked(prof->getIsPhoneSync()) ; 458 mIsPhone->setChecked(prof->getIsPhoneSync()) ;
459 mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() ); 459 mIsPi->setChecked(prof->getIsPiSync()) ;
460 mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() &&!prof->getIsPiSync() );
460 proGr->setEnabled( item > 2 ); 461 proGr->setEnabled( item > 2 );
461 if ( item < 3 ) { 462 if ( item < 3 ) {
462 localFileWidget->hide(); 463 localFileWidget->hide();
463 remoteFileWidget->hide(); 464 remoteFileWidget->hide();
464 phoneWidget->hide(); 465 phoneWidget->hide();
465 piWidget->hide(); 466 piWidget->hide();
466 467
467 } else 468 } else
468 kindChanged( prof->getIsLocalFileSync() ); 469 kindChanged( prof->getIsLocalFileSync() );
469} 470}
470 471
471void KSyncPrefsDialog::fillSSH() 472void KSyncPrefsDialog::fillSSH()
472{ 473{
473 mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); 474 mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" );
474 mLocalTempFile->setText("/tmp/mycalendar.ics" ); 475 mLocalTempFile->setText("/tmp/mycalendar.ics" );
475 mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); 476 mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" );
476 mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); 477 mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" );
477 mLocalTempFileAB->setText("/tmp/std.vcf" ); 478 mLocalTempFileAB->setText("/tmp/std.vcf" );
478 mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" ); 479 mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" );
479 mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); 480 mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" );
480 mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); 481 mLocalTempFilePWM->setText("/tmp/passwords.pwm" );
481 mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" ); 482 mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" );
482} 483}
483void KSyncPrefsDialog::fillFTP() 484void KSyncPrefsDialog::fillFTP()
@@ -556,48 +557,49 @@ void KSyncPrefsDialog::saveProfile()
556 557
557 prof->setPreSyncCommand( mRemotePrecommand->text()); 558 prof->setPreSyncCommand( mRemotePrecommand->text());
558 prof->setPostSyncCommand( mRemotePostcommand->text() ); 559 prof->setPostSyncCommand( mRemotePostcommand->text() );
559 prof->setLocalTempFile( mLocalTempFile->text()); 560 prof->setLocalTempFile( mLocalTempFile->text());
560 prof->setRemoteFileName( mRemoteFile->text() ); 561 prof->setRemoteFileName( mRemoteFile->text() );
561 prof->setPreSyncCommandAB( mRemotePrecommandAB->text()); 562 prof->setPreSyncCommandAB( mRemotePrecommandAB->text());
562 prof->setPostSyncCommandAB( mRemotePostcommandAB->text() ); 563 prof->setPostSyncCommandAB( mRemotePostcommandAB->text() );
563 prof->setLocalTempFileAB( mLocalTempFileAB->text()); 564 prof->setLocalTempFileAB( mLocalTempFileAB->text());
564 prof->setRemoteFileNameAB( mRemoteFileAB->text() ); 565 prof->setRemoteFileNameAB( mRemoteFileAB->text() );
565 prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); 566 prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text());
566 prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); 567 prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() );
567 prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); 568 prof->setLocalTempFilePWM( mLocalTempFilePWM->text());
568 prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); 569 prof->setRemoteFileNamePWM( mRemoteFilePWM->text() );
569 prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); 570 prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() );
570 prof->setAskForPreferences( mAskForPreferences->isChecked()); 571 prof->setAskForPreferences( mAskForPreferences->isChecked());
571 prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); 572 prof->setWriteBackExisting(mWriteBackExisting->isChecked() );
572 prof->setWriteBackFile( mWriteBackFile->isChecked()); 573 prof->setWriteBackFile( mWriteBackFile->isChecked());
573 prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); 574 prof->setIncludeInRingSync( mIncludeInRing->isChecked() );
574 prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); 575 prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() );
575 prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() ); 576 prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() );
576 int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; 577 int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ;
577 prof->setSyncPrefs( syncprefs); 578 prof->setSyncPrefs( syncprefs);
578 prof->setIsLocalFileSync( mIsLocal->isChecked() ); 579 prof->setIsLocalFileSync( mIsLocal->isChecked() );
579 prof->setIsPhoneSync( mIsPhone->isChecked() ); 580 prof->setIsPhoneSync( mIsPhone->isChecked() );
581 prof->setIsPiSync( mIsPi->isChecked() );
580 prof->setWriteBackFuture(mWriteBackFuture->isChecked()); 582 prof->setWriteBackFuture(mWriteBackFuture->isChecked());
581 prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); 583 prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value());
582 584
583 prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); 585 prof->setWriteContactToSIM(mWriteContactToSIM->isChecked());
584 prof->setPhoneDevice( mPhoneDevice->text() ); 586 prof->setPhoneDevice( mPhoneDevice->text() );
585 prof->setPhoneConnection( mPhoneConnection->text() ); 587 prof->setPhoneConnection( mPhoneConnection->text() );
586 prof->setPhoneModel( mPhoneModel->text() ); 588 prof->setPhoneModel( mPhoneModel->text() );
587 589
588 } 590 }
589 591
590} 592}
591 593
592void KSyncPrefsDialog::insertProfiles() 594void KSyncPrefsDialog::insertProfiles()
593{ 595{
594 int curItem = mProfileBox->currentItem(); 596 int curItem = mProfileBox->currentItem();
595 mProfileBox->blockSignals( true ); 597 mProfileBox->blockSignals( true );
596 mProfileBox->clear(); 598 mProfileBox->clear();
597 mProfileBox->insertStringList (mSyncProfileNames ); 599 mProfileBox->insertStringList (mSyncProfileNames );
598 int item = mSyncProfileNames.count() -1; 600 int item = mSyncProfileNames.count() -1;
599 if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() ) 601 if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() )
600 mProfileBox->setCurrentItem( curItem ); 602 mProfileBox->setCurrentItem( curItem );
601 else if ( item >= 0 ) { 603 else if ( item >= 0 ) {
602 mProfileBox->setCurrentItem( item ); 604 mProfileBox->setCurrentItem( item );
603 } 605 }