summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-08-01 16:27:04 (UTC)
committer zautrix <zautrix>2004-08-01 16:27:04 (UTC)
commitf968c6f5541463caadee98e200c2ba035fa20959 (patch) (unidiff)
treee71549b7ba1312a55f0311ed74754943d22af22a
parent3a4186926d078692ad3c2261b70406c391f27554 (diff)
downloadkdepimpi-f968c6f5541463caadee98e200c2ba035fa20959.zip
kdepimpi-f968c6f5541463caadee98e200c2ba035fa20959.tar.gz
kdepimpi-f968c6f5541463caadee98e200c2ba035fa20959.tar.bz2
Extended the sync config dialog
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprefsdialog.cpp77
-rw-r--r--libkdepim/ksyncprefsdialog.h19
-rw-r--r--libkdepim/ksyncprofile.cpp37
-rw-r--r--libkdepim/ksyncprofile.h21
4 files changed, 131 insertions, 23 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 7c04f48..355c05d 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -163,16 +163,24 @@ void KSyncPrefsDialog::setupSyncAlgTab()
163 163
164 mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame ); 164 mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame );
165 topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1); 165 topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1);
166 ++iii;
167
168 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame );
169 topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
166 ++iii; 170 ++iii;
167 171
168 mWriteBackExisting= new QCheckBox( i18n("Write back existing entries only"), topFrame ); 172 mWriteBackExisting= new QCheckBox( i18n("-- Write back (on remote) existing entries only"), topFrame );
169 topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); 173 topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1);
170 ++iii; 174 ++iii;
171 175
172 mWriteBackFile = new QCheckBox( i18n("Write back file"), topFrame ); 176 mWriteBackFuture= new QCheckBox( i18n("-- Write back (calendar) entries in future only"), topFrame );
173 topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); 177 topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
174 ++iii; 178 ++iii;
175 179 topLayout->addMultiCellWidget(new QLabel( i18n("---- Max. weeks in future: ") , topFrame ), iii,iii,0,0);
180 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, topFrame);
181 topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1);
182 ++iii;
183
176 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); 184 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
177 gr = proGr; 185 gr = proGr;
178 topLayout->addMultiCellWidget(gr, iii,iii,0,1); 186 topLayout->addMultiCellWidget(gr, iii,iii,0,1);
@@ -180,30 +188,46 @@ void KSyncPrefsDialog::setupSyncAlgTab()
180 mIsLocal = new QRadioButton ( i18n("Local file"), gr ); 188 mIsLocal = new QRadioButton ( i18n("Local file"), gr );
181 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); 189 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr );
182 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 190 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
183 191 // *** local
184 localFileWidget = new QVBox( topFrame); 192 localFileWidget = new QVBox( topFrame);
185 topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); 193 topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1);
186 ++iii; 194 ++iii;
187 QHBox* temphb = new QHBox( localFileWidget ); 195 QHBox* temphb = new QHBox( localFileWidget );
188 lab = new QLabel( i18n("Local file:"), temphb);
189 mRemoteFile = new QLineEdit(localFileWidget);
190 196
197 lab = new QLabel( i18n("Local file Cal:"), temphb );
198 lab = new QLabel( i18n("Local file ABook:"), temphb );
199 temphb = new QHBox( localFileWidget );
191 button = new QPushButton( i18n("Choose..."), temphb ); 200 button = new QPushButton( i18n("Choose..."), temphb );
192 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); 201 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) );
202 button = new QPushButton( i18n("Choose..."), temphb );
203 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
204 temphb = new QHBox( localFileWidget );
193 205
206 mRemoteFile = new QLineEdit( temphb);
207 mRemoteFileAB = new QLineEdit( temphb);
194 208
209 // *** remote
195 remoteFileWidget = new QVBox( topFrame); 210 remoteFileWidget = new QVBox( topFrame);
196 topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); 211 topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1);
197 ++iii; 212 ++iii;
213 temphb = new QHBox( remoteFileWidget );
214 new QLabel( i18n("Calendar:"), temphb);
215 new QLabel( i18n("AddressBook:"), temphb);
216
198 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); 217 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget);
199 mRemotePrecommand = new QLineEdit(remoteFileWidget); 218 temphb = new QHBox( remoteFileWidget );
219 mRemotePrecommand = new QLineEdit(temphb);
220 mRemotePrecommandAB = new QLineEdit(temphb);
200 221
201 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); 222 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget);
202 mLocalTempFile = new QLineEdit(remoteFileWidget); 223 temphb = new QHBox( remoteFileWidget );
224 mLocalTempFile = new QLineEdit(temphb);
225 mLocalTempFileAB = new QLineEdit(temphb);
203 226
204
205 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); 227 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget);
206 mRemotePostcommand = new QLineEdit(remoteFileWidget); 228 temphb = new QHBox( remoteFileWidget );
229 mRemotePostcommand = new QLineEdit(temphb );
230 mRemotePostcommandAB = new QLineEdit(temphb );
207 231
208 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); 232 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
209 temphb = new QHBox( remoteFileWidget ); 233 temphb = new QHBox( remoteFileWidget );
@@ -245,6 +269,16 @@ void KSyncPrefsDialog::chooseFile()
245 mRemoteFile->setText( fn ); 269 mRemoteFile->setText( fn );
246} 270}
247 271
272void KSyncPrefsDialog::chooseFileAB()
273{
274 QString fn = QDir::homeDirPath();
275
276 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this );
277 if ( fn == "" )
278 return;
279 mRemoteFileAB->setText( fn );
280}
281
248void KSyncPrefsDialog::textChanged( const QString & s ) 282void KSyncPrefsDialog::textChanged( const QString & s )
249{ 283{
250 if ( mProfileBox->count() == 0 ) 284 if ( mProfileBox->count() == 0 )
@@ -273,12 +307,19 @@ void KSyncPrefsDialog::profileChanged( int item )
273 mRemotePostcommand->setText(prof->getPostSyncCommand()); 307 mRemotePostcommand->setText(prof->getPostSyncCommand());
274 mLocalTempFile->setText(prof->getLocalTempFile()); 308 mLocalTempFile->setText(prof->getLocalTempFile());
275 mRemoteFile->setText(prof->getRemoteFileName()) ; 309 mRemoteFile->setText(prof->getRemoteFileName()) ;
310
311 mRemotePrecommandAB->setText(prof->getPreSyncCommandAB());
312 mRemotePostcommandAB->setText(prof->getPostSyncCommandAB());
313 mLocalTempFileAB->setText(prof->getLocalTempFileAB());
314 mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ;
276 mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); 315 mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync());
277 mAskForPreferences->setChecked( prof->getAskForPreferences()); 316 mAskForPreferences->setChecked( prof->getAskForPreferences());
278 mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); 317 mWriteBackExisting->setChecked( prof->getWriteBackExisting() );
279 mWriteBackFile->setChecked( prof->getWriteBackFile()); 318 mWriteBackFile->setChecked( prof->getWriteBackFile());
280 mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); 319 mIncludeInRing->setChecked( prof->getIncludeInRingSync() );
281 mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); 320 mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() );
321 mWriteBackFuture->setChecked( prof->getWriteBackFuture());
322 mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() );
282 323
283 switch ( prof->getSyncPrefs() ) { 324 switch ( prof->getSyncPrefs() ) {
284 case 0: 325 case 0:
@@ -321,12 +362,18 @@ void KSyncPrefsDialog::fillSSH()
321 mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); 362 mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" );
322 mLocalTempFile->setText("/tmp/mycalendar.ics" ); 363 mLocalTempFile->setText("/tmp/mycalendar.ics" );
323 mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); 364 mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" );
365 mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" );
366 mLocalTempFileAB->setText("/tmp/std.vcf" );
367 mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" );
324} 368}
325void KSyncPrefsDialog::fillFTP() 369void KSyncPrefsDialog::fillFTP()
326{ 370{
327 mRemotePrecommand->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics" ); 371 mRemotePrecommand->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics" );
328 mLocalTempFile->setText("/tmp/mycalendar.ics" ); 372 mLocalTempFile->setText("/tmp/mycalendar.ics" );
329 mRemotePostcommand->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); 373 mRemotePostcommand->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" );
374 mRemotePrecommandAB->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf" );
375 mLocalTempFileAB->setText("/tmp/std.vcf" );
376 mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" );
330 377
331} 378}
332void KSyncPrefsDialog::kindChanged( bool b ) 379void KSyncPrefsDialog::kindChanged( bool b )
@@ -360,6 +407,10 @@ void KSyncPrefsDialog::saveProfile()
360 prof->setPostSyncCommand( mRemotePostcommand->text() ); 407 prof->setPostSyncCommand( mRemotePostcommand->text() );
361 prof->setLocalTempFile( mLocalTempFile->text()); 408 prof->setLocalTempFile( mLocalTempFile->text());
362 prof->setRemoteFileName( mRemoteFile->text() ); 409 prof->setRemoteFileName( mRemoteFile->text() );
410 prof->setPreSyncCommandAB( mRemotePrecommandAB->text());
411 prof->setPostSyncCommandAB( mRemotePostcommandAB->text() );
412 prof->setLocalTempFileAB( mLocalTempFileAB->text());
413 prof->setRemoteFileNameAB( mRemoteFileAB->text() );
363 prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); 414 prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() );
364 prof->setAskForPreferences( mAskForPreferences->isChecked()); 415 prof->setAskForPreferences( mAskForPreferences->isChecked());
365 prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); 416 prof->setWriteBackExisting(mWriteBackExisting->isChecked() );
@@ -369,6 +420,8 @@ void KSyncPrefsDialog::saveProfile()
369 int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; 420 int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ;
370 prof->setSyncPrefs( syncprefs); 421 prof->setSyncPrefs( syncprefs);
371 prof->setIsLocalFileSync( mIsLocal->isChecked() ); 422 prof->setIsLocalFileSync( mIsLocal->isChecked() );
423 prof->setWriteBackFuture(mWriteBackFuture->isChecked());
424 prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value());
372 } 425 }
373 426
374} 427}
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index c663d22..8c2c59c 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -69,6 +69,7 @@ class KSyncPrefsDialog : public KDialog
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 slotOK(); 73 void slotOK();
73 74
74 protected: 75 protected:
@@ -98,14 +99,22 @@ class KSyncPrefsDialog : public KDialog
98 QLineEdit * mRemotePrecommand; 99 QLineEdit * mRemotePrecommand;
99 QLineEdit * mRemoteFile; 100 QLineEdit * mRemoteFile;
100 QLineEdit * mLocalTempFile; 101 QLineEdit * mLocalTempFile;
101 QWidget* mSetupSyncAlgTab;
102 102
103 QLineEdit * mRemotePostcommandAB;
104 QLineEdit * mRemotePrecommandAB;
105 QLineEdit * mRemoteFileAB;
106 QLineEdit * mLocalTempFileAB;
107
108
109 QWidget* mSetupSyncAlgTab;
103 QVBox* localFileWidget; 110 QVBox* localFileWidget;
104 QVBox* remoteFileWidget; 111 QVBox* remoteFileWidget;
105 QCheckBox* mWriteBackFile; 112 QCheckBox* mWriteBackFile;
106 QCheckBox* mWriteBackExisting; 113 QCheckBox* mWriteBackFuture;
107 QCheckBox* mAskForPreferences; 114 QSpinBox* mWriteBackFutureWeeks;
108 QCheckBox* mShowSummaryAfterSync; 115 QCheckBox* mWriteBackExisting;
116 QCheckBox* mAskForPreferences;
117 QCheckBox* mShowSummaryAfterSync;
109}; 118};
110 119
111#endif 120#endif
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index ea41a85..f34c309 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -47,10 +47,16 @@ KSyncProfile* KSyncProfile::clone()
47 myClone->setPostSyncCommand( mPostSyncCommand ); 47 myClone->setPostSyncCommand( mPostSyncCommand );
48 myClone->setLocalTempFile( mLocalTempFile); 48 myClone->setLocalTempFile( mLocalTempFile);
49 myClone->setRemoteFileName( mRemoteFileName ); 49 myClone->setRemoteFileName( mRemoteFileName );
50 myClone->setPreSyncCommandAB( mPreSyncCommandAB );
51 myClone->setPostSyncCommandAB( mPostSyncCommandAB );
52 myClone->setLocalTempFileAB( mLocalTempFileAB);
53 myClone->setRemoteFileNameAB( mRemoteFileNameAB );
50 myClone->setShowSummaryAfterSync( mShowSummaryAfterSync ); 54 myClone->setShowSummaryAfterSync( mShowSummaryAfterSync );
51 myClone->setAskForPreferences( mAskForPreferences); 55 myClone->setAskForPreferences( mAskForPreferences);
52 myClone->setWriteBackExisting(mWriteBackExisting ); 56 myClone->setWriteBackExisting(mWriteBackExisting );
53 myClone->setWriteBackFile( mWriteBackFile); 57 myClone->setWriteBackFile( mWriteBackFile);
58 myClone->setWriteBackFuture( mWriteBackFuture );
59 myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks );
54 myClone->setIncludeInRingSync( mIncludeInRingSync ); 60 myClone->setIncludeInRingSync( mIncludeInRingSync );
55 myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); 61 myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
56 myClone->setSyncPrefs( mSyncPrefs); 62 myClone->setSyncPrefs( mSyncPrefs);
@@ -67,9 +73,15 @@ void KSyncProfile::setDefault()
67 mPostSyncCommand = i18n("command for uploading local temp file to remote device"); 73 mPostSyncCommand = i18n("command for uploading local temp file to remote device");
68 mLocalTempFile = "/tmp/mycalendar.ics"; 74 mLocalTempFile = "/tmp/mycalendar.ics";
69 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; 75 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics";
76 mPreSyncCommandAB = i18n("command for downloading remote file to local device");
77 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device");
78 mLocalTempFileAB = "/tmp/std.vcf";
79 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf";
70 mShowSummaryAfterSync = true; 80 mShowSummaryAfterSync = true;
71 mAskForPreferences = true; 81 mAskForPreferences = true;
72 mWriteBackExisting = false; 82 mWriteBackExisting = false;
83 mWriteBackFuture = false;
84 mWriteBackFutureWeeks = 12;
73 mWriteBackFile = true; 85 mWriteBackFile = true;
74 mIncludeInRingSync = false; 86 mIncludeInRingSync = false;
75 mIncludeInRingSyncAB = false; 87 mIncludeInRingSyncAB = false;
@@ -83,15 +95,23 @@ void KSyncProfile::readConfig(KConfig *config )
83 QString prefix = "Profile_"+mName+"_"; 95 QString prefix = "Profile_"+mName+"_";
84 //mName = config->readEntry( prefix+ "Name", mName ); 96 //mName = config->readEntry( prefix+ "Name", mName );
85 mPreSyncCommand = config->readEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); 97 mPreSyncCommand = config->readEntry( prefix+ "PreSyncCommand",mPreSyncCommand );
86 mPostSyncCommand = config->readEntry( prefix+ "PostSyncCommand", mPostSyncCommand ); 98 mPostSyncCommand = config->readEntry( prefix+ "PostSyncCommand", mPostSyncCommand );;
87 mIncludeInRingSync = config->readBoolEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
88 mIncludeInRingSyncAB = config->readBoolEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
89 mLocalTempFile = config->readEntry( prefix+ "LocalTempFile", mLocalTempFile ); 99 mLocalTempFile = config->readEntry( prefix+ "LocalTempFile", mLocalTempFile );
90 mRemoteFileName = config->readEntry( prefix+ "RemoteFileName", mRemoteFileName ); 100 mRemoteFileName = config->readEntry( prefix+ "RemoteFileName", mRemoteFileName );
101
102 mPreSyncCommandAB = config->readEntry( prefix+ "PreSyncCommandAB",mPreSyncCommandAB );
103 mPostSyncCommandAB = config->readEntry( prefix+ "PostSyncCommandAB", mPostSyncCommandAB );
104 mLocalTempFileAB = config->readEntry( prefix+ "LocalTempFileAB", mLocalTempFileAB );
105 mRemoteFileNameAB = config->readEntry( prefix+ "RemoteFileNameAB", mRemoteFileNameAB );
106
107 mIncludeInRingSync = config->readBoolEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
108 mIncludeInRingSyncAB = config->readBoolEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
91 mShowSummaryAfterSync = config->readBoolEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync ); 109 mShowSummaryAfterSync = config->readBoolEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync );
92 mAskForPreferences = config->readBoolEntry( prefix+ "AskForPreferences",mAskForPreferences ); 110 mAskForPreferences = config->readBoolEntry( prefix+ "AskForPreferences",mAskForPreferences );
93 mWriteBackExisting = config->readBoolEntry( prefix+ "WriteBackExisting",mWriteBackExisting ); 111 mWriteBackExisting = config->readBoolEntry( prefix+ "WriteBackExisting",mWriteBackExisting );
112 mWriteBackFuture = config->readBoolEntry( prefix+ "WriteBackFuture",mWriteBackFuture );
94 mSyncPrefs = config->readNumEntry( prefix+ "SyncPrefs", mSyncPrefs ); 113 mSyncPrefs = config->readNumEntry( prefix+ "SyncPrefs", mSyncPrefs );
114 mWriteBackFutureWeeks = config->readNumEntry( prefix+ "WriteBackFutureWeeks", mWriteBackFutureWeeks );
95 mIsLocalFileSync= config->readBoolEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync ); 115 mIsLocalFileSync= config->readBoolEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync );
96} 116}
97void KSyncProfile::writeConfig( KConfig * config ) 117void KSyncProfile::writeConfig( KConfig * config )
@@ -101,14 +121,21 @@ void KSyncProfile::writeConfig( KConfig * config )
101 // config->writeEntry( prefix+ "Name", mName ); 121 // config->writeEntry( prefix+ "Name", mName );
102 config->writeEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); 122 config->writeEntry( prefix+ "PreSyncCommand",mPreSyncCommand );
103 config->writeEntry( prefix+ "PostSyncCommand", mPostSyncCommand ); 123 config->writeEntry( prefix+ "PostSyncCommand", mPostSyncCommand );
104 config->writeEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
105 config->writeEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
106 config->writeEntry( prefix+ "LocalTempFile", mLocalTempFile ); 124 config->writeEntry( prefix+ "LocalTempFile", mLocalTempFile );
107 config->writeEntry( prefix+ "RemoteFileName", mRemoteFileName ); 125 config->writeEntry( prefix+ "RemoteFileName", mRemoteFileName );
126
127 config->writeEntry( prefix+ "PreSyncCommandAB",mPreSyncCommandAB );
128 config->writeEntry( prefix+ "PostSyncCommandAB", mPostSyncCommandAB );
129 config->writeEntry( prefix+ "LocalTempFileAB", mLocalTempFileAB );
130 config->writeEntry( prefix+ "RemoteFileNameAB", mRemoteFileNameAB );
131 config->writeEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
132 config->writeEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
108 config->writeEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync ); 133 config->writeEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync );
109 config->writeEntry( prefix+ "AskForPreferences",mAskForPreferences ); 134 config->writeEntry( prefix+ "AskForPreferences",mAskForPreferences );
110 config->writeEntry( prefix+ "WriteBackExisting",mWriteBackExisting ); 135 config->writeEntry( prefix+ "WriteBackExisting",mWriteBackExisting );
136 config->writeEntry( prefix+ "WriteBackFuture",mWriteBackFuture );
111 config->writeEntry( prefix+ "SyncPrefs", mSyncPrefs ); 137 config->writeEntry( prefix+ "SyncPrefs", mSyncPrefs );
138 config->writeEntry( prefix+ "WriteBackFutureWeeks", mWriteBackFutureWeeks);
112 config->writeEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync ); 139 config->writeEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync );
113} 140}
114 141
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index df1b49e..80094b1 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -59,11 +59,20 @@ class KSyncProfile : public QObject {
59 QString getPreSyncCommand( ) { return mPreSyncCommand; } 59 QString getPreSyncCommand( ) { return mPreSyncCommand; }
60 void setPostSyncCommand( const QString& n ) {mPostSyncCommand = n;} 60 void setPostSyncCommand( const QString& n ) {mPostSyncCommand = n;}
61 QString getPostSyncCommand( ) { return mPostSyncCommand;} 61 QString getPostSyncCommand( ) { return mPostSyncCommand;}
62
63 void setLocalTempFile( const QString& n ) { mLocalTempFile= n;} 62 void setLocalTempFile( const QString& n ) { mLocalTempFile= n;}
64 QString getLocalTempFile( ) { return mLocalTempFile;} 63 QString getLocalTempFile( ) { return mLocalTempFile;}
65 void setRemoteFileName( const QString& n ) { mRemoteFileName = n;} 64 void setRemoteFileName( const QString& n ) { mRemoteFileName = n;}
66 QString getRemoteFileName( ) { return mRemoteFileName;} 65 QString getRemoteFileName( ) { return mRemoteFileName;}
66
67 void setPreSyncCommandAB( const QString& n ) {mPreSyncCommandAB = n;}
68 QString getPreSyncCommandAB( ) { return mPreSyncCommandAB; }
69 void setPostSyncCommandAB( const QString& n ) {mPostSyncCommandAB = n;}
70 QString getPostSyncCommandAB( ) { return mPostSyncCommandAB;}
71 void setLocalTempFileAB( const QString& n ) { mLocalTempFileAB= n;}
72 QString getLocalTempFileAB( ) { return mLocalTempFileAB;}
73 void setRemoteFileNameAB( const QString& n ) { mRemoteFileNameAB = n;}
74 QString getRemoteFileNameAB( ) { return mRemoteFileNameAB;}
75
67 /* 76 /*
68 void set( const QString& n ) { = n;} 77 void set( const QString& n ) { = n;}
69 QString get( ) { return ;} 78 QString get( ) { return ;}
@@ -75,6 +84,8 @@ class KSyncProfile : public QObject {
75 bool getAskForPreferences( ) { return mAskForPreferences;} 84 bool getAskForPreferences( ) { return mAskForPreferences;}
76 void setWriteBackExisting( bool b ) { mWriteBackExisting = b;} 85 void setWriteBackExisting( bool b ) { mWriteBackExisting = b;}
77 bool getWriteBackExisting( ) { return mWriteBackExisting;} 86 bool getWriteBackExisting( ) { return mWriteBackExisting;}
87 void setWriteBackFuture( bool b ) { mWriteBackFuture = b;}
88 bool getWriteBackFuture( ) { return mWriteBackFuture;}
78 void setWriteBackFile( bool b ) { mWriteBackFile= b;} 89 void setWriteBackFile( bool b ) { mWriteBackFile= b;}
79 bool getWriteBackFile( ) { return mWriteBackFile;} 90 bool getWriteBackFile( ) { return mWriteBackFile;}
80 void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;} 91 void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;}
@@ -83,6 +94,8 @@ class KSyncProfile : public QObject {
83 bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;} 94 bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;}
84 void setSyncPrefs( int n ) { mSyncPrefs= n;} 95 void setSyncPrefs( int n ) { mSyncPrefs= n;}
85 int getSyncPrefs( ) { return mSyncPrefs;} 96 int getSyncPrefs( ) { return mSyncPrefs;}
97 void setWriteBackFutureWeeks( int n ) { mWriteBackFutureWeeks= n;}
98 int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;}
86 void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;} 99 void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;}
87 bool getIsLocalFileSync( ) { return mIsLocalFileSync;} 100 bool getIsLocalFileSync( ) { return mIsLocalFileSync;}
88 101
@@ -92,11 +105,17 @@ class KSyncProfile : public QObject {
92 QString mPostSyncCommand; 105 QString mPostSyncCommand;
93 QString mLocalTempFile; 106 QString mLocalTempFile;
94 QString mRemoteFileName; 107 QString mRemoteFileName;
108 QString mPreSyncCommandAB;
109 QString mPostSyncCommandAB;
110 QString mLocalTempFileAB;
111 QString mRemoteFileNameAB;
95 bool mIncludeInRingSync; 112 bool mIncludeInRingSync;
96 bool mIncludeInRingSyncAB; 113 bool mIncludeInRingSyncAB;
97 int mSyncPrefs; 114 int mSyncPrefs;
98 bool mWriteBackFile; 115 bool mWriteBackFile;
99 bool mWriteBackExisting; 116 bool mWriteBackExisting;
117 bool mWriteBackFuture;
118 int mWriteBackFutureWeeks;
100 bool mAskForPreferences; 119 bool mAskForPreferences;
101 bool mShowSummaryAfterSync; 120 bool mShowSummaryAfterSync;
102 bool mIsLocalFileSync; 121 bool mIsLocalFileSync;