summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/ksyncprefsdialog.cpp66
-rw-r--r--libkdepim/ksyncprefsdialog.h15
-rw-r--r--libkdepim/ksyncprofile.cpp49
-rw-r--r--libkdepim/ksyncprofile.h37
4 files changed, 167 insertions, 0 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 28aac45..f05c846 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -181,24 +181,26 @@ void KSyncPrefsDialog::setupSyncAlgTab()
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 );
194 connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
193 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); 195 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr );
194 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 196 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
195 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); 197 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr );
196 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 198 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
197 199
198 200
199 phoneWidget = new QVBox( topFrame); 201 phoneWidget = new QVBox( topFrame);
200 topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); 202 topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
201 ++iii; 203 ++iii;
202 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 );
203 QHBox* temphb = new QHBox( phoneWidget ); 205 QHBox* temphb = new QHBox( phoneWidget );
204 new QLabel( i18n("I/O device: "), temphb ); 206 new QLabel( i18n("I/O device: "), temphb );
@@ -268,26 +270,57 @@ void KSyncPrefsDialog::setupSyncAlgTab()
268 mRemotePostcommand = new QLineEdit(temphb ); 270 mRemotePostcommand = new QLineEdit(temphb );
269 mRemotePostcommandAB = new QLineEdit(temphb ); 271 mRemotePostcommandAB = new QLineEdit(temphb );
270 mRemotePostcommandPWM = new QLineEdit(temphb ); 272 mRemotePostcommandPWM = new QLineEdit(temphb );
271 273
272 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); 274 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
273 temphb = new QHBox( remoteFileWidget ); 275 temphb = new QHBox( remoteFileWidget );
274 button = new QPushButton( i18n("ssh/scp"), temphb ); 276 button = new QPushButton( i18n("ssh/scp"), temphb );
275 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); 277 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) );
276 button = new QPushButton( i18n("ftp"), temphb ); 278 button = new QPushButton( i18n("ftp"), temphb );
277 connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); 279 connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) );
278 lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); 280 lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget);
279 281
282 // *** pi-sync
283 piWidget = new QVBox( topFrame);
284 topLayout->addMultiCellWidget(piWidget, iii,iii,0,1);
285 ++iii;
286 temphb = new QHBox( piWidget );
287 new QLabel( i18n("Calendar:"), temphb);
288 new QLabel( i18n("AddressBook:"), temphb);
289 new QLabel( i18n("PWManager:"), temphb);
290
291 lab = new QLabel( i18n("Password for remote access:"), piWidget);
292 temphb = new QHBox( piWidget );
293 mRemotePw = new QLineEdit(temphb);
294 mRemotePwAB = new QLineEdit(temphb);
295 mRemotePwPWM = new QLineEdit(temphb);
296
297 lab = new QLabel( i18n("Remote IP address:"), piWidget);
298 temphb = new QHBox( piWidget );
299 mRemoteIP = new QLineEdit(temphb);
300 mRemoteIPAB = new QLineEdit(temphb);
301 mRemoteIPPWM = new QLineEdit(temphb);
302
303 lab = new QLabel( i18n("Remote port number:"), piWidget);
304 temphb = new QHBox( piWidget );
305 mRemotePort = new QLineEdit(temphb);
306 mRemotePortAB = new QLineEdit(temphb);
307 mRemotePortPWM = new QLineEdit(temphb);
280 308
281} 309}
310
311
312
313
314
282void KSyncPrefsDialog::slotOK() 315void KSyncPrefsDialog::slotOK()
283{ 316{
284 if ( mMyMachineName->text() == "undefined" ) { 317 if ( mMyMachineName->text() == "undefined" ) {
285 KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error")); 318 KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error"));
286 return; 319 return;
287 } 320 }
288 int i; 321 int i;
289 for (i = 0; i < mSyncProfileNames.count(); ++ i) { 322 for (i = 0; i < mSyncProfileNames.count(); ++ i) {
290 if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { 323 if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) {
291 KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); 324 KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error"));
292 return; 325 return;
293 } 326 }
@@ -344,24 +377,37 @@ void KSyncPrefsDialog::textChanged( const QString & s )
344 mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ; 377 mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ;
345 KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ; 378 KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ;
346 prof->setName( s ); 379 prof->setName( s );
347 mSyncProfileNames[mProfileBox-> currentItem ()] = s; 380 mSyncProfileNames[mProfileBox-> currentItem ()] = s;
348} 381}
349void KSyncPrefsDialog::profileChanged( int item ) 382void KSyncPrefsDialog::profileChanged( int item )
350{ 383{
351 //qDebug("KSyncPrefsDialog::profileChanged before %d, count %d ", item, mProfileBox->count() ); 384 //qDebug("KSyncPrefsDialog::profileChanged before %d, count %d ", item, mProfileBox->count() );
352 KSyncProfile* prof; 385 KSyncProfile* prof;
353 saveProfile(); 386 saveProfile();
354 currentSelection = item; 387 currentSelection = item;
355 prof = mSyncProfiles.at(item) ; 388 prof = mSyncProfiles.at(item) ;
389
390 mRemotePw->setText(prof->getRemotePw());
391 mRemoteIP->setText(prof->getRemoteIP());
392 mRemotePort->setText(prof->getRemotePort());
393
394 mRemotePwAB->setText(prof->getRemotePwAB());
395 mRemoteIPAB->setText(prof->getRemoteIPAB());
396 mRemotePortAB->setText(prof->getRemotePortAB());
397
398 mRemotePwPWM->setText(prof->getRemotePwPWM());
399 mRemoteIPPWM->setText(prof->getRemoteIPPWM());
400 mRemotePortPWM->setText(prof->getRemotePortPWM());
401
356 mRemotePrecommand->setText(prof->getPreSyncCommand()); 402 mRemotePrecommand->setText(prof->getPreSyncCommand());
357 mRemotePostcommand->setText(prof->getPostSyncCommand()); 403 mRemotePostcommand->setText(prof->getPostSyncCommand());
358 mLocalTempFile->setText(prof->getLocalTempFile()); 404 mLocalTempFile->setText(prof->getLocalTempFile());
359 mRemoteFile->setText(prof->getRemoteFileName()) ; 405 mRemoteFile->setText(prof->getRemoteFileName()) ;
360 406
361 mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); 407 mRemotePrecommandAB->setText(prof->getPreSyncCommandAB());
362 mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); 408 mRemotePostcommandAB->setText(prof->getPostSyncCommandAB());
363 mLocalTempFileAB->setText(prof->getLocalTempFileAB()); 409 mLocalTempFileAB->setText(prof->getLocalTempFileAB());
364 mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ; 410 mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ;
365 411
366 mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM()); 412 mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM());
367 mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM()); 413 mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM());
@@ -407,24 +453,25 @@ void KSyncPrefsDialog::profileChanged( int item )
407 break; 453 break;
408 default: 454 default:
409 break; 455 break;
410 } 456 }
411 mIsLocal->setChecked(prof->getIsLocalFileSync()) ; 457 mIsLocal->setChecked(prof->getIsLocalFileSync()) ;
412 mIsPhone->setChecked(prof->getIsPhoneSync()) ; 458 mIsPhone->setChecked(prof->getIsPhoneSync()) ;
413 mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() ); 459 mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() );
414 proGr->setEnabled( item > 2 ); 460 proGr->setEnabled( item > 2 );
415 if ( item < 3 ) { 461 if ( item < 3 ) {
416 localFileWidget->hide(); 462 localFileWidget->hide();
417 remoteFileWidget->hide(); 463 remoteFileWidget->hide();
418 phoneWidget->hide(); 464 phoneWidget->hide();
465 piWidget->hide();
419 466
420 } else 467 } else
421 kindChanged( prof->getIsLocalFileSync() ); 468 kindChanged( prof->getIsLocalFileSync() );
422} 469}
423 470
424void KSyncPrefsDialog::fillSSH() 471void KSyncPrefsDialog::fillSSH()
425{ 472{
426 mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); 473 mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" );
427 mLocalTempFile->setText("/tmp/mycalendar.ics" ); 474 mLocalTempFile->setText("/tmp/mycalendar.ics" );
428 mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); 475 mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" );
429 mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); 476 mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" );
430 mLocalTempFileAB->setText("/tmp/std.vcf" ); 477 mLocalTempFileAB->setText("/tmp/std.vcf" );
@@ -457,46 +504,65 @@ void KSyncPrefsDialog::kindChanged( bool b )
457 504
458 if ( mIsNotLocal->isChecked () ) 505 if ( mIsNotLocal->isChecked () )
459 remoteFileWidget->show(); 506 remoteFileWidget->show();
460 else 507 else
461 remoteFileWidget->hide(); 508 remoteFileWidget->hide();
462 509
463 if ( mIsPhone->isChecked () ) { 510 if ( mIsPhone->isChecked () ) {
464 phoneWidget->show(); 511 phoneWidget->show();
465 } 512 }
466 else { 513 else {
467 phoneWidget->hide(); 514 phoneWidget->hide();
468 } 515 }
516 if ( mIsPi->isChecked () ) {
517 piWidget->show();
518 }
519 else {
520 piWidget->hide();
521 }
469 522
470} 523}
471void KSyncPrefsDialog::deleteProfile() 524void KSyncPrefsDialog::deleteProfile()
472{ 525{
473 //qDebug("KSyncPrefsDialog::deleteProfile() "); 526 //qDebug("KSyncPrefsDialog::deleteProfile() ");
474 if ( currentSelection >= 0 ) { 527 if ( currentSelection >= 0 ) {
475 if ( currentSelection < 3 ) { 528 if ( currentSelection < 3 ) {
476 KMessageBox::error(this,i18n("This profil cannot be deleted!\n"),i18n("KO/Pi config error")); 529 KMessageBox::error(this,i18n("This profil cannot be deleted!\n"),i18n("KO/Pi config error"));
477 return; 530 return;
478 } 531 }
479 KSyncProfile* temp = mSyncProfiles.at(currentSelection); 532 KSyncProfile* temp = mSyncProfiles.at(currentSelection);
480 mSyncProfiles.remove( temp ); 533 mSyncProfiles.remove( temp );
481 mSyncProfileNames.remove( mSyncProfileNames.at( currentSelection )); 534 mSyncProfileNames.remove( mSyncProfileNames.at( currentSelection ));
482 insertProfiles(); 535 insertProfiles();
483 } 536 }
484} 537}
485 538
486void KSyncPrefsDialog::saveProfile() 539void KSyncPrefsDialog::saveProfile()
487{ 540{
488 KSyncProfile* prof; 541 KSyncProfile* prof;
489 if ( currentSelection >= 0 ) { 542 if ( currentSelection >= 0 ) {
490 prof = mSyncProfiles.at(currentSelection) ; 543 prof = mSyncProfiles.at(currentSelection) ;
544
545 prof->setRemotePw( mRemotePw->text());
546 prof->setRemoteIP( mRemoteIP->text());
547 prof->setRemotePort( mRemotePort->text());
548
549 prof->setRemotePwAB( mRemotePwAB->text());
550 prof->setRemoteIPAB( mRemoteIPAB->text());
551 prof->setRemotePortAB( mRemotePortAB->text());
552
553 prof->setRemotePwPWM( mRemotePwPWM->text());
554 prof->setRemoteIPPWM( mRemoteIPPWM->text());
555 prof->setRemotePortPWM( mRemotePortPWM->text());
556
491 prof->setPreSyncCommand( mRemotePrecommand->text()); 557 prof->setPreSyncCommand( mRemotePrecommand->text());
492 prof->setPostSyncCommand( mRemotePostcommand->text() ); 558 prof->setPostSyncCommand( mRemotePostcommand->text() );
493 prof->setLocalTempFile( mLocalTempFile->text()); 559 prof->setLocalTempFile( mLocalTempFile->text());
494 prof->setRemoteFileName( mRemoteFile->text() ); 560 prof->setRemoteFileName( mRemoteFile->text() );
495 prof->setPreSyncCommandAB( mRemotePrecommandAB->text()); 561 prof->setPreSyncCommandAB( mRemotePrecommandAB->text());
496 prof->setPostSyncCommandAB( mRemotePostcommandAB->text() ); 562 prof->setPostSyncCommandAB( mRemotePostcommandAB->text() );
497 prof->setLocalTempFileAB( mLocalTempFileAB->text()); 563 prof->setLocalTempFileAB( mLocalTempFileAB->text());
498 prof->setRemoteFileNameAB( mRemoteFileAB->text() ); 564 prof->setRemoteFileNameAB( mRemoteFileAB->text() );
499 prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); 565 prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text());
500 prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); 566 prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() );
501 prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); 567 prof->setLocalTempFilePWM( mLocalTempFilePWM->text());
502 prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); 568 prof->setRemoteFileNamePWM( mRemoteFilePWM->text() );
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index 8094bdd..d3f8f4c 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -81,24 +81,25 @@ class KSyncPrefsDialog : public KDialog
81 81
82 void setupSyncAlgTab(); 82 void setupSyncAlgTab();
83 83
84 private: 84 private:
85 int currentSelection; 85 int currentSelection;
86 QPtrList<KSyncProfile> mSyncProfiles; 86 QPtrList<KSyncProfile> mSyncProfiles;
87 QStringList mSyncProfileNames; 87 QStringList mSyncProfileNames;
88 QLineEdit * mMyMachineName; 88 QLineEdit * mMyMachineName;
89 QComboBox * mProfileBox; 89 QComboBox * mProfileBox;
90 QRadioButton* mIsLocal; 90 QRadioButton* mIsLocal;
91 QRadioButton* mIsNotLocal; 91 QRadioButton* mIsNotLocal;
92 QRadioButton* mIsPhone; 92 QRadioButton* mIsPhone;
93 QRadioButton* mIsPi;
93 QCheckBox* mIncludeInRing; 94 QCheckBox* mIncludeInRing;
94 QCheckBox* mIncludeInRingAB; 95 QCheckBox* mIncludeInRingAB;
95 QCheckBox* mIncludeInRingPWM; 96 QCheckBox* mIncludeInRingPWM;
96 void addProfile ( KSyncProfile* ); 97 void addProfile ( KSyncProfile* );
97 void insertProfiles(); 98 void insertProfiles();
98 void saveProfile(); 99 void saveProfile();
99 QButtonGroup* proGr; 100 QButtonGroup* proGr;
100 101
101 QRadioButton* loc, *rem, *newest, *ask, *f_loc,* f_rem, *both; 102 QRadioButton* loc, *rem, *newest, *ask, *f_loc,* f_rem, *both;
102 103
103 104
104 QLineEdit * mRemotePostcommand; 105 QLineEdit * mRemotePostcommand;
@@ -107,30 +108,44 @@ class KSyncPrefsDialog : public KDialog
107 QLineEdit * mLocalTempFile; 108 QLineEdit * mLocalTempFile;
108 109
109 QLineEdit * mRemotePostcommandAB; 110 QLineEdit * mRemotePostcommandAB;
110 QLineEdit * mRemotePrecommandAB; 111 QLineEdit * mRemotePrecommandAB;
111 QLineEdit * mRemoteFileAB; 112 QLineEdit * mRemoteFileAB;
112 QLineEdit * mLocalTempFileAB; 113 QLineEdit * mLocalTempFileAB;
113 114
114 QLineEdit * mRemotePostcommandPWM; 115 QLineEdit * mRemotePostcommandPWM;
115 QLineEdit * mRemotePrecommandPWM; 116 QLineEdit * mRemotePrecommandPWM;
116 QLineEdit * mRemoteFilePWM; 117 QLineEdit * mRemoteFilePWM;
117 QLineEdit * mLocalTempFilePWM; 118 QLineEdit * mLocalTempFilePWM;
118 119
120
121 QLineEdit * mRemotePw;
122 QLineEdit * mRemoteIP;
123 QLineEdit * mRemotePort;
124
125 QLineEdit * mRemotePwAB;
126 QLineEdit * mRemoteIPAB;
127 QLineEdit * mRemotePortAB;
128
129 QLineEdit * mRemotePwPWM;
130 QLineEdit * mRemoteIPPWM;
131 QLineEdit * mRemotePortPWM;
132
119 QLineEdit * mPhoneDevice; 133 QLineEdit * mPhoneDevice;
120 QLineEdit * mPhoneConnection; 134 QLineEdit * mPhoneConnection;
121 QLineEdit * mPhoneModel; 135 QLineEdit * mPhoneModel;
122 136
123 QWidget* mSetupSyncAlgTab; 137 QWidget* mSetupSyncAlgTab;
124 QVBox* localFileWidget; 138 QVBox* localFileWidget;
125 QVBox* remoteFileWidget; 139 QVBox* remoteFileWidget;
126 QVBox* phoneWidget; 140 QVBox* phoneWidget;
141 QVBox* piWidget;
127 QCheckBox* mWriteBackFile; 142 QCheckBox* mWriteBackFile;
128 QCheckBox* mWriteBackFuture; 143 QCheckBox* mWriteBackFuture;
129 QSpinBox* mWriteBackFutureWeeks; 144 QSpinBox* mWriteBackFutureWeeks;
130 QCheckBox* mWriteBackExisting; 145 QCheckBox* mWriteBackExisting;
131 QCheckBox* mAskForPreferences; 146 QCheckBox* mAskForPreferences;
132 QCheckBox* mShowSummaryAfterSync; 147 QCheckBox* mShowSummaryAfterSync;
133 QCheckBox* mWriteContactToSIM; 148 QCheckBox* mWriteContactToSIM;
134}; 149};
135 150
136#endif 151#endif
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index 2bf4e6c..76dfe00 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -34,95 +34,130 @@ KSyncProfile::KSyncProfile(): QObject ()
34{ 34{
35 setDefault(); 35 setDefault();
36} 36}
37KSyncProfile::~KSyncProfile() 37KSyncProfile::~KSyncProfile()
38{ 38{
39 39
40} 40}
41 41
42 42
43KSyncProfile* KSyncProfile::clone() 43KSyncProfile* KSyncProfile::clone()
44{ 44{
45 KSyncProfile* myClone = new KSyncProfile(); 45 KSyncProfile* myClone = new KSyncProfile();
46 myClone->setRemotePw(mRemotePw);
47 myClone->setRemoteIP(mRemoteIP);
48 myClone->setRemotePort(mRemotePort);
49 myClone->setRemotePwAB(mRemotePwAB);
50 myClone->setRemoteIPAB(mRemoteIPAB);
51 myClone->setRemotePortAB(mRemotePortAB);
52 myClone->setRemotePwPWM(mRemotePwPWM);
53 myClone->setRemoteIPPWM(mRemoteIPPWM);
54 myClone->setRemotePortPWM (mRemotePortPWM);
46 myClone->setPreSyncCommand( mPreSyncCommand ); 55 myClone->setPreSyncCommand( mPreSyncCommand );
47 myClone->setPostSyncCommand( mPostSyncCommand ); 56 myClone->setPostSyncCommand( mPostSyncCommand );
48 myClone->setLocalTempFile( mLocalTempFile); 57 myClone->setLocalTempFile( mLocalTempFile);
49 myClone->setRemoteFileName( mRemoteFileName ); 58 myClone->setRemoteFileName( mRemoteFileName );
50 myClone->setPreSyncCommandAB( mPreSyncCommandAB ); 59 myClone->setPreSyncCommandAB( mPreSyncCommandAB );
51 myClone->setPostSyncCommandAB( mPostSyncCommandAB ); 60 myClone->setPostSyncCommandAB( mPostSyncCommandAB );
52 myClone->setLocalTempFileAB( mLocalTempFileAB); 61 myClone->setLocalTempFileAB( mLocalTempFileAB);
53 myClone->setRemoteFileNameAB( mRemoteFileNameAB ); 62 myClone->setRemoteFileNameAB( mRemoteFileNameAB );
54 myClone->setPreSyncCommandPWM( mPreSyncCommandPWM ); 63 myClone->setPreSyncCommandPWM( mPreSyncCommandPWM );
55 myClone->setPostSyncCommandPWM( mPostSyncCommandPWM ); 64 myClone->setPostSyncCommandPWM( mPostSyncCommandPWM );
56 myClone->setLocalTempFilePWM( mLocalTempFilePWM); 65 myClone->setLocalTempFilePWM( mLocalTempFilePWM);
57 myClone->setRemoteFileNamePWM( mRemoteFileNamePWM ); 66 myClone->setRemoteFileNamePWM( mRemoteFileNamePWM );
58 myClone->setShowSummaryAfterSync( mShowSummaryAfterSync ); 67 myClone->setShowSummaryAfterSync( mShowSummaryAfterSync );
59 myClone->setAskForPreferences( mAskForPreferences); 68 myClone->setAskForPreferences( mAskForPreferences);
60 myClone->setWriteBackExisting(mWriteBackExisting ); 69 myClone->setWriteBackExisting(mWriteBackExisting );
61 myClone->setWriteBackFile( mWriteBackFile); 70 myClone->setWriteBackFile( mWriteBackFile);
62 myClone->setWriteBackFuture( mWriteBackFuture ); 71 myClone->setWriteBackFuture( mWriteBackFuture );
63 myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); 72 myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks );
64 myClone->setIncludeInRingSync( mIncludeInRingSync ); 73 myClone->setIncludeInRingSync( mIncludeInRingSync );
65 myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); 74 myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
66 myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM ); 75 myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM );
67 myClone->setSyncPrefs( mSyncPrefs); 76 myClone->setSyncPrefs( mSyncPrefs);
68 myClone->setIsLocalFileSync( mIsLocalFileSync ); 77 myClone->setIsLocalFileSync( mIsLocalFileSync );
69 myClone->setIsPhoneSync( mIsPhoneSync ); 78 myClone->setIsPhoneSync( mIsPhoneSync );
79 myClone->setIsPiSync( mIsPiSync );
70 myClone->setWriteContactToSIM( mWriteContactToSIM ); 80 myClone->setWriteContactToSIM( mWriteContactToSIM );
71 myClone->setName( "noName" ); 81 myClone->setName( "noName" );
72 //myClone->setIdentifier( "noID" ); 82 //myClone->setIdentifier( "noID" );
73 return myClone; 83 return myClone;
74} 84}
75 85
76 86
77void KSyncProfile::setDefault() 87void KSyncProfile::setDefault()
78{ 88{
79 mPreSyncCommand = i18n("command for downloading remote file to local device"); 89 mPreSyncCommand = i18n("command for downloading remote file to local device");
80 mPostSyncCommand = i18n("command for uploading local temp file to remote device"); 90 mPostSyncCommand = i18n("command for uploading local temp file to remote device");
81 mLocalTempFile = "/tmp/mycalendar.ics"; 91 mLocalTempFile = "/tmp/mycalendar.ics";
82 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; 92 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics";
83 mPreSyncCommandAB = i18n("command for downloading remote file to local device"); 93 mPreSyncCommandAB = i18n("command for downloading remote file to local device");
84 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device"); 94 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device");
85 mLocalTempFileAB = "/tmp/std.vcf"; 95 mLocalTempFileAB = "/tmp/std.vcf";
86 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf"; 96 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf";
87 mPreSyncCommandPWM = i18n("command for downloading remote file to local device"); 97 mPreSyncCommandPWM = i18n("command for downloading remote file to local device");
88 mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device"); 98 mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device");
89 mLocalTempFilePWM = "/tmp/passwords.pwm"; 99 mLocalTempFilePWM = "/tmp/passwords.pwm";
90 mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm"; 100 mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm";
101
102 mRemotePw = "abc";
103 mRemoteIP = "192.168.0.99";
104 mRemotePort = "9197";
105
106 mRemotePwAB = "abc";
107 mRemoteIPAB = "192.168.0.99";
108 mRemotePortAB = "9198";
109
110 mRemotePwPWM = "abc";
111 mRemoteIPPWM = "192.168.0.99";
112 mRemotePortPWM = "9199";
113
91 mShowSummaryAfterSync = true; 114 mShowSummaryAfterSync = true;
92 mAskForPreferences = true; 115 mAskForPreferences = true;
93 mWriteBackExisting = false; 116 mWriteBackExisting = false;
94 mWriteBackFuture = false; 117 mWriteBackFuture = false;
95 mWriteBackFutureWeeks = 12; 118 mWriteBackFutureWeeks = 12;
96 mWriteBackFile = true; 119 mWriteBackFile = true;
97 mIncludeInRingSync = false; 120 mIncludeInRingSync = false;
98 mIncludeInRingSyncAB = false; 121 mIncludeInRingSyncAB = false;
99 mIncludeInRingSyncPWM = false; 122 mIncludeInRingSyncPWM = false;
100 mSyncPrefs = SYNC_PREF_ASK; 123 mSyncPrefs = SYNC_PREF_ASK;
101 mIsLocalFileSync = true; 124 mIsLocalFileSync = true;
102 mName = "noName"; 125 mName = "noName";
103 mIsPhoneSync = false; 126 mIsPhoneSync = false;
127 mIsPiSync = false;
104 mWriteContactToSIM = false; 128 mWriteContactToSIM = false;
105 mPhoneDevice = "/dev/ircomm"; 129 mPhoneDevice = "/dev/ircomm";
106 mPhoneConnection = "irda"; 130 mPhoneConnection = "irda";
107 mPhoneModel = "6310i"; 131 mPhoneModel = "6310i";
108} 132}
109void KSyncProfile::readConfig(KConfig *config ) 133void KSyncProfile::readConfig(KConfig *config )
110{ 134{
111 if (config) 135 if (config)
112 { 136 {
113 137
114 config->setGroup( mName ); 138 config->setGroup( mName );
115 139
116 mName = config->readEntry( "Name", mName ); 140 mName = config->readEntry( "Name", mName );
141
142 mRemotePw = config->readEntry( "RemotePw",mRemotePw );
143 mRemoteIP = config->readEntry( "RemoteIP",mRemoteIP );
144 mRemotePort = config->readEntry( "RemotePort", mRemotePort );
145 mRemotePwAB = config->readEntry( "RemotePwAB", mRemotePwAB );
146 mRemoteIPAB = config->readEntry( "RemoteIPAB", mRemoteIPAB );
147 mRemotePortAB = config->readEntry( "RemotePortAB", mRemotePortAB );
148 mRemotePwPWM = config->readEntry( "RemotePwPWM", mRemotePwPWM );
149 mRemoteIPPWM = config->readEntry( "RemoteIPPWM", mRemoteIPPWM );
150 mRemotePortPWM = config->readEntry( "RemotePortPWM", mRemotePortPWM );
151
117 mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand ); 152 mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand );
118 mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand ); 153 mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand );
119 mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile ); 154 mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile );
120 mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName ); 155 mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName );
121 156
122 mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB ); 157 mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB );
123 mPostSyncCommandAB = config->readEntry( "PostSyncCommandAB", mPostSyncCommandAB ); 158 mPostSyncCommandAB = config->readEntry( "PostSyncCommandAB", mPostSyncCommandAB );
124 mLocalTempFileAB = config->readEntry( "LocalTempFileAB", mLocalTempFileAB ); 159 mLocalTempFileAB = config->readEntry( "LocalTempFileAB", mLocalTempFileAB );
125 mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB ); 160 mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB );
126 161
127 mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); 162 mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM );
128 mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); 163 mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM );
@@ -137,40 +172,53 @@ void KSyncProfile::readConfig(KConfig *config )
137 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); 172 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
138 mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); 173 mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
139 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); 174 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
140 mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences ); 175 mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences );
141 mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting ); 176 mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting );
142 mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); 177 mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture );
143 mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile ); 178 mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile );
144 mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM ); 179 mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM );
145 mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs ); 180 mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs );
146 mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks ); 181 mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks );
147 mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync ); 182 mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync );
148 mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync ); 183 mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync );
184 mIsPiSync= config->readBoolEntry( "IsPiSync", mIsPiSync );
149 } 185 }
150 else 186 else
151 { 187 {
152 setDefault(); 188 setDefault();
153 } 189 }
154} 190}
155 191
156void KSyncProfile::deleteConfig(KConfig *config ) 192void KSyncProfile::deleteConfig(KConfig *config )
157{ 193{
158 config->deleteGroup( mName ); 194 config->deleteGroup( mName );
159} 195}
160 196
161void KSyncProfile::writeConfig( KConfig * config ) 197void KSyncProfile::writeConfig( KConfig * config )
162{ 198{
163 config->setGroup(mName); 199 config->setGroup(mName);
164 200
201 config->writeEntry( "RemotePw", mRemotePw);
202 config->writeEntry( "RemoteIP", mRemoteIP);
203 config->writeEntry( "RemotePort", mRemotePort);
204
205 config->writeEntry( "RemotePwAB", mRemotePwAB);
206 config->writeEntry( "RemoteIPAB", mRemoteIPAB);
207 config->writeEntry( "RemotePortAB", mRemotePortAB);
208
209 config->writeEntry( "RemotePwPWM", mRemotePwPWM);
210 config->writeEntry( "RemoteIPPWM", mRemoteIPPWM);
211 config->writeEntry( "RemotePortPWM", mRemotePortPWM);
212
165 config->writeEntry( "Name", mName ); 213 config->writeEntry( "Name", mName );
166 config->writeEntry( "PreSyncCommand",mPreSyncCommand ); 214 config->writeEntry( "PreSyncCommand",mPreSyncCommand );
167 config->writeEntry( "PostSyncCommand", mPostSyncCommand ); 215 config->writeEntry( "PostSyncCommand", mPostSyncCommand );
168 config->writeEntry( "LocalTempFile", mLocalTempFile ); 216 config->writeEntry( "LocalTempFile", mLocalTempFile );
169 config->writeEntry( "RemoteFileName", mRemoteFileName ); 217 config->writeEntry( "RemoteFileName", mRemoteFileName );
170 218
171 config->writeEntry( "PreSyncCommandAB",mPreSyncCommandAB ); 219 config->writeEntry( "PreSyncCommandAB",mPreSyncCommandAB );
172 config->writeEntry( "PostSyncCommandAB", mPostSyncCommandAB ); 220 config->writeEntry( "PostSyncCommandAB", mPostSyncCommandAB );
173 config->writeEntry( "LocalTempFileAB", mLocalTempFileAB ); 221 config->writeEntry( "LocalTempFileAB", mLocalTempFileAB );
174 config->writeEntry( "RemoteFileNameAB", mRemoteFileNameAB ); 222 config->writeEntry( "RemoteFileNameAB", mRemoteFileNameAB );
175 223
176 config->writeEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); 224 config->writeEntry( "PreSyncCommandPWM",mPreSyncCommandPWM );
@@ -186,14 +234,15 @@ void KSyncProfile::writeConfig( KConfig * config )
186 config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); 234 config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
187 config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); 235 config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
188 config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); 236 config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
189 config->writeEntry( "AskForPreferences",mAskForPreferences ); 237 config->writeEntry( "AskForPreferences",mAskForPreferences );
190 config->writeEntry( "WriteBackExisting",mWriteBackExisting ); 238 config->writeEntry( "WriteBackExisting",mWriteBackExisting );
191 config->writeEntry( "WriteBackFuture",mWriteBackFuture ); 239 config->writeEntry( "WriteBackFuture",mWriteBackFuture );
192 config->writeEntry( "WriteBackFile",mWriteBackFile ); 240 config->writeEntry( "WriteBackFile",mWriteBackFile );
193 config->writeEntry( "WriteContactToSIM",mWriteContactToSIM ); 241 config->writeEntry( "WriteContactToSIM",mWriteContactToSIM );
194 config->writeEntry( "SyncPrefs", mSyncPrefs ); 242 config->writeEntry( "SyncPrefs", mSyncPrefs );
195 config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks); 243 config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks);
196 config->writeEntry( "IsLocalFileSync", mIsLocalFileSync ); 244 config->writeEntry( "IsLocalFileSync", mIsLocalFileSync );
197 config->writeEntry( "IsPhoneSync", mIsPhoneSync ); 245 config->writeEntry( "IsPhoneSync", mIsPhoneSync );
246 config->writeEntry( "IsPiSync", mIsPiSync );
198} 247}
199 248
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index a81a9ad..6a68bd7 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -36,24 +36,45 @@ class KConfig;
36 36
37class KSyncProfile : public QObject { 37class KSyncProfile : public QObject {
38 public: 38 public:
39 KSyncProfile(); 39 KSyncProfile();
40 ~KSyncProfile() ; 40 ~KSyncProfile() ;
41 41
42 KSyncProfile* clone(); 42 KSyncProfile* clone();
43 void setDefault(); 43 void setDefault();
44 void readConfig(KConfig *); 44 void readConfig(KConfig *);
45 void writeConfig(KConfig *); 45 void writeConfig(KConfig *);
46 void deleteConfig(KConfig *); 46 void deleteConfig(KConfig *);
47 47
48 void setRemotePw( const QString& n ) {mRemotePw = n;}
49 QString getRemotePw( ) { return mRemotePw; }
50 void setRemotePwAB( const QString& n ) {mRemotePwAB = n;}
51 QString getRemotePwAB( ) { return mRemotePwAB; }
52 void setRemotePwPWM( const QString& n ) {mRemotePwPWM = n;}
53 QString getRemotePwPWM( ) { return mRemotePwPWM; }
54
55 void setRemoteIP( const QString& n ) {mRemoteIP = n;}
56 QString getRemoteIP( ) { return mRemoteIP; }
57 void setRemoteIPAB( const QString& n ) {mRemoteIPAB = n;}
58 QString getRemoteIPAB( ) { return mRemoteIPAB; }
59 void setRemoteIPPWM( const QString& n ) {mRemoteIPPWM = n;}
60 QString getRemoteIPPWM( ) { return mRemoteIPPWM; }
61
62 void setRemotePort( const QString& n ) {mRemotePort = n;}
63 QString getRemotePort( ) { return mRemotePort; }
64 void setRemotePortAB( const QString& n ) {mRemotePortAB = n;}
65 QString getRemotePortAB( ) { return mRemotePortAB; }
66 void setRemotePortPWM( const QString& n ) {mRemotePortPWM = n;}
67 QString getRemotePortPWM( ) { return mRemotePortPWM; }
68
48 void setPreSyncCommand( const QString& n ) {mPreSyncCommand = n;} 69 void setPreSyncCommand( const QString& n ) {mPreSyncCommand = n;}
49 QString getPreSyncCommand( ) { return mPreSyncCommand; } 70 QString getPreSyncCommand( ) { return mPreSyncCommand; }
50 void setPostSyncCommand( const QString& n ) {mPostSyncCommand = n;} 71 void setPostSyncCommand( const QString& n ) {mPostSyncCommand = n;}
51 QString getPostSyncCommand( ) { return mPostSyncCommand;} 72 QString getPostSyncCommand( ) { return mPostSyncCommand;}
52 void setLocalTempFile( const QString& n ) { mLocalTempFile= n;} 73 void setLocalTempFile( const QString& n ) { mLocalTempFile= n;}
53 QString getLocalTempFile( ) { return mLocalTempFile;} 74 QString getLocalTempFile( ) { return mLocalTempFile;}
54 void setRemoteFileName( const QString& n ) { mRemoteFileName = n;} 75 void setRemoteFileName( const QString& n ) { mRemoteFileName = n;}
55 QString getRemoteFileName( ) { return mRemoteFileName;} 76 QString getRemoteFileName( ) { return mRemoteFileName;}
56 77
57 void setPreSyncCommandAB( const QString& n ) {mPreSyncCommandAB = n;} 78 void setPreSyncCommandAB( const QString& n ) {mPreSyncCommandAB = n;}
58 QString getPreSyncCommandAB( ) { return mPreSyncCommandAB; } 79 QString getPreSyncCommandAB( ) { return mPreSyncCommandAB; }
59 void setPostSyncCommandAB( const QString& n ) {mPostSyncCommandAB = n;} 80 void setPostSyncCommandAB( const QString& n ) {mPostSyncCommandAB = n;}
@@ -102,47 +123,63 @@ class KSyncProfile : public QObject {
102 void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;} 123 void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;}
103 bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;} 124 bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;}
104 void setIncludeInRingSyncPWM( bool b ) {mIncludeInRingSyncPWM = b;} 125 void setIncludeInRingSyncPWM( bool b ) {mIncludeInRingSyncPWM = b;}
105 bool getIncludeInRingSyncPWM( ) { return mIncludeInRingSyncPWM;} 126 bool getIncludeInRingSyncPWM( ) { return mIncludeInRingSyncPWM;}
106 void setSyncPrefs( int n ) { mSyncPrefs= n;} 127 void setSyncPrefs( int n ) { mSyncPrefs= n;}
107 int getSyncPrefs( ) { return mSyncPrefs;} 128 int getSyncPrefs( ) { return mSyncPrefs;}
108 void setWriteBackFutureWeeks( int n ) { mWriteBackFutureWeeks= n;} 129 void setWriteBackFutureWeeks( int n ) { mWriteBackFutureWeeks= n;}
109 int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;} 130 int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;}
110 void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;} 131 void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;}
111 bool getIsLocalFileSync( ) { return mIsLocalFileSync;} 132 bool getIsLocalFileSync( ) { return mIsLocalFileSync;}
112 void setIsPhoneSync( bool b ) { mIsPhoneSync= b;} 133 void setIsPhoneSync( bool b ) { mIsPhoneSync= b;}
113 bool getIsPhoneSync( ) { return mIsPhoneSync;} 134 bool getIsPhoneSync( ) { return mIsPhoneSync;}
135 void setIsPiSync( bool b ) { mIsPiSync= b;}
136 bool getIsPiSync( ) { return mIsPiSync;}
114 private: 137 private:
115 QString mName; 138 QString mName;
116 QString mPreSyncCommand; 139 QString mPreSyncCommand;
117 QString mPostSyncCommand; 140 QString mPostSyncCommand;
118 QString mLocalTempFile; 141 QString mLocalTempFile;
119 QString mRemoteFileName; 142 QString mRemoteFileName;
120 QString mPreSyncCommandAB; 143 QString mPreSyncCommandAB;
121 QString mPostSyncCommandAB; 144 QString mPostSyncCommandAB;
122 QString mLocalTempFileAB; 145 QString mLocalTempFileAB;
123 QString mRemoteFileNameAB; 146 QString mRemoteFileNameAB;
124 QString mPreSyncCommandPWM; 147 QString mPreSyncCommandPWM;
125 QString mPostSyncCommandPWM; 148 QString mPostSyncCommandPWM;
126 QString mLocalTempFilePWM; 149 QString mLocalTempFilePWM;
127 QString mRemoteFileNamePWM; 150 QString mRemoteFileNamePWM;
128 151
152 QString mRemotePw;
153 QString mRemoteIP;
154 QString mRemotePort;
155
156 QString mRemotePwAB;
157 QString mRemoteIPAB;
158 QString mRemotePortAB;
159
160 QString mRemotePwPWM;
161 QString mRemoteIPPWM;
162 QString mRemotePortPWM;
163
129 QString mPhoneDevice; 164 QString mPhoneDevice;
130 QString mPhoneConnection; 165 QString mPhoneConnection;
131 QString mPhoneModel; 166 QString mPhoneModel;
132 167
133 bool mIncludeInRingSync; 168 bool mIncludeInRingSync;
134 bool mIncludeInRingSyncAB; 169 bool mIncludeInRingSyncAB;
135 bool mIncludeInRingSyncPWM; 170 bool mIncludeInRingSyncPWM;
136 int mSyncPrefs; 171 int mSyncPrefs;
137 bool mWriteBackFile; 172 bool mWriteBackFile;
138 bool mWriteBackExisting; 173 bool mWriteBackExisting;
139 bool mWriteBackFuture; 174 bool mWriteBackFuture;
140 int mWriteBackFutureWeeks; 175 int mWriteBackFutureWeeks;
141 bool mAskForPreferences; 176 bool mAskForPreferences;
142 bool mShowSummaryAfterSync; 177 bool mShowSummaryAfterSync;
143 bool mIsLocalFileSync; 178 bool mIsLocalFileSync;
144 bool mIsPhoneSync; 179 bool mIsPhoneSync;
145 bool mWriteContactToSIM; 180 bool mWriteContactToSIM;
181
182 bool mIsPiSync;
146}; 183};
147 184
148#endif 185#endif