author | zautrix <zautrix> | 2004-08-01 16:27:04 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-01 16:27:04 (UTC) |
commit | f968c6f5541463caadee98e200c2ba035fa20959 (patch) (unidiff) | |
tree | e71549b7ba1312a55f0311ed74754943d22af22a /libkdepim/ksyncprofile.cpp | |
parent | 3a4186926d078692ad3c2261b70406c391f27554 (diff) | |
download | kdepimpi-f968c6f5541463caadee98e200c2ba035fa20959.zip kdepimpi-f968c6f5541463caadee98e200c2ba035fa20959.tar.gz kdepimpi-f968c6f5541463caadee98e200c2ba035fa20959.tar.bz2 |
Extended the sync config dialog
-rw-r--r-- | libkdepim/ksyncprofile.cpp | 37 |
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() | |||
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 | } |
97 | void KSyncProfile::writeConfig( KConfig * config ) | 117 | void 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 | ||