summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncprofile.cpp
Unidiff
Diffstat (limited to 'libkdepim/ksyncprofile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprofile.cpp19
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
@@ -68,32 +68,36 @@ KSyncProfile* KSyncProfile::clone()
68 myClone->setAskForPreferences( mAskForPreferences); 68 myClone->setAskForPreferences( mAskForPreferences);
69 myClone->setWriteBackExisting(mWriteBackExisting ); 69 myClone->setWriteBackExisting(mWriteBackExisting );
70 myClone->setWriteBackFile( mWriteBackFile); 70 myClone->setWriteBackFile( mWriteBackFile);
71 myClone->setWriteBackFuture( mWriteBackFuture ); 71 myClone->setWriteBackFuture( mWriteBackFuture );
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
89void KSyncProfile::setDefault() 93void 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");
96 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device"); 100 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device");
97 mLocalTempFileAB = "/tmp/std.vcf"; 101 mLocalTempFileAB = "/tmp/std.vcf";
98 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf"; 102 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf";
99 mPreSyncCommandPWM = i18n("command for downloading remote file to local device"); 103 mPreSyncCommandPWM = i18n("command for downloading remote file to local device");
@@ -120,32 +124,36 @@ void KSyncProfile::setDefault()
120 mWriteBackFutureWeeks = 12; 124 mWriteBackFutureWeeks = 12;
121 mWriteBackPastWeeks = 2; 125 mWriteBackPastWeeks = 2;
122 mWriteBackFile = true; 126 mWriteBackFile = true;
123 mIncludeInRingSync = false; 127 mIncludeInRingSync = false;
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}
137void KSyncProfile::readConfig(KConfig *config ) 145void 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 );
148 mRemotePort = config->readEntry( "RemotePort", mRemotePort ); 156 mRemotePort = config->readEntry( "RemotePort", mRemotePort );
149 mRemotePwAB = config->readEntry( "RemotePwAB", mRemotePwAB ); 157 mRemotePwAB = config->readEntry( "RemotePwAB", mRemotePwAB );
150 mRemoteIPAB = config->readEntry( "RemoteIPAB", mRemoteIPAB ); 158 mRemoteIPAB = config->readEntry( "RemoteIPAB", mRemoteIPAB );
151 mRemotePortAB = config->readEntry( "RemotePortAB", mRemotePortAB ); 159 mRemotePortAB = config->readEntry( "RemotePortAB", mRemotePortAB );
@@ -175,32 +183,38 @@ void KSyncProfile::readConfig(KConfig *config )
175 mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync ); 183 mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync );
176 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); 184 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
177 mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); 185 mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
178 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); 186 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
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
198void KSyncProfile::deleteConfig(KConfig *config ) 212void KSyncProfile::deleteConfig(KConfig *config )
199{ 213{
200 config->deleteGroup( mName ); 214 config->deleteGroup( mName );
201} 215}
202 216
203void KSyncProfile::writeConfig( KConfig * config ) 217void KSyncProfile::writeConfig( KConfig * config )
204{ 218{
205 config->setGroup(mName); 219 config->setGroup(mName);
206 220
@@ -239,18 +253,23 @@ void KSyncProfile::writeConfig( KConfig * config )
239 config->writeEntry( "IncludeInRingSync",mIncludeInRingSync ); 253 config->writeEntry( "IncludeInRingSync",mIncludeInRingSync );
240 config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); 254 config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
241 config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); 255 config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
242 config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); 256 config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
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