summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprefsdialog.cpp41
-rw-r--r--libkdepim/ksyncprefsdialog.h7
-rw-r--r--libkdepim/ksyncprofile.cpp24
-rw-r--r--libkdepim/ksyncprofile.h16
4 files changed, 86 insertions, 2 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index a1eebec..6e6e631 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -143,12 +143,15 @@ void KSyncPrefsDialog::setupSyncAlgTab()
143 mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame ); 143 mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame );
144 topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1); 144 topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1);
145 ++iii; 145 ++iii;
146 mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame ); 146 mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame );
147 topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1); 147 topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1);
148 ++iii; 148 ++iii;
149 mIncludeInRingPWM = new QCheckBox( i18n("Include in multiple pwmanager sync"), topFrame );
150 topLayout->addMultiCellWidget(mIncludeInRingPWM, iii,iii,0,1);
151 ++iii;
149 152
150 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); 153 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
151 topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); 154 topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
152 ++iii; 155 ++iii;
153 QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); 156 QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
154 topLayout->addMultiCellWidget(gr, iii,iii,0,1); 157 topLayout->addMultiCellWidget(gr, iii,iii,0,1);
@@ -221,44 +224,52 @@ void KSyncPrefsDialog::setupSyncAlgTab()
221 topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); 224 topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1);
222 ++iii; 225 ++iii;
223 temphb = new QHBox( localFileWidget ); 226 temphb = new QHBox( localFileWidget );
224 227
225 lab = new QLabel( i18n("Local file Cal:"), temphb ); 228 lab = new QLabel( i18n("Local file Cal:"), temphb );
226 lab = new QLabel( i18n("Local file ABook:"), temphb ); 229 lab = new QLabel( i18n("Local file ABook:"), temphb );
230 lab = new QLabel( i18n("Local file PWMgr:"), temphb );
227 temphb = new QHBox( localFileWidget ); 231 temphb = new QHBox( localFileWidget );
228 button = new QPushButton( i18n("Choose..."), temphb ); 232 button = new QPushButton( i18n("Choose..."), temphb );
229 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); 233 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) );
230 button = new QPushButton( i18n("Choose..."), temphb ); 234 button = new QPushButton( i18n("Choose..."), temphb );
231 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); 235 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
236 button = new QPushButton( i18n("Choose..."), temphb );
237 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
232 temphb = new QHBox( localFileWidget ); 238 temphb = new QHBox( localFileWidget );
233 239
234 mRemoteFile = new QLineEdit( temphb); 240 mRemoteFile = new QLineEdit( temphb);
235 mRemoteFileAB = new QLineEdit( temphb); 241 mRemoteFileAB = new QLineEdit( temphb);
242 mRemoteFilePWM = new QLineEdit( temphb);
236 243
237 // *** remote 244 // *** remote
238 remoteFileWidget = new QVBox( topFrame); 245 remoteFileWidget = new QVBox( topFrame);
239 topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); 246 topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1);
240 ++iii; 247 ++iii;
241 temphb = new QHBox( remoteFileWidget ); 248 temphb = new QHBox( remoteFileWidget );
242 new QLabel( i18n("Calendar:"), temphb); 249 new QLabel( i18n("Calendar:"), temphb);
243 new QLabel( i18n("AddressBook:"), temphb); 250 new QLabel( i18n("AddressBook:"), temphb);
251 new QLabel( i18n("PWManager:"), temphb);
244 252
245 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); 253 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget);
246 temphb = new QHBox( remoteFileWidget ); 254 temphb = new QHBox( remoteFileWidget );
247 mRemotePrecommand = new QLineEdit(temphb); 255 mRemotePrecommand = new QLineEdit(temphb);
248 mRemotePrecommandAB = new QLineEdit(temphb); 256 mRemotePrecommandAB = new QLineEdit(temphb);
257 mRemotePrecommandPWM = new QLineEdit(temphb);
249 258
250 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); 259 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget);
251 temphb = new QHBox( remoteFileWidget ); 260 temphb = new QHBox( remoteFileWidget );
252 mLocalTempFile = new QLineEdit(temphb); 261 mLocalTempFile = new QLineEdit(temphb);
253 mLocalTempFileAB = new QLineEdit(temphb); 262 mLocalTempFileAB = new QLineEdit(temphb);
263 mLocalTempFilePWM = new QLineEdit(temphb);
254 264
255 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); 265 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget);
256 temphb = new QHBox( remoteFileWidget ); 266 temphb = new QHBox( remoteFileWidget );
257 mRemotePostcommand = new QLineEdit(temphb ); 267 mRemotePostcommand = new QLineEdit(temphb );
258 mRemotePostcommandAB = new QLineEdit(temphb ); 268 mRemotePostcommandAB = new QLineEdit(temphb );
269 mRemotePostcommandPWM = new QLineEdit(temphb );
259 270
260 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); 271 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
261 temphb = new QHBox( remoteFileWidget ); 272 temphb = new QHBox( remoteFileWidget );
262 button = new QPushButton( i18n("ssh/scp"), temphb ); 273 button = new QPushButton( i18n("ssh/scp"), temphb );
263 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); 274 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) );
264 button = new QPushButton( i18n("ftp"), temphb ); 275 button = new QPushButton( i18n("ftp"), temphb );
@@ -298,18 +309,28 @@ void KSyncPrefsDialog::chooseFile()
298} 309}
299 310
300void KSyncPrefsDialog::chooseFileAB() 311void KSyncPrefsDialog::chooseFileAB()
301{ 312{
302 QString fn = QDir::homeDirPath(); 313 QString fn = QDir::homeDirPath();
303 314
304 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this ); 315 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this );
305 if ( fn == "" ) 316 if ( fn == "" )
306 return; 317 return;
307 mRemoteFileAB->setText( fn ); 318 mRemoteFileAB->setText( fn );
308} 319}
309 320
321void KSyncPrefsDialog::chooseFilePWM()
322{
323 QString fn = QDir::homeDirPath();
324
325 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this );
326 if ( fn == "" )
327 return;
328 mRemoteFilePWM->setText( fn );
329}
330
310void KSyncPrefsDialog::textChanged( const QString & s ) 331void KSyncPrefsDialog::textChanged( const QString & s )
311{ 332{
312 if ( mProfileBox->count() == 0 ) 333 if ( mProfileBox->count() == 0 )
313 return; 334 return;
314 if ( currentSelection < 3 ) { 335 if ( currentSelection < 3 ) {
315 //KMessageBox::error(this,i18n("This profil name\ncannot be edited!\n"),i18n("KO/Pi config error")); 336 //KMessageBox::error(this,i18n("This profil name\ncannot be edited!\n"),i18n("KO/Pi config error"));
@@ -338,23 +359,29 @@ void KSyncPrefsDialog::profileChanged( int item )
338 359
339 mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); 360 mRemotePrecommandAB->setText(prof->getPreSyncCommandAB());
340 mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); 361 mRemotePostcommandAB->setText(prof->getPostSyncCommandAB());
341 mLocalTempFileAB->setText(prof->getLocalTempFileAB()); 362 mLocalTempFileAB->setText(prof->getLocalTempFileAB());
342 mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ; 363 mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ;
343 364
365 mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM());
366 mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM());
367 mLocalTempFilePWM->setText(prof->getLocalTempFilePWM());
368 mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ;
369
344 mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); 370 mWriteContactToSIM->setChecked( prof->getWriteContactToSIM());
345 mPhoneDevice->setText(prof->getPhoneDevice()); 371 mPhoneDevice->setText(prof->getPhoneDevice());
346 mPhoneConnection->setText(prof->getPhoneConnection()); 372 mPhoneConnection->setText(prof->getPhoneConnection());
347 mPhoneModel->setText(prof->getPhoneModel()); 373 mPhoneModel->setText(prof->getPhoneModel());
348 374
349 mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); 375 mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync());
350 mAskForPreferences->setChecked( prof->getAskForPreferences()); 376 mAskForPreferences->setChecked( prof->getAskForPreferences());
351 mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); 377 mWriteBackExisting->setChecked( prof->getWriteBackExisting() );
352 mWriteBackFile->setChecked( prof->getWriteBackFile()); 378 mWriteBackFile->setChecked( prof->getWriteBackFile());
353 mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); 379 mIncludeInRing->setChecked( prof->getIncludeInRingSync() );
354 mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); 380 mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() );
381 mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() );
355 mWriteBackFuture->setChecked( prof->getWriteBackFuture()); 382 mWriteBackFuture->setChecked( prof->getWriteBackFuture());
356 mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); 383 mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() );
357 384
358 switch ( prof->getSyncPrefs() ) { 385 switch ( prof->getSyncPrefs() ) {
359 case 0: 386 case 0:
360 loc->setChecked( true); 387 loc->setChecked( true);
@@ -398,21 +425,28 @@ void KSyncPrefsDialog::fillSSH()
398 mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); 425 mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" );
399 mLocalTempFile->setText("/tmp/mycalendar.ics" ); 426 mLocalTempFile->setText("/tmp/mycalendar.ics" );
400 mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); 427 mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" );
401 mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); 428 mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" );
402 mLocalTempFileAB->setText("/tmp/std.vcf" ); 429 mLocalTempFileAB->setText("/tmp/std.vcf" );
403 mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" ); 430 mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" );
431 mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" );
432 mLocalTempFilePWM->setText("/tmp/passwords.pwm" );
433 mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" );
404} 434}
405void KSyncPrefsDialog::fillFTP() 435void KSyncPrefsDialog::fillFTP()
406{ 436{
407 mRemotePrecommand->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics" ); 437 mRemotePrecommand->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics" );
408 mLocalTempFile->setText("/tmp/mycalendar.ics" ); 438 mLocalTempFile->setText("/tmp/mycalendar.ics" );
409 mRemotePostcommand->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); 439 mRemotePostcommand->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" );
410 mRemotePrecommandAB->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf" ); 440 mRemotePrecommandAB->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf" );
411 mLocalTempFileAB->setText("/tmp/std.vcf" ); 441 mLocalTempFileAB->setText("/tmp/std.vcf" );
412 mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); 442 mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" );
443
444 mRemotePrecommandPWM->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm" );
445 mLocalTempFilePWM->setText("/tmp/passwords.pwm" );
446 mRemotePostcommandPWM->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" );
413 447
414} 448}
415void KSyncPrefsDialog::kindChanged( bool b ) 449void KSyncPrefsDialog::kindChanged( bool b )
416{ 450{
417 451
418 if ( mIsLocal->isChecked () ) 452 if ( mIsLocal->isChecked () )
@@ -458,18 +492,23 @@ void KSyncPrefsDialog::saveProfile()
458 prof->setLocalTempFile( mLocalTempFile->text()); 492 prof->setLocalTempFile( mLocalTempFile->text());
459 prof->setRemoteFileName( mRemoteFile->text() ); 493 prof->setRemoteFileName( mRemoteFile->text() );
460 prof->setPreSyncCommandAB( mRemotePrecommandAB->text()); 494 prof->setPreSyncCommandAB( mRemotePrecommandAB->text());
461 prof->setPostSyncCommandAB( mRemotePostcommandAB->text() ); 495 prof->setPostSyncCommandAB( mRemotePostcommandAB->text() );
462 prof->setLocalTempFileAB( mLocalTempFileAB->text()); 496 prof->setLocalTempFileAB( mLocalTempFileAB->text());
463 prof->setRemoteFileNameAB( mRemoteFileAB->text() ); 497 prof->setRemoteFileNameAB( mRemoteFileAB->text() );
498 prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text());
499 prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() );
500 prof->setLocalTempFilePWM( mLocalTempFilePWM->text());
501 prof->setRemoteFileNamePWM( mRemoteFilePWM->text() );
464 prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); 502 prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() );
465 prof->setAskForPreferences( mAskForPreferences->isChecked()); 503 prof->setAskForPreferences( mAskForPreferences->isChecked());
466 prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); 504 prof->setWriteBackExisting(mWriteBackExisting->isChecked() );
467 prof->setWriteBackFile( mWriteBackFile->isChecked()); 505 prof->setWriteBackFile( mWriteBackFile->isChecked());
468 prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); 506 prof->setIncludeInRingSync( mIncludeInRing->isChecked() );
469 prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); 507 prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() );
508 prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() );
470 int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; 509 int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ;
471 prof->setSyncPrefs( syncprefs); 510 prof->setSyncPrefs( syncprefs);
472 prof->setIsLocalFileSync( mIsLocal->isChecked() ); 511 prof->setIsLocalFileSync( mIsLocal->isChecked() );
473 prof->setIsPhoneSync( mIsPhone->isChecked() ); 512 prof->setIsPhoneSync( mIsPhone->isChecked() );
474 prof->setWriteBackFuture(mWriteBackFuture->isChecked()); 513 prof->setWriteBackFuture(mWriteBackFuture->isChecked());
475 prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); 514 prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value());
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index d4e1559..8094bdd 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -67,12 +67,13 @@ class KSyncPrefsDialog : public KDialog
67 void fillSSH(); 67 void fillSSH();
68 void fillFTP(); 68 void fillFTP();
69 void textChanged( const QString & ); 69 void textChanged( const QString & );
70 void profileChanged( int ); 70 void profileChanged( int );
71 void chooseFile(); 71 void chooseFile();
72 void chooseFileAB(); 72 void chooseFileAB();
73 void chooseFilePWM();
73 void slotOK(); 74 void slotOK();
74 void helpDevice(); 75 void helpDevice();
75 void helpModel(); 76 void helpModel();
76 void helpConnection(); 77 void helpConnection();
77 78
78 protected: 79 protected:
@@ -88,12 +89,13 @@ class KSyncPrefsDialog : public KDialog
88 QComboBox * mProfileBox; 89 QComboBox * mProfileBox;
89 QRadioButton* mIsLocal; 90 QRadioButton* mIsLocal;
90 QRadioButton* mIsNotLocal; 91 QRadioButton* mIsNotLocal;
91 QRadioButton* mIsPhone; 92 QRadioButton* mIsPhone;
92 QCheckBox* mIncludeInRing; 93 QCheckBox* mIncludeInRing;
93 QCheckBox* mIncludeInRingAB; 94 QCheckBox* mIncludeInRingAB;
95 QCheckBox* mIncludeInRingPWM;
94 void addProfile ( KSyncProfile* ); 96 void addProfile ( KSyncProfile* );
95 void insertProfiles(); 97 void insertProfiles();
96 void saveProfile(); 98 void saveProfile();
97 QButtonGroup* proGr; 99 QButtonGroup* proGr;
98 100
99 QRadioButton* loc, *rem, *newest, *ask, *f_loc,* f_rem, *both; 101 QRadioButton* loc, *rem, *newest, *ask, *f_loc,* f_rem, *both;
@@ -106,12 +108,17 @@ class KSyncPrefsDialog : public KDialog
106 108
107 QLineEdit * mRemotePostcommandAB; 109 QLineEdit * mRemotePostcommandAB;
108 QLineEdit * mRemotePrecommandAB; 110 QLineEdit * mRemotePrecommandAB;
109 QLineEdit * mRemoteFileAB; 111 QLineEdit * mRemoteFileAB;
110 QLineEdit * mLocalTempFileAB; 112 QLineEdit * mLocalTempFileAB;
111 113
114 QLineEdit * mRemotePostcommandPWM;
115 QLineEdit * mRemotePrecommandPWM;
116 QLineEdit * mRemoteFilePWM;
117 QLineEdit * mLocalTempFilePWM;
118
112 QLineEdit * mPhoneDevice; 119 QLineEdit * mPhoneDevice;
113 QLineEdit * mPhoneConnection; 120 QLineEdit * mPhoneConnection;
114 QLineEdit * mPhoneModel; 121 QLineEdit * mPhoneModel;
115 122
116 QWidget* mSetupSyncAlgTab; 123 QWidget* mSetupSyncAlgTab;
117 QVBox* localFileWidget; 124 QVBox* localFileWidget;
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index c599208..a43ebe2 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -48,20 +48,25 @@ KSyncProfile* KSyncProfile::clone()
48 myClone->setLocalTempFile( mLocalTempFile); 48 myClone->setLocalTempFile( mLocalTempFile);
49 myClone->setRemoteFileName( mRemoteFileName ); 49 myClone->setRemoteFileName( mRemoteFileName );
50 myClone->setPreSyncCommandAB( mPreSyncCommandAB ); 50 myClone->setPreSyncCommandAB( mPreSyncCommandAB );
51 myClone->setPostSyncCommandAB( mPostSyncCommandAB ); 51 myClone->setPostSyncCommandAB( mPostSyncCommandAB );
52 myClone->setLocalTempFileAB( mLocalTempFileAB); 52 myClone->setLocalTempFileAB( mLocalTempFileAB);
53 myClone->setRemoteFileNameAB( mRemoteFileNameAB ); 53 myClone->setRemoteFileNameAB( mRemoteFileNameAB );
54 myClone->setPreSyncCommandPWM( mPreSyncCommandPWM );
55 myClone->setPostSyncCommandPWM( mPostSyncCommandPWM );
56 myClone->setLocalTempFilePWM( mLocalTempFilePWM);
57 myClone->setRemoteFileNamePWM( mRemoteFileNamePWM );
54 myClone->setShowSummaryAfterSync( mShowSummaryAfterSync ); 58 myClone->setShowSummaryAfterSync( mShowSummaryAfterSync );
55 myClone->setAskForPreferences( mAskForPreferences); 59 myClone->setAskForPreferences( mAskForPreferences);
56 myClone->setWriteBackExisting(mWriteBackExisting ); 60 myClone->setWriteBackExisting(mWriteBackExisting );
57 myClone->setWriteBackFile( mWriteBackFile); 61 myClone->setWriteBackFile( mWriteBackFile);
58 myClone->setWriteBackFuture( mWriteBackFuture ); 62 myClone->setWriteBackFuture( mWriteBackFuture );
59 myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); 63 myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks );
60 myClone->setIncludeInRingSync( mIncludeInRingSync ); 64 myClone->setIncludeInRingSync( mIncludeInRingSync );
61 myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); 65 myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
66 myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM );
62 myClone->setSyncPrefs( mSyncPrefs); 67 myClone->setSyncPrefs( mSyncPrefs);
63 myClone->setIsLocalFileSync( mIsLocalFileSync ); 68 myClone->setIsLocalFileSync( mIsLocalFileSync );
64 myClone->setIsPhoneSync( mIsPhoneSync ); 69 myClone->setIsPhoneSync( mIsPhoneSync );
65 myClone->setWriteContactToSIM( mWriteContactToSIM ); 70 myClone->setWriteContactToSIM( mWriteContactToSIM );
66 myClone->setName( "noName" ); 71 myClone->setName( "noName" );
67 //myClone->setIdentifier( "noID" ); 72 //myClone->setIdentifier( "noID" );
@@ -75,21 +80,26 @@ void KSyncProfile::setDefault()
75 mPostSyncCommand = i18n("command for uploading local temp file to remote device"); 80 mPostSyncCommand = i18n("command for uploading local temp file to remote device");
76 mLocalTempFile = "/tmp/mycalendar.ics"; 81 mLocalTempFile = "/tmp/mycalendar.ics";
77 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; 82 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics";
78 mPreSyncCommandAB = i18n("command for downloading remote file to local device"); 83 mPreSyncCommandAB = i18n("command for downloading remote file to local device");
79 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device"); 84 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device");
80 mLocalTempFileAB = "/tmp/std.vcf"; 85 mLocalTempFileAB = "/tmp/std.vcf";
81 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf"; 86 mRemoteFileNamePWM = "/home/polo/kdepim/apps/kabc/localfile.vcf";
87 mPreSyncCommandPWM = i18n("command for downloading remote file to local device");
88 mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device");
89 mLocalTempFilePWM = "/tmp/passwords.pwm";
90 mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm";
82 mShowSummaryAfterSync = true; 91 mShowSummaryAfterSync = true;
83 mAskForPreferences = true; 92 mAskForPreferences = true;
84 mWriteBackExisting = false; 93 mWriteBackExisting = false;
85 mWriteBackFuture = false; 94 mWriteBackFuture = false;
86 mWriteBackFutureWeeks = 12; 95 mWriteBackFutureWeeks = 12;
87 mWriteBackFile = true; 96 mWriteBackFile = true;
88 mIncludeInRingSync = false; 97 mIncludeInRingSync = false;
89 mIncludeInRingSyncAB = false; 98 mIncludeInRingSyncAB = false;
99 mIncludeInRingSyncPWM = false;
90 mSyncPrefs = SYNC_PREF_ASK; 100 mSyncPrefs = SYNC_PREF_ASK;
91 mIsLocalFileSync = true; 101 mIsLocalFileSync = true;
92 mName = "noName"; 102 mName = "noName";
93 mIsPhoneSync = false; 103 mIsPhoneSync = false;
94 mWriteContactToSIM = false; 104 mWriteContactToSIM = false;
95 mPhoneDevice = "/dev/ircomm"; 105 mPhoneDevice = "/dev/ircomm";
@@ -111,18 +121,24 @@ void KSyncProfile::readConfig(KConfig *config )
111 121
112 mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB ); 122 mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB );
113 mPostSyncCommandAB = config->readEntry( "PostSyncCommandAB", mPostSyncCommandAB ); 123 mPostSyncCommandAB = config->readEntry( "PostSyncCommandAB", mPostSyncCommandAB );
114 mLocalTempFileAB = config->readEntry( "LocalTempFileAB", mLocalTempFileAB ); 124 mLocalTempFileAB = config->readEntry( "LocalTempFileAB", mLocalTempFileAB );
115 mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB ); 125 mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB );
116 126
127 mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM );
128 mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM );
129 mLocalTempFilePWM = config->readEntry( "LocalTempFilePWM", mLocalTempFilePWM );
130 mRemoteFileNamePWM = config->readEntry( "RemoteFileNamePWM", mRemoteFileNamePWM );
131
117 mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice ); 132 mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice );
118 mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection ); 133 mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection );
119 mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel ); 134 mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel );
120 135
121 mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync ); 136 mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync );
122 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); 137 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
138 mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
123 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); 139 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
124 mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences ); 140 mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences );
125 mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting ); 141 mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting );
126 mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); 142 mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture );
127 mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile ); 143 mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile );
128 mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM ); 144 mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM );
@@ -154,18 +170,24 @@ void KSyncProfile::writeConfig( KConfig * config )
154 170
155 config->writeEntry( "PreSyncCommandAB",mPreSyncCommandAB ); 171 config->writeEntry( "PreSyncCommandAB",mPreSyncCommandAB );
156 config->writeEntry( "PostSyncCommandAB", mPostSyncCommandAB ); 172 config->writeEntry( "PostSyncCommandAB", mPostSyncCommandAB );
157 config->writeEntry( "LocalTempFileAB", mLocalTempFileAB ); 173 config->writeEntry( "LocalTempFileAB", mLocalTempFileAB );
158 config->writeEntry( "RemoteFileNameAB", mRemoteFileNameAB ); 174 config->writeEntry( "RemoteFileNameAB", mRemoteFileNameAB );
159 175
176 config->writeEntry( "PreSyncCommandPWM",mPreSyncCommandPWM );
177 config->writeEntry( "PostSyncCommandPWM", mPostSyncCommandPWM );
178 config->writeEntry( "LocalTempFilePWM", mLocalTempFilePWM );
179 config->writeEntry( "RemoteFileNamePWM", mRemoteFileNamePWM );
180
160 config->writeEntry( "PhoneDevice", mPhoneDevice ); 181 config->writeEntry( "PhoneDevice", mPhoneDevice );
161 config->writeEntry( "PhoneConnection", mPhoneConnection ); 182 config->writeEntry( "PhoneConnection", mPhoneConnection );
162 config->writeEntry( "PhoneModel", mPhoneModel ); 183 config->writeEntry( "PhoneModel", mPhoneModel );
163 184
164 config->writeEntry( "IncludeInRingSync",mIncludeInRingSync ); 185 config->writeEntry( "IncludeInRingSync",mIncludeInRingSync );
165 config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); 186 config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
187 config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
166 config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); 188 config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
167 config->writeEntry( "AskForPreferences",mAskForPreferences ); 189 config->writeEntry( "AskForPreferences",mAskForPreferences );
168 config->writeEntry( "WriteBackExisting",mWriteBackExisting ); 190 config->writeEntry( "WriteBackExisting",mWriteBackExisting );
169 config->writeEntry( "WriteBackFuture",mWriteBackFuture ); 191 config->writeEntry( "WriteBackFuture",mWriteBackFuture );
170 config->writeEntry( "WriteBackFile",mWriteBackFile ); 192 config->writeEntry( "WriteBackFile",mWriteBackFile );
171 config->writeEntry( "WriteContactToSIM",mWriteContactToSIM ); 193 config->writeEntry( "WriteContactToSIM",mWriteContactToSIM );
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 0039a4b..a81a9ad 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -60,12 +60,21 @@ class KSyncProfile : public QObject {
60 QString getPostSyncCommandAB( ) { return mPostSyncCommandAB;} 60 QString getPostSyncCommandAB( ) { return mPostSyncCommandAB;}
61 void setLocalTempFileAB( const QString& n ) { mLocalTempFileAB= n;} 61 void setLocalTempFileAB( const QString& n ) { mLocalTempFileAB= n;}
62 QString getLocalTempFileAB( ) { return mLocalTempFileAB;} 62 QString getLocalTempFileAB( ) { return mLocalTempFileAB;}
63 void setRemoteFileNameAB( const QString& n ) { mRemoteFileNameAB = n;} 63 void setRemoteFileNameAB( const QString& n ) { mRemoteFileNameAB = n;}
64 QString getRemoteFileNameAB( ) { return mRemoteFileNameAB;} 64 QString getRemoteFileNameAB( ) { return mRemoteFileNameAB;}
65 65
66 void setPreSyncCommandPWM( const QString& n ) {mPreSyncCommandPWM = n;}
67 QString getPreSyncCommandPWM( ) { return mPreSyncCommandPWM; }
68 void setPostSyncCommandPWM( const QString& n ) {mPostSyncCommandPWM = n;}
69 QString getPostSyncCommandPWM( ) { return mPostSyncCommandPWM;}
70 void setLocalTempFilePWM( const QString& n ) { mLocalTempFilePWM= n;}
71 QString getLocalTempFilePWM( ) { return mLocalTempFilePWM;}
72 void setRemoteFileNamePWM( const QString& n ) { mRemoteFileNamePWM = n;}
73 QString getRemoteFileNamePWM( ) { return mRemoteFileNamePWM;}
74
66 void setPhoneDevice( const QString& n ) { mPhoneDevice = n;} 75 void setPhoneDevice( const QString& n ) { mPhoneDevice = n;}
67 QString getPhoneDevice( ) { return mPhoneDevice;} 76 QString getPhoneDevice( ) { return mPhoneDevice;}
68 void setPhoneConnection( const QString& n ) { mPhoneConnection = n;} 77 void setPhoneConnection( const QString& n ) { mPhoneConnection = n;}
69 QString getPhoneConnection( ) { return mPhoneConnection;} 78 QString getPhoneConnection( ) { return mPhoneConnection;}
70 void setPhoneModel( const QString& n ) { mPhoneModel = n;} 79 void setPhoneModel( const QString& n ) { mPhoneModel = n;}
71 QString getPhoneModel( ) { return mPhoneModel;} 80 QString getPhoneModel( ) { return mPhoneModel;}
@@ -89,12 +98,14 @@ class KSyncProfile : public QObject {
89 void setWriteContactToSIM( bool b ) { mWriteContactToSIM= b;} 98 void setWriteContactToSIM( bool b ) { mWriteContactToSIM= b;}
90 bool getWriteContactToSIM( ) { return mWriteContactToSIM;} 99 bool getWriteContactToSIM( ) { return mWriteContactToSIM;}
91 void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;} 100 void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;}
92 bool getIncludeInRingSync( ) { return mIncludeInRingSync;} 101 bool getIncludeInRingSync( ) { return mIncludeInRingSync;}
93 void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;} 102 void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;}
94 bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;} 103 bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;}
104 void setIncludeInRingSyncPWM( bool b ) {mIncludeInRingSyncPWM = b;}
105 bool getIncludeInRingSyncPWM( ) { return mIncludeInRingSyncPWM;}
95 void setSyncPrefs( int n ) { mSyncPrefs= n;} 106 void setSyncPrefs( int n ) { mSyncPrefs= n;}
96 int getSyncPrefs( ) { return mSyncPrefs;} 107 int getSyncPrefs( ) { return mSyncPrefs;}
97 void setWriteBackFutureWeeks( int n ) { mWriteBackFutureWeeks= n;} 108 void setWriteBackFutureWeeks( int n ) { mWriteBackFutureWeeks= n;}
98 int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;} 109 int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;}
99 void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;} 110 void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;}
100 bool getIsLocalFileSync( ) { return mIsLocalFileSync;} 111 bool getIsLocalFileSync( ) { return mIsLocalFileSync;}
@@ -107,19 +118,24 @@ class KSyncProfile : public QObject {
107 QString mLocalTempFile; 118 QString mLocalTempFile;
108 QString mRemoteFileName; 119 QString mRemoteFileName;
109 QString mPreSyncCommandAB; 120 QString mPreSyncCommandAB;
110 QString mPostSyncCommandAB; 121 QString mPostSyncCommandAB;
111 QString mLocalTempFileAB; 122 QString mLocalTempFileAB;
112 QString mRemoteFileNameAB; 123 QString mRemoteFileNameAB;
124 QString mPreSyncCommandPWM;
125 QString mPostSyncCommandPWM;
126 QString mLocalTempFilePWM;
127 QString mRemoteFileNamePWM;
113 128
114 QString mPhoneDevice; 129 QString mPhoneDevice;
115 QString mPhoneConnection; 130 QString mPhoneConnection;
116 QString mPhoneModel; 131 QString mPhoneModel;
117 132
118 bool mIncludeInRingSync; 133 bool mIncludeInRingSync;
119 bool mIncludeInRingSyncAB; 134 bool mIncludeInRingSyncAB;
135 bool mIncludeInRingSyncPWM;
120 int mSyncPrefs; 136 int mSyncPrefs;
121 bool mWriteBackFile; 137 bool mWriteBackFile;
122 bool mWriteBackExisting; 138 bool mWriteBackExisting;
123 bool mWriteBackFuture; 139 bool mWriteBackFuture;
124 int mWriteBackFutureWeeks; 140 int mWriteBackFutureWeeks;
125 bool mAskForPreferences; 141 bool mAskForPreferences;