summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncprofile.cpp
authorzautrix <zautrix>2004-08-01 16:27:04 (UTC)
committer zautrix <zautrix>2004-08-01 16:27:04 (UTC)
commitf968c6f5541463caadee98e200c2ba035fa20959 (patch) (side-by-side diff)
treee71549b7ba1312a55f0311ed74754943d22af22a /libkdepim/ksyncprofile.cpp
parent3a4186926d078692ad3c2261b70406c391f27554 (diff)
downloadkdepimpi-f968c6f5541463caadee98e200c2ba035fa20959.zip
kdepimpi-f968c6f5541463caadee98e200c2ba035fa20959.tar.gz
kdepimpi-f968c6f5541463caadee98e200c2ba035fa20959.tar.bz2
Extended the sync config dialog
Diffstat (limited to 'libkdepim/ksyncprofile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprofile.cpp37
1 files changed, 32 insertions, 5 deletions
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()
myClone->setPostSyncCommand( mPostSyncCommand );
myClone->setLocalTempFile( mLocalTempFile);
myClone->setRemoteFileName( mRemoteFileName );
+ myClone->setPreSyncCommandAB( mPreSyncCommandAB );
+ myClone->setPostSyncCommandAB( mPostSyncCommandAB );
+ myClone->setLocalTempFileAB( mLocalTempFileAB);
+ myClone->setRemoteFileNameAB( mRemoteFileNameAB );
myClone->setShowSummaryAfterSync( mShowSummaryAfterSync );
myClone->setAskForPreferences( mAskForPreferences);
myClone->setWriteBackExisting(mWriteBackExisting );
myClone->setWriteBackFile( mWriteBackFile);
+ myClone->setWriteBackFuture( mWriteBackFuture );
+ myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks );
myClone->setIncludeInRingSync( mIncludeInRingSync );
myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
myClone->setSyncPrefs( mSyncPrefs);
@@ -67,9 +73,15 @@ void KSyncProfile::setDefault()
mPostSyncCommand = i18n("command for uploading local temp file to remote device");
mLocalTempFile = "/tmp/mycalendar.ics";
mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics";
+ mPreSyncCommandAB = i18n("command for downloading remote file to local device");
+ mPostSyncCommandAB = i18n("command for uploading local temp file to remote device");
+ mLocalTempFileAB = "/tmp/std.vcf";
+ mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf";
mShowSummaryAfterSync = true;
mAskForPreferences = true;
mWriteBackExisting = false;
+ mWriteBackFuture = false;
+ mWriteBackFutureWeeks = 12;
mWriteBackFile = true;
mIncludeInRingSync = false;
mIncludeInRingSyncAB = false;
@@ -83,15 +95,23 @@ void KSyncProfile::readConfig(KConfig *config )
QString prefix = "Profile_"+mName+"_";
//mName = config->readEntry( prefix+ "Name", mName );
mPreSyncCommand = config->readEntry( prefix+ "PreSyncCommand",mPreSyncCommand );
- mPostSyncCommand = config->readEntry( prefix+ "PostSyncCommand", mPostSyncCommand );
- mIncludeInRingSync = config->readBoolEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
- mIncludeInRingSyncAB = config->readBoolEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
+ mPostSyncCommand = config->readEntry( prefix+ "PostSyncCommand", mPostSyncCommand );;
mLocalTempFile = config->readEntry( prefix+ "LocalTempFile", mLocalTempFile );
mRemoteFileName = config->readEntry( prefix+ "RemoteFileName", mRemoteFileName );
+
+ mPreSyncCommandAB = config->readEntry( prefix+ "PreSyncCommandAB",mPreSyncCommandAB );
+ mPostSyncCommandAB = config->readEntry( prefix+ "PostSyncCommandAB", mPostSyncCommandAB );
+ mLocalTempFileAB = config->readEntry( prefix+ "LocalTempFileAB", mLocalTempFileAB );
+ mRemoteFileNameAB = config->readEntry( prefix+ "RemoteFileNameAB", mRemoteFileNameAB );
+
+ mIncludeInRingSync = config->readBoolEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
+ mIncludeInRingSyncAB = config->readBoolEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
mShowSummaryAfterSync = config->readBoolEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync );
mAskForPreferences = config->readBoolEntry( prefix+ "AskForPreferences",mAskForPreferences );
mWriteBackExisting = config->readBoolEntry( prefix+ "WriteBackExisting",mWriteBackExisting );
+ mWriteBackFuture = config->readBoolEntry( prefix+ "WriteBackFuture",mWriteBackFuture );
mSyncPrefs = config->readNumEntry( prefix+ "SyncPrefs", mSyncPrefs );
+ mWriteBackFutureWeeks = config->readNumEntry( prefix+ "WriteBackFutureWeeks", mWriteBackFutureWeeks );
mIsLocalFileSync= config->readBoolEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync );
}
void KSyncProfile::writeConfig( KConfig * config )
@@ -101,14 +121,21 @@ void KSyncProfile::writeConfig( KConfig * config )
// config->writeEntry( prefix+ "Name", mName );
config->writeEntry( prefix+ "PreSyncCommand",mPreSyncCommand );
config->writeEntry( prefix+ "PostSyncCommand", mPostSyncCommand );
- config->writeEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
- config->writeEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
config->writeEntry( prefix+ "LocalTempFile", mLocalTempFile );
config->writeEntry( prefix+ "RemoteFileName", mRemoteFileName );
+
+ config->writeEntry( prefix+ "PreSyncCommandAB",mPreSyncCommandAB );
+ config->writeEntry( prefix+ "PostSyncCommandAB", mPostSyncCommandAB );
+ config->writeEntry( prefix+ "LocalTempFileAB", mLocalTempFileAB );
+ config->writeEntry( prefix+ "RemoteFileNameAB", mRemoteFileNameAB );
+ config->writeEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
+ config->writeEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
config->writeEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync );
config->writeEntry( prefix+ "AskForPreferences",mAskForPreferences );
config->writeEntry( prefix+ "WriteBackExisting",mWriteBackExisting );
+ config->writeEntry( prefix+ "WriteBackFuture",mWriteBackFuture );
config->writeEntry( prefix+ "SyncPrefs", mSyncPrefs );
+ config->writeEntry( prefix+ "WriteBackFutureWeeks", mWriteBackFutureWeeks);
config->writeEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync );
}