-rw-r--r-- | libkdepim/ksyncprofile.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index 9f404cb..0d72fc9 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp | |||
@@ -72,24 +72,28 @@ KSyncProfile* KSyncProfile::clone() | |||
72 | myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); | 72 | myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); |
73 | myClone->setWriteBackPastWeeks( mWriteBackPastWeeks ); | 73 | myClone->setWriteBackPastWeeks( mWriteBackPastWeeks ); |
74 | myClone->setIncludeInRingSync( mIncludeInRingSync ); | 74 | myClone->setIncludeInRingSync( mIncludeInRingSync ); |
75 | myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); | 75 | myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); |
76 | myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM ); | 76 | myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM ); |
77 | myClone->setSyncPrefs( mSyncPrefs); | 77 | myClone->setSyncPrefs( mSyncPrefs); |
78 | myClone->setIsLocalFileSync( mIsLocalFileSync ); | 78 | myClone->setIsLocalFileSync( mIsLocalFileSync ); |
79 | myClone->setIsPhoneSync( mIsPhoneSync ); | 79 | myClone->setIsPhoneSync( mIsPhoneSync ); |
80 | myClone->setIsKapiFile( mIsKapiFile ); | 80 | myClone->setIsKapiFile( mIsKapiFile ); |
81 | myClone->setIsPiSync( mIsPiSync ); | 81 | myClone->setIsPiSync( mIsPiSync ); |
82 | myClone->setWriteContactToSIM( mWriteContactToSIM ); | 82 | myClone->setWriteContactToSIM( mWriteContactToSIM ); |
83 | myClone->setName( "noName" ); | 83 | myClone->setName( "noName" ); |
84 | myClone->setFilterInCal ( mFilterInCal ); | ||
85 | myClone->setFilterOutCal ( mFilterOutCal ); | ||
86 | myClone->setFilterInAB ( mFilterInAB ); | ||
87 | myClone->setFilterOutAB ( mFilterOutAB ); | ||
84 | //myClone->setIdentifier( "noID" ); | 88 | //myClone->setIdentifier( "noID" ); |
85 | return myClone; | 89 | return myClone; |
86 | } | 90 | } |
87 | 91 | ||
88 | 92 | ||
89 | void KSyncProfile::setDefault() | 93 | void KSyncProfile::setDefault() |
90 | { | 94 | { |
91 | mPreSyncCommand = i18n("command for downloading remote file to local device"); | 95 | mPreSyncCommand = i18n("command for downloading remote file to local device"); |
92 | mPostSyncCommand = i18n("command for uploading local temp file to remote device"); | 96 | mPostSyncCommand = i18n("command for uploading local temp file to remote device"); |
93 | mLocalTempFile = "/tmp/mycalendar.ics"; | 97 | mLocalTempFile = "/tmp/mycalendar.ics"; |
94 | mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; | 98 | mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; |
95 | mPreSyncCommandAB = i18n("command for downloading remote file to local device"); | 99 | mPreSyncCommandAB = i18n("command for downloading remote file to local device"); |
@@ -124,24 +128,28 @@ void KSyncProfile::setDefault() | |||
124 | mIncludeInRingSyncAB = false; | 128 | mIncludeInRingSyncAB = false; |
125 | mIncludeInRingSyncPWM = false; | 129 | mIncludeInRingSyncPWM = false; |
126 | mSyncPrefs = SYNC_PREF_ASK; | 130 | mSyncPrefs = SYNC_PREF_ASK; |
127 | mIsLocalFileSync = true; | 131 | mIsLocalFileSync = true; |
128 | mName = "noName"; | 132 | mName = "noName"; |
129 | mIsPhoneSync = false; | 133 | mIsPhoneSync = false; |
130 | mIsPiSync = false; | 134 | mIsPiSync = false; |
131 | mIsKapiFile = false; | 135 | mIsKapiFile = false; |
132 | mWriteContactToSIM = false; | 136 | mWriteContactToSIM = false; |
133 | mPhoneDevice = "/dev/ircomm"; | 137 | mPhoneDevice = "/dev/ircomm"; |
134 | mPhoneConnection = "irda"; | 138 | mPhoneConnection = "irda"; |
135 | mPhoneModel = "6310i"; | 139 | mPhoneModel = "6310i"; |
140 | mFilterInCal = "no filter"; | ||
141 | mFilterOutCal = "no filter"; | ||
142 | mFilterInAB = "no filter"; | ||
143 | mFilterOutAB = "no filter"; | ||
136 | } | 144 | } |
137 | void KSyncProfile::readConfig(KConfig *config ) | 145 | void KSyncProfile::readConfig(KConfig *config ) |
138 | { | 146 | { |
139 | if (config) | 147 | if (config) |
140 | { | 148 | { |
141 | 149 | ||
142 | config->setGroup( mName ); | 150 | config->setGroup( mName ); |
143 | 151 | ||
144 | mName = config->readEntry( "Name", mName ); | 152 | mName = config->readEntry( "Name", mName ); |
145 | 153 | ||
146 | mRemotePw = config->readEntry( "RemotePw",mRemotePw ); | 154 | mRemotePw = config->readEntry( "RemotePw",mRemotePw ); |
147 | mRemoteIP = config->readEntry( "RemoteIP",mRemoteIP ); | 155 | mRemoteIP = config->readEntry( "RemoteIP",mRemoteIP ); |
@@ -179,24 +187,30 @@ void KSyncProfile::readConfig(KConfig *config ) | |||
179 | mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences ); | 187 | mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences ); |
180 | mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting ); | 188 | mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting ); |
181 | mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); | 189 | mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); |
182 | mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile ); | 190 | mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile ); |
183 | mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM ); | 191 | mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM ); |
184 | mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs ); | 192 | mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs ); |
185 | mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks ); | 193 | mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks ); |
186 | mWriteBackPastWeeks = config->readNumEntry( "WriteBackPastWeeks", mWriteBackPastWeeks ); | 194 | mWriteBackPastWeeks = config->readNumEntry( "WriteBackPastWeeks", mWriteBackPastWeeks ); |
187 | mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync ); | 195 | mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync ); |
188 | mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync ); | 196 | mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync ); |
189 | mIsPiSync= config->readBoolEntry( "IsPiSync", mIsPiSync ); | 197 | mIsPiSync= config->readBoolEntry( "IsPiSync", mIsPiSync ); |
190 | mIsKapiFile = config->readBoolEntry( "IsKapiFile", mIsKapiFile ); | 198 | mIsKapiFile = config->readBoolEntry( "IsKapiFile", mIsKapiFile ); |
199 | |||
200 | mFilterInCal = config->readEntry( "FilterInCal", mFilterInCal ); | ||
201 | mFilterOutCal = config->readEntry( "FilterOutCal", mFilterOutCal ); | ||
202 | mFilterInAB = config->readEntry( "FilterInAB", mFilterInAB ); | ||
203 | mFilterOutAB = config->readEntry( "FilterOutAB", mFilterOutAB ); | ||
204 | |||
191 | } | 205 | } |
192 | else | 206 | else |
193 | { | 207 | { |
194 | setDefault(); | 208 | setDefault(); |
195 | } | 209 | } |
196 | } | 210 | } |
197 | 211 | ||
198 | void KSyncProfile::deleteConfig(KConfig *config ) | 212 | void KSyncProfile::deleteConfig(KConfig *config ) |
199 | { | 213 | { |
200 | config->deleteGroup( mName ); | 214 | config->deleteGroup( mName ); |
201 | } | 215 | } |
202 | 216 | ||
@@ -243,14 +257,19 @@ void KSyncProfile::writeConfig( KConfig * config ) | |||
243 | config->writeEntry( "AskForPreferences",mAskForPreferences ); | 257 | config->writeEntry( "AskForPreferences",mAskForPreferences ); |
244 | config->writeEntry( "WriteBackExisting",mWriteBackExisting ); | 258 | config->writeEntry( "WriteBackExisting",mWriteBackExisting ); |
245 | config->writeEntry( "WriteBackFuture",mWriteBackFuture ); | 259 | config->writeEntry( "WriteBackFuture",mWriteBackFuture ); |
246 | config->writeEntry( "WriteBackFile",mWriteBackFile ); | 260 | config->writeEntry( "WriteBackFile",mWriteBackFile ); |
247 | config->writeEntry( "WriteContactToSIM",mWriteContactToSIM ); | 261 | config->writeEntry( "WriteContactToSIM",mWriteContactToSIM ); |
248 | config->writeEntry( "SyncPrefs", mSyncPrefs ); | 262 | config->writeEntry( "SyncPrefs", mSyncPrefs ); |
249 | config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks); | 263 | config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks); |
250 | config->writeEntry( "WriteBackPastWeeks", mWriteBackPastWeeks); | 264 | config->writeEntry( "WriteBackPastWeeks", mWriteBackPastWeeks); |
251 | config->writeEntry( "IsLocalFileSync", mIsLocalFileSync ); | 265 | config->writeEntry( "IsLocalFileSync", mIsLocalFileSync ); |
252 | config->writeEntry( "IsPhoneSync", mIsPhoneSync ); | 266 | config->writeEntry( "IsPhoneSync", mIsPhoneSync ); |
253 | config->writeEntry( "IsPiSync", mIsPiSync ); | 267 | config->writeEntry( "IsPiSync", mIsPiSync ); |
254 | config->writeEntry( "IsKapiFile", mIsKapiFile ); | 268 | config->writeEntry( "IsKapiFile", mIsKapiFile ); |
269 | config->writeEntry( "FilterInCal", mFilterInCal ); | ||
270 | config->writeEntry( "FilterOutCal", mFilterOutCal ); | ||
271 | config->writeEntry( "FilterInAB", mFilterInAB ); | ||
272 | config->writeEntry( "FilterOutAB", mFilterOutAB ); | ||
273 | |||
255 | } | 274 | } |
256 | 275 | ||