-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 45 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.h | 5 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.cpp | 19 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.h | 14 |
4 files changed, 80 insertions, 3 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 8a3f4cf..6e42fd4 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp | |||
@@ -114,139 +114,158 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
114 | //topLayout->addMultiCellWidget(lab , iii,iii,0,1); | 114 | //topLayout->addMultiCellWidget(lab , iii,iii,0,1); |
115 | //++iii; | 115 | //++iii; |
116 | 116 | ||
117 | mMyMachineName = new QLineEdit(topFrame); | 117 | mMyMachineName = new QLineEdit(topFrame); |
118 | lab = new QLabel(mMyMachineName, i18n("Local device name:"), topFrame); | 118 | lab = new QLabel(mMyMachineName, i18n("Local device name:"), topFrame); |
119 | topLayout->addWidget(lab ,iii,0); | 119 | topLayout->addWidget(lab ,iii,0); |
120 | topLayout->addWidget(mMyMachineName,iii,1); | 120 | topLayout->addWidget(mMyMachineName,iii,1); |
121 | ++iii; | 121 | ++iii; |
122 | 122 | ||
123 | QHBox* buttonbox = new QHBox( topFrame); | 123 | QHBox* buttonbox = new QHBox( topFrame); |
124 | topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1); | 124 | topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1); |
125 | ++iii; | 125 | ++iii; |
126 | button = new QPushButton( i18n("New profile"), buttonbox ); | 126 | button = new QPushButton( i18n("New profile"), buttonbox ); |
127 | connect ( button, SIGNAL( clicked()), this, SLOT (newProfile() ) ); | 127 | connect ( button, SIGNAL( clicked()), this, SLOT (newProfile() ) ); |
128 | 128 | ||
129 | button = new QPushButton( i18n("Clone profile"), buttonbox ); | 129 | button = new QPushButton( i18n("Clone profile"), buttonbox ); |
130 | connect ( button, SIGNAL( clicked()), this, SLOT ( cloneProfile() ) ); | 130 | connect ( button, SIGNAL( clicked()), this, SLOT ( cloneProfile() ) ); |
131 | 131 | ||
132 | button = new QPushButton( i18n("Delete profile"), buttonbox ); | 132 | button = new QPushButton( i18n("Delete profile"), buttonbox ); |
133 | connect ( button, SIGNAL( clicked()), this, SLOT (deleteProfile() ) ); | 133 | connect ( button, SIGNAL( clicked()), this, SLOT (deleteProfile() ) ); |
134 | 134 | ||
135 | mProfileBox = new QComboBox(topFrame); | 135 | mProfileBox = new QComboBox(topFrame); |
136 | mProfileBox->setEditable ( true ); | 136 | mProfileBox->setEditable ( true ); |
137 | mProfileBox->setInsertionPolicy(QComboBox::NoInsertion); | 137 | mProfileBox->setInsertionPolicy(QComboBox::NoInsertion); |
138 | connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) ); | 138 | connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) ); |
139 | connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) ); | 139 | connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) ); |
140 | 140 | ||
141 | lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); | 141 | lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); |
142 | topLayout->addWidget(lab ,iii,0); | 142 | topLayout->addWidget(lab ,iii,0); |
143 | topLayout->addWidget(mProfileBox, iii,1); | 143 | topLayout->addWidget(mProfileBox, iii,1); |
144 | ++iii; | 144 | ++iii; |
145 | 145 | ||
146 | 146 | ||
147 | 147 | ||
148 | QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame); | 148 | QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame); |
149 | new QLabel( i18n("Include in multiple "), iims ); | 149 | new QLabel( i18n("Include in multiple "), iims ); |
150 | mIncludeInRing = new QCheckBox( i18n("calendar "), iims ); | 150 | mIncludeInRing = new QCheckBox( i18n("calendar "), iims ); |
151 | mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims ); | 151 | mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims ); |
152 | mIncludeInRingPWM = new QCheckBox( i18n("pwmanager"), iims ); | 152 | mIncludeInRingPWM = new QCheckBox( i18n("pwmanager"), iims ); |
153 | new QLabel( i18n(" sync"), iims ); | 153 | new QLabel( i18n(" sync"), iims ); |
154 | topLayout->addMultiCellWidget(iims, iii,iii,0,1); | 154 | topLayout->addMultiCellWidget(iims, iii,iii,0,1); |
155 | ++iii; | 155 | ++iii; |
156 | QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame); | 156 | QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame); |
157 | topLayout->addMultiCellWidget(gb0, iii,iii,0,1); | 157 | topLayout->addMultiCellWidget(gb0, iii,iii,0,1); |
158 | ++iii; | 158 | ++iii; |
159 | QButtonGroup* gr; | 159 | QButtonGroup* gr; |
160 | { | 160 | { |
161 | QVGroupBox* topFrame = gb0; | 161 | QVGroupBox* topFrame = gb0; |
162 | |||
163 | |||
164 | |||
162 | mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); | 165 | mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); |
163 | //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); | 166 | //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); |
164 | //++iii; | 167 | //++iii; |
165 | gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); | 168 | gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); |
166 | //topLayout->addMultiCellWidget(gr, iii,iii,0,1); | 169 | //topLayout->addMultiCellWidget(gr, iii,iii,0,1); |
167 | //++iii; | 170 | //++iii; |
168 | loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); | 171 | loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); |
169 | rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr ); | 172 | rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr ); |
170 | newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr ); | 173 | newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr ); |
171 | ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr ); | 174 | ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr ); |
172 | f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr ); | 175 | f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr ); |
173 | f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr ); | 176 | f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr ); |
174 | // both = new QRadioButton ( i18n("Take both on conflict"), gr ); | 177 | // both = new QRadioButton ( i18n("Take both on conflict"), gr ); |
175 | 178 | ||
176 | mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame ); | 179 | mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame ); |
177 | //topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1); | 180 | //topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1); |
178 | //++iii; | 181 | //++iii; |
179 | 182 | ||
183 | QHGroupBox* gb5 = new QHGroupBox( i18n("Apply filter when adding data to local:"), topFrame); | ||
184 | QVBox * fibo2 = new QVBox ( gb5 ); | ||
185 | new QLabel ( i18n("Incoming calendar filter:"), fibo2 ); | ||
186 | mFilterInCal = new QComboBox( fibo2 ); | ||
187 | fibo2 = new QVBox ( gb5 ); | ||
188 | new QLabel ( i18n("Incoming adressbook filter:"), fibo2 ); | ||
189 | mFilterInAB = new QComboBox( fibo2 ); | ||
190 | |||
180 | mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame ); | 191 | mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame ); |
181 | // topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); | 192 | // topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); |
182 | // ++iii; | 193 | // ++iii; |
183 | 194 | ||
184 | QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame); | 195 | QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame); |
185 | //topLayout->addMultiCellWidget(gb2, iii,iii,0,1); | 196 | //topLayout->addMultiCellWidget(gb2, iii,iii,0,1); |
186 | //++iii; | 197 | //++iii; |
187 | { | 198 | { |
188 | QVGroupBox*topFrame = gb2; | 199 | QVGroupBox*topFrame = gb2; |
189 | mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame ); | 200 | mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame ); |
201 | QHGroupBox* gb4 = new QHGroupBox( i18n("Apply filter when adding data to remote:"), topFrame); | ||
202 | QVBox * fibo = new QVBox ( gb4 ); | ||
203 | new QLabel ( i18n("Outgoing calendar filter:"), fibo ); | ||
204 | mFilterOutCal = new QComboBox( fibo ); | ||
205 | fibo = new QVBox ( gb4 ); | ||
206 | new QLabel ( i18n("Outgoing addressbook filter:"), fibo ); | ||
207 | mFilterOutAB = new QComboBox( fibo ); | ||
190 | //topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); | 208 | //topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); |
191 | //++iii; | 209 | //++iii; |
192 | mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame ); | 210 | mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame ); |
193 | //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); | 211 | //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); |
194 | //++iii; | 212 | //++iii; |
195 | QHGroupBox* gb3 = new QHGroupBox( i18n("Time period"), topFrame); | 213 | QHGroupBox* gb3 = new QHGroupBox( i18n("Time period"), topFrame); |
196 | connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) ); | 214 | connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) ); |
197 | new QLabel( i18n("From ") , gb3 ); | 215 | new QLabel( i18n("From ") , gb3 ); |
198 | mWriteBackPastWeeks= new QSpinBox(1,104, 1, gb3); | 216 | mWriteBackPastWeeks= new QSpinBox(1,104, 1, gb3); |
199 | new QLabel( i18n(" weeks in the past to ") , gb3 ); | 217 | new QLabel( i18n(" weeks in the past to ") , gb3 ); |
200 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, gb3); | 218 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, gb3); |
201 | new QLabel( i18n(" weeks in the future ") , gb3 ); | 219 | new QLabel( i18n(" weeks in the future ") , gb3 ); |
202 | //topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); | 220 | //topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); |
203 | //++iii; | 221 | //++iii; |
204 | gb3->setEnabled( false ); | 222 | gb3->setEnabled( false ); |
223 | connect ( mWriteBackExisting, SIGNAL( toggled ( bool ) ), gb4, SLOT ( setDisabled ( bool ) ) ); | ||
205 | } | 224 | } |
206 | connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) ); | 225 | connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) ); |
207 | 226 | ||
208 | } | 227 | } |
209 | proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); | 228 | proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); |
210 | gr = proGr; | 229 | gr = proGr; |
211 | topLayout->addMultiCellWidget(gr, iii,iii,0,1); | 230 | topLayout->addMultiCellWidget(gr, iii,iii,0,1); |
212 | ++iii; | 231 | ++iii; |
213 | mIsLocal = new QRadioButton ( i18n("Local file"), gr ); | 232 | mIsLocal = new QRadioButton ( i18n("Local file"), gr ); |
214 | mIsPi = new QRadioButton ( i18n("Pi-Sync ( direct Kx/Pi to Kx/Pi sync )"), gr ); | 233 | mIsPi = new QRadioButton ( i18n("Pi-Sync ( direct Kx/Pi to Kx/Pi sync )"), gr ); |
215 | connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); | 234 | connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); |
216 | mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); | 235 | mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); |
217 | connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); | 236 | connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); |
218 | mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); | 237 | mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); |
219 | connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); | 238 | connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); |
220 | 239 | ||
221 | QVGroupBox* gb1 = new QVGroupBox( i18n("Profile kind specific settings"), topFrame); | 240 | QVGroupBox* gb1 = new QVGroupBox( i18n("Profile kind specific settings"), topFrame); |
222 | topLayout->addMultiCellWidget(gb1, iii,iii,0,1); | 241 | topLayout->addMultiCellWidget(gb1, iii,iii,0,1); |
223 | ++iii; | 242 | ++iii; |
224 | 243 | ||
225 | // ****************************************** | 244 | // ****************************************** |
226 | // Profile kind specific settings | 245 | // Profile kind specific settings |
227 | { | 246 | { |
228 | // *** phone ******************************* | 247 | // *** phone ******************************* |
229 | QVGroupBox* topFrame = gb1; | 248 | QVGroupBox* topFrame = gb1; |
230 | phoneWidget = new QVBox( topFrame); | 249 | phoneWidget = new QVBox( topFrame); |
231 | //topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); | 250 | //topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); |
232 | //++iii; | 251 | //++iii; |
233 | mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); | 252 | mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); |
234 | QHBox* temphb = new QHBox( phoneWidget ); | 253 | QHBox* temphb = new QHBox( phoneWidget ); |
235 | new QLabel( i18n("I/O device: "), temphb ); | 254 | new QLabel( i18n("I/O device: "), temphb ); |
236 | mPhoneDevice = new QLineEdit( temphb); | 255 | mPhoneDevice = new QLineEdit( temphb); |
237 | button = new QPushButton( i18n("Help..."), temphb ); | 256 | button = new QPushButton( i18n("Help..."), temphb ); |
238 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); | 257 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); |
239 | 258 | ||
240 | 259 | ||
241 | temphb = new QHBox( phoneWidget ); | 260 | temphb = new QHBox( phoneWidget ); |
242 | new QLabel( i18n("Connection: "), temphb ); | 261 | new QLabel( i18n("Connection: "), temphb ); |
243 | mPhoneConnection = new QLineEdit( temphb); | 262 | mPhoneConnection = new QLineEdit( temphb); |
244 | button = new QPushButton( i18n("Help..."), temphb ); | 263 | button = new QPushButton( i18n("Help..."), temphb ); |
245 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); | 264 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); |
246 | 265 | ||
247 | 266 | ||
248 | temphb = new QHBox( phoneWidget ); | 267 | temphb = new QHBox( phoneWidget ); |
249 | new QLabel( i18n("Model(opt.): "), temphb ); | 268 | new QLabel( i18n("Model(opt.): "), temphb ); |
250 | mPhoneModel = new QLineEdit( temphb); | 269 | mPhoneModel = new QLineEdit( temphb); |
251 | button = new QPushButton( i18n("Help..."), temphb ); | 270 | button = new QPushButton( i18n("Help..."), temphb ); |
252 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); | 271 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); |
@@ -309,218 +328,236 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
309 | button = new QPushButton( i18n("ftp"), temphb ); | 328 | button = new QPushButton( i18n("ftp"), temphb ); |
310 | connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); | 329 | connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); |
311 | lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); | 330 | lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); |
312 | 331 | ||
313 | // *** pi-sync******************************* | 332 | // *** pi-sync******************************* |
314 | piWidget = new QVBox( topFrame); | 333 | piWidget = new QVBox( topFrame); |
315 | //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); | 334 | //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); |
316 | //++iii; | 335 | //++iii; |
317 | temphb = new QHBox( piWidget ); | 336 | temphb = new QHBox( piWidget ); |
318 | new QLabel( i18n("Calendar:"), temphb); | 337 | new QLabel( i18n("Calendar:"), temphb); |
319 | new QLabel( i18n("AddressBook:"), temphb); | 338 | new QLabel( i18n("AddressBook:"), temphb); |
320 | new QLabel( i18n("PWManager:"), temphb); | 339 | new QLabel( i18n("PWManager:"), temphb); |
321 | 340 | ||
322 | lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); | 341 | lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); |
323 | temphb = new QHBox( piWidget ); | 342 | temphb = new QHBox( piWidget ); |
324 | mRemotePw = new QLineEdit(temphb); | 343 | mRemotePw = new QLineEdit(temphb); |
325 | mRemotePwAB = new QLineEdit(temphb); | 344 | mRemotePwAB = new QLineEdit(temphb); |
326 | mRemotePwPWM = new QLineEdit(temphb); | 345 | mRemotePwPWM = new QLineEdit(temphb); |
327 | 346 | ||
328 | lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); | 347 | lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); |
329 | temphb = new QHBox( piWidget ); | 348 | temphb = new QHBox( piWidget ); |
330 | mRemoteIP = new QLineEdit(temphb); | 349 | mRemoteIP = new QLineEdit(temphb); |
331 | mRemoteIPAB = new QLineEdit(temphb); | 350 | mRemoteIPAB = new QLineEdit(temphb); |
332 | mRemoteIPPWM = new QLineEdit(temphb); | 351 | mRemoteIPPWM = new QLineEdit(temphb); |
333 | 352 | ||
334 | lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); | 353 | lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); |
335 | temphb = new QHBox( piWidget ); | 354 | temphb = new QHBox( piWidget ); |
336 | mRemotePort = new QLineEdit(temphb); | 355 | mRemotePort = new QLineEdit(temphb); |
337 | mRemotePortAB = new QLineEdit(temphb); | 356 | mRemotePortAB = new QLineEdit(temphb); |
338 | mRemotePortPWM = new QLineEdit(temphb); | 357 | mRemotePortPWM = new QLineEdit(temphb); |
339 | } | 358 | } |
340 | // ****************************************** | 359 | // ****************************************** |
341 | // Profile kind specific settings END | 360 | // Profile kind specific settings END |
342 | 361 | ||
343 | } | 362 | } |
344 | 363 | ||
345 | 364 | ||
346 | 365 | ||
347 | void KSyncPrefsDialog::readFilter() | 366 | void KSyncPrefsDialog::readFilter() |
348 | { | 367 | { |
349 | mFilterKapi.clear(); | 368 | mFilterKapi.clear(); |
350 | mFilterKopi.clear(); | 369 | mFilterKopi.clear(); |
351 | mFilterKopi.append(i18n("No Filter") ); | 370 | mFilterKopi.append(i18n("No Filter") ); |
352 | mFilterKapi.append(i18n("No Filter") ); | 371 | mFilterKapi.append(i18n("No Filter") ); |
353 | KConfig cfgko(locateLocal("config","korganizerrc")); | 372 | KConfig cfgko(locateLocal("config","korganizerrc")); |
354 | KConfig cfgka(locateLocal("config","kaddressbookrc")); | 373 | KConfig cfgka(locateLocal("config","kaddressbookrc")); |
355 | cfgko.setGroup("General"); | 374 | cfgko.setGroup("General"); |
356 | mFilterKopi = cfgko.readListEntry("CalendarFilters"); | 375 | mFilterKopi = cfgko.readListEntry("CalendarFilters"); |
357 | mFilterKopi.prepend(i18n("No Filter") ); | 376 | mFilterKapi = mFilterKopi; |
377 | mFilterOutCal->clear(); | ||
378 | mFilterInCal->clear(); | ||
379 | mFilterOutAB->clear(); | ||
380 | mFilterInAB->clear(); | ||
381 | QStringList temp = mFilterKopi; | ||
382 | temp.prepend(i18n("No Filter") ); | ||
383 | mFilterOutCal->insertStringList( temp ); | ||
384 | mFilterInCal->insertStringList( temp ); | ||
385 | temp = mFilterKapi; | ||
386 | temp.prepend(i18n("No Filter") ); | ||
387 | mFilterOutAB->insertStringList( temp ); | ||
388 | mFilterInAB->insertStringList( temp ); | ||
358 | } | 389 | } |
359 | 390 | ||
360 | 391 | ||
361 | void KSyncPrefsDialog::slotOK() | 392 | void KSyncPrefsDialog::slotOK() |
362 | { | 393 | { |
363 | if ( mMyMachineName->text() == "undefined" ) { | 394 | if ( mMyMachineName->text() == "undefined" ) { |
364 | KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error")); | 395 | KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error")); |
365 | return; | 396 | return; |
366 | } | 397 | } |
367 | int i; | 398 | int i; |
368 | for (i = 0; i < mSyncProfileNames.count(); ++ i) { | 399 | for (i = 0; i < mSyncProfileNames.count(); ++ i) { |
369 | if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { | 400 | if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { |
370 | KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); | 401 | KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); |
371 | return; | 402 | return; |
372 | } | 403 | } |
373 | } | 404 | } |
374 | usrWriteConfig(); | 405 | usrWriteConfig(); |
375 | QDialog::accept(); | 406 | QDialog::accept(); |
376 | } | 407 | } |
377 | void KSyncPrefsDialog::accept() | 408 | void KSyncPrefsDialog::accept() |
378 | { | 409 | { |
379 | slotOK(); | 410 | slotOK(); |
380 | } | 411 | } |
381 | void KSyncPrefsDialog::chooseFile() | 412 | void KSyncPrefsDialog::chooseFile() |
382 | { | 413 | { |
383 | QString fn = QDir::homeDirPath(); | 414 | QString fn = QDir::homeDirPath(); |
384 | 415 | ||
385 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this ); | 416 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this ); |
386 | if ( fn == "" ) | 417 | if ( fn == "" ) |
387 | return; | 418 | return; |
388 | mRemoteFile->setText( fn ); | 419 | mRemoteFile->setText( fn ); |
389 | } | 420 | } |
390 | 421 | ||
391 | void KSyncPrefsDialog::chooseFileAB() | 422 | void KSyncPrefsDialog::chooseFileAB() |
392 | { | 423 | { |
393 | QString fn = QDir::homeDirPath(); | 424 | QString fn = QDir::homeDirPath(); |
394 | 425 | ||
395 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this ); | 426 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this ); |
396 | if ( fn == "" ) | 427 | if ( fn == "" ) |
397 | return; | 428 | return; |
398 | mRemoteFileAB->setText( fn ); | 429 | mRemoteFileAB->setText( fn ); |
399 | } | 430 | } |
400 | 431 | ||
401 | void KSyncPrefsDialog::chooseFilePWM() | 432 | void KSyncPrefsDialog::chooseFilePWM() |
402 | { | 433 | { |
403 | QString fn = QDir::homeDirPath(); | 434 | QString fn = QDir::homeDirPath(); |
404 | 435 | ||
405 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this ); | 436 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this ); |
406 | if ( fn == "" ) | 437 | if ( fn == "" ) |
407 | return; | 438 | return; |
408 | mRemoteFilePWM->setText( fn ); | 439 | mRemoteFilePWM->setText( fn ); |
409 | } | 440 | } |
410 | 441 | ||
411 | void KSyncPrefsDialog::textChanged( const QString & s ) | 442 | void KSyncPrefsDialog::textChanged( const QString & s ) |
412 | { | 443 | { |
413 | if ( mProfileBox->count() == 0 ) | 444 | if ( mProfileBox->count() == 0 ) |
414 | return; | 445 | return; |
415 | if ( currentSelection < 3 ) { | 446 | if ( currentSelection < 3 ) { |
416 | //KMessageBox::error(this,i18n("This profil name\ncannot be edited!\n"),i18n("KO/Pi config error")); | 447 | //KMessageBox::error(this,i18n("This profil name\ncannot be edited!\n"),i18n("KO/Pi config error")); |
417 | mProfileBox->blockSignals( true ); | 448 | mProfileBox->blockSignals( true ); |
418 | mProfileBox->setCurrentItem(mProfileBox-> currentItem ()); | 449 | mProfileBox->setCurrentItem(mProfileBox-> currentItem ()); |
419 | mProfileBox->blockSignals( false ); | 450 | mProfileBox->blockSignals( false ); |
420 | return; | 451 | return; |
421 | } | 452 | } |
422 | //qDebug("cur i %d ",mProfileBox-> currentItem () ); | 453 | //qDebug("cur i %d ",mProfileBox-> currentItem () ); |
423 | mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ; | 454 | mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ; |
424 | KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ; | 455 | KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ; |
425 | prof->setName( s ); | 456 | prof->setName( s ); |
426 | mSyncProfileNames[mProfileBox-> currentItem ()] = s; | 457 | mSyncProfileNames[mProfileBox-> currentItem ()] = s; |
427 | } | 458 | } |
428 | void KSyncPrefsDialog::profileChanged( int item ) | 459 | void KSyncPrefsDialog::profileChanged( int item ) |
429 | { | 460 | { |
430 | //qDebug("KSyncPrefsDialog::profileChanged before %d, count %d ", item, mProfileBox->count() ); | 461 | //qDebug("KSyncPrefsDialog::profileChanged before %d, count %d ", item, mProfileBox->count() ); |
431 | KSyncProfile* prof; | 462 | KSyncProfile* prof; |
432 | saveProfile(); | 463 | saveProfile(); |
464 | readFilter(); | ||
433 | currentSelection = item; | 465 | currentSelection = item; |
434 | prof = mSyncProfiles.at(item) ; | 466 | prof = mSyncProfiles.at(item) ; |
435 | 467 | ||
436 | mRemotePw->setText(prof->getRemotePw()); | 468 | mRemotePw->setText(prof->getRemotePw()); |
437 | mRemoteIP->setText(prof->getRemoteIP()); | 469 | mRemoteIP->setText(prof->getRemoteIP()); |
438 | mRemotePort->setText(prof->getRemotePort()); | 470 | mRemotePort->setText(prof->getRemotePort()); |
439 | 471 | ||
440 | mRemotePwAB->setText(prof->getRemotePwAB()); | 472 | mRemotePwAB->setText(prof->getRemotePwAB()); |
441 | mRemoteIPAB->setText(prof->getRemoteIPAB()); | 473 | mRemoteIPAB->setText(prof->getRemoteIPAB()); |
442 | mRemotePortAB->setText(prof->getRemotePortAB()); | 474 | mRemotePortAB->setText(prof->getRemotePortAB()); |
443 | 475 | ||
444 | mRemotePwPWM->setText(prof->getRemotePwPWM()); | 476 | mRemotePwPWM->setText(prof->getRemotePwPWM()); |
445 | mRemoteIPPWM->setText(prof->getRemoteIPPWM()); | 477 | mRemoteIPPWM->setText(prof->getRemoteIPPWM()); |
446 | mRemotePortPWM->setText(prof->getRemotePortPWM()); | 478 | mRemotePortPWM->setText(prof->getRemotePortPWM()); |
447 | 479 | ||
448 | mRemotePrecommand->setText(prof->getPreSyncCommand()); | 480 | mRemotePrecommand->setText(prof->getPreSyncCommand()); |
449 | mRemotePostcommand->setText(prof->getPostSyncCommand()); | 481 | mRemotePostcommand->setText(prof->getPostSyncCommand()); |
450 | mLocalTempFile->setText(prof->getLocalTempFile()); | 482 | mLocalTempFile->setText(prof->getLocalTempFile()); |
451 | mRemoteFile->setText(prof->getRemoteFileName()) ; | 483 | mRemoteFile->setText(prof->getRemoteFileName()) ; |
452 | 484 | ||
453 | mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); | 485 | mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); |
454 | mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); | 486 | mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); |
455 | mLocalTempFileAB->setText(prof->getLocalTempFileAB()); | 487 | mLocalTempFileAB->setText(prof->getLocalTempFileAB()); |
456 | mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ; | 488 | mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ; |
457 | 489 | ||
458 | mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM()); | 490 | mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM()); |
459 | mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM()); | 491 | mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM()); |
460 | mLocalTempFilePWM->setText(prof->getLocalTempFilePWM()); | 492 | mLocalTempFilePWM->setText(prof->getLocalTempFilePWM()); |
461 | mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ; | 493 | mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ; |
462 | 494 | ||
463 | if ( mWriteContactToSIM ) | 495 | if ( mWriteContactToSIM ) |
464 | mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); | 496 | mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); |
465 | mPhoneDevice->setText(prof->getPhoneDevice()); | 497 | mPhoneDevice->setText(prof->getPhoneDevice()); |
466 | mPhoneConnection->setText(prof->getPhoneConnection()); | 498 | mPhoneConnection->setText(prof->getPhoneConnection()); |
467 | mPhoneModel->setText(prof->getPhoneModel()); | 499 | mPhoneModel->setText(prof->getPhoneModel()); |
468 | 500 | ||
469 | mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); | 501 | mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); |
470 | mAskForPreferences->setChecked( prof->getAskForPreferences()); | 502 | mAskForPreferences->setChecked( prof->getAskForPreferences()); |
471 | mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); | 503 | mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); |
472 | mWriteBackFile->setChecked( prof->getWriteBackFile()); | 504 | mWriteBackFile->setChecked( prof->getWriteBackFile()); |
473 | mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); | 505 | mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); |
474 | mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); | 506 | mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); |
475 | mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() ); | 507 | mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() ); |
476 | mWriteBackFuture->setChecked( prof->getWriteBackFuture()); | 508 | mWriteBackFuture->setChecked( prof->getWriteBackFuture()); |
477 | mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); | 509 | mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); |
478 | mWriteBackPastWeeks->setValue( prof->getWriteBackPastWeeks() ); | 510 | mWriteBackPastWeeks->setValue( prof->getWriteBackPastWeeks() ); |
511 | |||
512 | mFilterInCal->setCurrentItem( mFilterKopi.findIndex(prof->getFilterInCal () ) + 1 ); | ||
513 | mFilterOutCal->setCurrentItem( mFilterKopi.findIndex(prof->getFilterOutCal () ) + 1 ); | ||
514 | mFilterInAB->setCurrentItem( mFilterKapi.findIndex(prof->getFilterInAB () ) + 1 ); | ||
515 | mFilterOutAB->setCurrentItem( mFilterKapi.findIndex(prof->getFilterOutAB () ) + 1 ); | ||
479 | 516 | ||
480 | switch ( prof->getSyncPrefs() ) { | 517 | switch ( prof->getSyncPrefs() ) { |
481 | case 0: | 518 | case 0: |
482 | loc->setChecked( true); | 519 | loc->setChecked( true); |
483 | break; | 520 | break; |
484 | case 1: | 521 | case 1: |
485 | rem->setChecked( true ); | 522 | rem->setChecked( true ); |
486 | break; | 523 | break; |
487 | case 2: | 524 | case 2: |
488 | newest->setChecked( true); | 525 | newest->setChecked( true); |
489 | break; | 526 | break; |
490 | case 3: | 527 | case 3: |
491 | ask->setChecked( true); | 528 | ask->setChecked( true); |
492 | break; | 529 | break; |
493 | case 4: | 530 | case 4: |
494 | f_loc->setChecked( true); | 531 | f_loc->setChecked( true); |
495 | break; | 532 | break; |
496 | case 5: | 533 | case 5: |
497 | f_rem->setChecked( true); | 534 | f_rem->setChecked( true); |
498 | break; | 535 | break; |
499 | case 6: | 536 | case 6: |
500 | //both->setChecked( true); | 537 | //both->setChecked( true); |
501 | break; | 538 | break; |
502 | default: | 539 | default: |
503 | break; | 540 | break; |
504 | } | 541 | } |
505 | mIsLocal->setChecked(prof->getIsLocalFileSync()) ; | 542 | mIsLocal->setChecked(prof->getIsLocalFileSync()) ; |
506 | mIsPhone->setChecked(prof->getIsPhoneSync()) ; | 543 | mIsPhone->setChecked(prof->getIsPhoneSync()) ; |
507 | mIsPi->setChecked(prof->getIsPiSync()) ; | 544 | mIsPi->setChecked(prof->getIsPiSync()) ; |
508 | mIsKapiFileL->setChecked(prof->getIsKapiFile()) ; | 545 | mIsKapiFileL->setChecked(prof->getIsKapiFile()) ; |
509 | mIsKapiFileR->setChecked(prof->getIsKapiFile()) ; | 546 | mIsKapiFileR->setChecked(prof->getIsKapiFile()) ; |
510 | 547 | ||
511 | mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() &&!prof->getIsPiSync() ); | 548 | mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() &&!prof->getIsPiSync() ); |
512 | proGr->setEnabled( item > 2 ); | 549 | proGr->setEnabled( item > 2 ); |
513 | if ( item < 3 ) { | 550 | if ( item < 3 ) { |
514 | localFileWidget->hide(); | 551 | localFileWidget->hide(); |
515 | remoteFileWidget->hide(); | 552 | remoteFileWidget->hide(); |
516 | phoneWidget->hide(); | 553 | phoneWidget->hide(); |
517 | piWidget->hide(); | 554 | piWidget->hide(); |
518 | 555 | ||
519 | } else | 556 | } else |
520 | kindChanged( prof->getIsLocalFileSync() ); | 557 | kindChanged( prof->getIsLocalFileSync() ); |
521 | } | 558 | } |
522 | 559 | ||
523 | void KSyncPrefsDialog::fillSSH() | 560 | void KSyncPrefsDialog::fillSSH() |
524 | { | 561 | { |
525 | mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); | 562 | mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); |
526 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); | 563 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); |
@@ -600,99 +637,101 @@ void KSyncPrefsDialog::saveProfile() | |||
600 | if ( currentSelection >= 0 ) { | 637 | if ( currentSelection >= 0 ) { |
601 | prof = mSyncProfiles.at(currentSelection) ; | 638 | prof = mSyncProfiles.at(currentSelection) ; |
602 | 639 | ||
603 | prof->setRemotePw( mRemotePw->text()); | 640 | prof->setRemotePw( mRemotePw->text()); |
604 | prof->setRemoteIP( mRemoteIP->text()); | 641 | prof->setRemoteIP( mRemoteIP->text()); |
605 | prof->setRemotePort( mRemotePort->text()); | 642 | prof->setRemotePort( mRemotePort->text()); |
606 | 643 | ||
607 | prof->setRemotePwAB( mRemotePwAB->text()); | 644 | prof->setRemotePwAB( mRemotePwAB->text()); |
608 | prof->setRemoteIPAB( mRemoteIPAB->text()); | 645 | prof->setRemoteIPAB( mRemoteIPAB->text()); |
609 | prof->setRemotePortAB( mRemotePortAB->text()); | 646 | prof->setRemotePortAB( mRemotePortAB->text()); |
610 | 647 | ||
611 | prof->setRemotePwPWM( mRemotePwPWM->text()); | 648 | prof->setRemotePwPWM( mRemotePwPWM->text()); |
612 | prof->setRemoteIPPWM( mRemoteIPPWM->text()); | 649 | prof->setRemoteIPPWM( mRemoteIPPWM->text()); |
613 | prof->setRemotePortPWM( mRemotePortPWM->text()); | 650 | prof->setRemotePortPWM( mRemotePortPWM->text()); |
614 | 651 | ||
615 | prof->setPreSyncCommand( mRemotePrecommand->text()); | 652 | prof->setPreSyncCommand( mRemotePrecommand->text()); |
616 | prof->setPostSyncCommand( mRemotePostcommand->text() ); | 653 | prof->setPostSyncCommand( mRemotePostcommand->text() ); |
617 | prof->setLocalTempFile( mLocalTempFile->text()); | 654 | prof->setLocalTempFile( mLocalTempFile->text()); |
618 | prof->setRemoteFileName( mRemoteFile->text() ); | 655 | prof->setRemoteFileName( mRemoteFile->text() ); |
619 | prof->setPreSyncCommandAB( mRemotePrecommandAB->text()); | 656 | prof->setPreSyncCommandAB( mRemotePrecommandAB->text()); |
620 | prof->setPostSyncCommandAB( mRemotePostcommandAB->text() ); | 657 | prof->setPostSyncCommandAB( mRemotePostcommandAB->text() ); |
621 | prof->setLocalTempFileAB( mLocalTempFileAB->text()); | 658 | prof->setLocalTempFileAB( mLocalTempFileAB->text()); |
622 | prof->setRemoteFileNameAB( mRemoteFileAB->text() ); | 659 | prof->setRemoteFileNameAB( mRemoteFileAB->text() ); |
623 | prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); | 660 | prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); |
624 | prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); | 661 | prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); |
625 | prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); | 662 | prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); |
626 | prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); | 663 | prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); |
627 | prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); | 664 | prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); |
628 | prof->setAskForPreferences( mAskForPreferences->isChecked()); | 665 | prof->setAskForPreferences( mAskForPreferences->isChecked()); |
629 | prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); | 666 | prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); |
630 | prof->setWriteBackFile( mWriteBackFile->isChecked()); | 667 | prof->setWriteBackFile( mWriteBackFile->isChecked()); |
631 | prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); | 668 | prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); |
632 | prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); | 669 | prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); |
633 | prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() ); | 670 | prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() ); |
634 | int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; | 671 | int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; |
635 | prof->setSyncPrefs( syncprefs); | 672 | prof->setSyncPrefs( syncprefs); |
636 | prof->setIsLocalFileSync( mIsLocal->isChecked() ); | 673 | prof->setIsLocalFileSync( mIsLocal->isChecked() ); |
637 | prof->setIsPhoneSync( mIsPhone->isChecked() ); | 674 | prof->setIsPhoneSync( mIsPhone->isChecked() ); |
638 | prof->setIsPiSync( mIsPi->isChecked() ); | 675 | prof->setIsPiSync( mIsPi->isChecked() ); |
639 | prof->setIsKapiFile( mIsKapiFileL->isChecked() ); | 676 | prof->setIsKapiFile( mIsKapiFileL->isChecked() ); |
640 | prof->setWriteBackFuture(mWriteBackFuture->isChecked()); | 677 | prof->setWriteBackFuture(mWriteBackFuture->isChecked()); |
641 | prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); | 678 | prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); |
642 | prof->setWriteBackPastWeeks(mWriteBackPastWeeks->value()); | 679 | prof->setWriteBackPastWeeks(mWriteBackPastWeeks->value()); |
643 | if ( mWriteContactToSIM ) | 680 | if ( mWriteContactToSIM ) |
644 | prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); | 681 | prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); |
645 | prof->setPhoneDevice( mPhoneDevice->text() ); | 682 | prof->setPhoneDevice( mPhoneDevice->text() ); |
646 | prof->setPhoneConnection( mPhoneConnection->text() ); | 683 | prof->setPhoneConnection( mPhoneConnection->text() ); |
647 | prof->setPhoneModel( mPhoneModel->text() ); | 684 | prof->setPhoneModel( mPhoneModel->text() ); |
648 | 685 | prof->setFilterInCal ( mFilterInCal->currentText ()); | |
686 | prof->setFilterOutCal ( mFilterOutCal ->currentText ()); | ||
687 | prof->setFilterInAB ( mFilterInAB ->currentText ()); | ||
688 | prof->setFilterOutAB ( mFilterOutAB ->currentText ()); | ||
649 | } | 689 | } |
650 | |||
651 | } | 690 | } |
652 | 691 | ||
653 | void KSyncPrefsDialog::insertProfiles() | 692 | void KSyncPrefsDialog::insertProfiles() |
654 | { | 693 | { |
655 | int curItem = mProfileBox->currentItem(); | 694 | int curItem = mProfileBox->currentItem(); |
656 | mProfileBox->blockSignals( true ); | 695 | mProfileBox->blockSignals( true ); |
657 | mProfileBox->clear(); | 696 | mProfileBox->clear(); |
658 | mProfileBox->insertStringList (mSyncProfileNames ); | 697 | mProfileBox->insertStringList (mSyncProfileNames ); |
659 | int item = mSyncProfileNames.count() -1; | 698 | int item = mSyncProfileNames.count() -1; |
660 | if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() ) | 699 | if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() ) |
661 | mProfileBox->setCurrentItem( curItem ); | 700 | mProfileBox->setCurrentItem( curItem ); |
662 | else if ( item >= 0 ) { | 701 | else if ( item >= 0 ) { |
663 | mProfileBox->setCurrentItem( item ); | 702 | mProfileBox->setCurrentItem( item ); |
664 | } | 703 | } |
665 | currentSelection = -1; | 704 | currentSelection = -1; |
666 | if ( mSyncProfileNames.count() > 0 ) { | 705 | if ( mSyncProfileNames.count() > 0 ) { |
667 | //qDebug(" profileChanged( mProfileBox->currentItem() "); | 706 | //qDebug(" profileChanged( mProfileBox->currentItem() "); |
668 | profileChanged( mProfileBox->currentItem() ); | 707 | profileChanged( mProfileBox->currentItem() ); |
669 | currentSelection = mProfileBox->currentItem(); | 708 | currentSelection = mProfileBox->currentItem(); |
670 | } | 709 | } |
671 | mProfileBox->blockSignals( false ); | 710 | mProfileBox->blockSignals( false ); |
672 | } | 711 | } |
673 | 712 | ||
674 | void KSyncPrefsDialog::addProfile ( KSyncProfile* temp ) | 713 | void KSyncPrefsDialog::addProfile ( KSyncProfile* temp ) |
675 | { | 714 | { |
676 | saveProfile(); | 715 | saveProfile(); |
677 | mSyncProfiles.append( temp ); | 716 | mSyncProfiles.append( temp ); |
678 | mSyncProfileNames << temp->getName(); | 717 | mSyncProfileNames << temp->getName(); |
679 | insertProfiles(); | 718 | insertProfiles(); |
680 | int last = mProfileBox->count() -1; | 719 | int last = mProfileBox->count() -1; |
681 | mProfileBox->blockSignals( true ); | 720 | mProfileBox->blockSignals( true ); |
682 | mProfileBox->setCurrentItem( last ); | 721 | mProfileBox->setCurrentItem( last ); |
683 | mProfileBox->blockSignals( false ); | 722 | mProfileBox->blockSignals( false ); |
684 | profileChanged(last); | 723 | profileChanged(last); |
685 | } | 724 | } |
686 | void KSyncPrefsDialog::newProfile() | 725 | void KSyncPrefsDialog::newProfile() |
687 | { | 726 | { |
688 | addProfile ( new KSyncProfile () ); | 727 | addProfile ( new KSyncProfile () ); |
689 | } | 728 | } |
690 | 729 | ||
691 | void KSyncPrefsDialog::cloneProfile() | 730 | void KSyncPrefsDialog::cloneProfile() |
692 | { | 731 | { |
693 | if ( currentSelection >= 0 ) | 732 | if ( currentSelection >= 0 ) |
694 | addProfile (mSyncProfiles.at(currentSelection)->clone()) ; | 733 | addProfile (mSyncProfiles.at(currentSelection)->clone()) ; |
695 | else | 734 | else |
696 | newProfile(); | 735 | newProfile(); |
697 | } | 736 | } |
698 | 737 | ||
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h index 997f524..24543e1 100644 --- a/libkdepim/ksyncprefsdialog.h +++ b/libkdepim/ksyncprefsdialog.h | |||
@@ -55,96 +55,101 @@ class KSyncPrefsDialog : public KDialog | |||
55 | void setLocalMachineName ( const QString& name ); | 55 | void setLocalMachineName ( const QString& name ); |
56 | QString getLocalMachineName ( ); | 56 | QString getLocalMachineName ( ); |
57 | 57 | ||
58 | QStringList getSyncProfileNames(); | 58 | QStringList getSyncProfileNames(); |
59 | 59 | ||
60 | public slots: | 60 | public slots: |
61 | protected slots: | 61 | protected slots: |
62 | void accept(); | 62 | void accept(); |
63 | void deleteProfile(); | 63 | void deleteProfile(); |
64 | void newProfile(); | 64 | void newProfile(); |
65 | void cloneProfile(); | 65 | void cloneProfile(); |
66 | void kindChanged(bool); | 66 | void kindChanged(bool); |
67 | void fillSSH(); | 67 | void fillSSH(); |
68 | void fillFTP(); | 68 | void fillFTP(); |
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 chooseFileAB(); |
73 | void chooseFilePWM(); | 73 | void chooseFilePWM(); |
74 | void slotOK(); | 74 | void slotOK(); |
75 | void helpDevice(); | 75 | void helpDevice(); |
76 | void helpModel(); | 76 | void helpModel(); |
77 | void helpConnection(); | 77 | void helpConnection(); |
78 | 78 | ||
79 | protected: | 79 | protected: |
80 | void usrWriteConfig(); | 80 | void usrWriteConfig(); |
81 | void setupSyncAlgTab(); | 81 | void setupSyncAlgTab(); |
82 | void readFilter(); | 82 | void readFilter(); |
83 | private: | 83 | private: |
84 | int currentSelection; | 84 | int currentSelection; |
85 | QPtrList<KSyncProfile> mSyncProfiles; | 85 | QPtrList<KSyncProfile> mSyncProfiles; |
86 | QStringList mSyncProfileNames; | 86 | QStringList mSyncProfileNames; |
87 | QStringList mFilterKapi; | 87 | QStringList mFilterKapi; |
88 | QStringList mFilterKopi; | 88 | QStringList mFilterKopi; |
89 | QLineEdit * mMyMachineName; | 89 | QLineEdit * mMyMachineName; |
90 | QComboBox * mProfileBox; | 90 | QComboBox * mProfileBox; |
91 | QRadioButton* mIsLocal; | 91 | QRadioButton* mIsLocal; |
92 | QRadioButton* mIsNotLocal; | 92 | QRadioButton* mIsNotLocal; |
93 | QRadioButton* mIsPhone; | 93 | QRadioButton* mIsPhone; |
94 | QRadioButton* mIsPi; | 94 | QRadioButton* mIsPi; |
95 | QCheckBox* mIncludeInRing; | 95 | QCheckBox* mIncludeInRing; |
96 | QCheckBox* mIncludeInRingAB; | 96 | QCheckBox* mIncludeInRingAB; |
97 | QCheckBox* mIncludeInRingPWM; | 97 | QCheckBox* mIncludeInRingPWM; |
98 | void addProfile ( KSyncProfile* ); | 98 | void addProfile ( KSyncProfile* ); |
99 | void insertProfiles(); | 99 | void insertProfiles(); |
100 | void saveProfile(); | 100 | void saveProfile(); |
101 | QButtonGroup* proGr; | 101 | QButtonGroup* proGr; |
102 | 102 | ||
103 | QComboBox * mFilterOutCal; | ||
104 | QComboBox * mFilterInCal; | ||
105 | QComboBox * mFilterOutAB; | ||
106 | QComboBox * mFilterInAB; | ||
107 | |||
103 | QRadioButton* loc, *rem, *newest, *ask, *f_loc,* f_rem, *both; | 108 | QRadioButton* loc, *rem, *newest, *ask, *f_loc,* f_rem, *both; |
104 | 109 | ||
105 | 110 | ||
106 | QLineEdit * mRemotePostcommand; | 111 | QLineEdit * mRemotePostcommand; |
107 | QLineEdit * mRemotePrecommand; | 112 | QLineEdit * mRemotePrecommand; |
108 | QLineEdit * mRemoteFile; | 113 | QLineEdit * mRemoteFile; |
109 | QLineEdit * mLocalTempFile; | 114 | QLineEdit * mLocalTempFile; |
110 | 115 | ||
111 | QLineEdit * mRemotePostcommandAB; | 116 | QLineEdit * mRemotePostcommandAB; |
112 | QLineEdit * mRemotePrecommandAB; | 117 | QLineEdit * mRemotePrecommandAB; |
113 | QLineEdit * mRemoteFileAB; | 118 | QLineEdit * mRemoteFileAB; |
114 | QLineEdit * mLocalTempFileAB; | 119 | QLineEdit * mLocalTempFileAB; |
115 | 120 | ||
116 | QLineEdit * mRemotePostcommandPWM; | 121 | QLineEdit * mRemotePostcommandPWM; |
117 | QLineEdit * mRemotePrecommandPWM; | 122 | QLineEdit * mRemotePrecommandPWM; |
118 | QLineEdit * mRemoteFilePWM; | 123 | QLineEdit * mRemoteFilePWM; |
119 | QLineEdit * mLocalTempFilePWM; | 124 | QLineEdit * mLocalTempFilePWM; |
120 | 125 | ||
121 | 126 | ||
122 | QLineEdit * mRemotePw; | 127 | QLineEdit * mRemotePw; |
123 | QLineEdit * mRemoteIP; | 128 | QLineEdit * mRemoteIP; |
124 | QLineEdit * mRemotePort; | 129 | QLineEdit * mRemotePort; |
125 | 130 | ||
126 | QLineEdit * mRemotePwAB; | 131 | QLineEdit * mRemotePwAB; |
127 | QLineEdit * mRemoteIPAB; | 132 | QLineEdit * mRemoteIPAB; |
128 | QLineEdit * mRemotePortAB; | 133 | QLineEdit * mRemotePortAB; |
129 | 134 | ||
130 | QLineEdit * mRemotePwPWM; | 135 | QLineEdit * mRemotePwPWM; |
131 | QLineEdit * mRemoteIPPWM; | 136 | QLineEdit * mRemoteIPPWM; |
132 | QLineEdit * mRemotePortPWM; | 137 | QLineEdit * mRemotePortPWM; |
133 | 138 | ||
134 | QLineEdit * mPhoneDevice; | 139 | QLineEdit * mPhoneDevice; |
135 | QLineEdit * mPhoneConnection; | 140 | QLineEdit * mPhoneConnection; |
136 | QLineEdit * mPhoneModel; | 141 | QLineEdit * mPhoneModel; |
137 | 142 | ||
138 | QWidget* mSetupSyncAlgTab; | 143 | QWidget* mSetupSyncAlgTab; |
139 | QVBox* localFileWidget; | 144 | QVBox* localFileWidget; |
140 | QVBox* remoteFileWidget; | 145 | QVBox* remoteFileWidget; |
141 | QVBox* phoneWidget; | 146 | QVBox* phoneWidget; |
142 | QVBox* piWidget; | 147 | QVBox* piWidget; |
143 | QCheckBox* mWriteBackFile; | 148 | QCheckBox* mWriteBackFile; |
144 | QCheckBox* mWriteBackFuture; | 149 | QCheckBox* mWriteBackFuture; |
145 | QSpinBox* mWriteBackFutureWeeks; | 150 | QSpinBox* mWriteBackFutureWeeks; |
146 | QSpinBox* mWriteBackPastWeeks; | 151 | QSpinBox* mWriteBackPastWeeks; |
147 | QCheckBox* mWriteBackExisting; | 152 | QCheckBox* mWriteBackExisting; |
148 | QCheckBox* mAskForPreferences; | 153 | QCheckBox* mAskForPreferences; |
149 | QCheckBox* mShowSummaryAfterSync; | 154 | QCheckBox* mShowSummaryAfterSync; |
150 | QCheckBox* mWriteContactToSIM; | 155 | QCheckBox* mWriteContactToSIM; |
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index 9f404cb..0d72fc9 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp | |||
@@ -36,221 +36,240 @@ KSyncProfile::KSyncProfile(): QObject () | |||
36 | } | 36 | } |
37 | KSyncProfile::~KSyncProfile() | 37 | KSyncProfile::~KSyncProfile() |
38 | { | 38 | { |
39 | 39 | ||
40 | } | 40 | } |
41 | 41 | ||
42 | 42 | ||
43 | KSyncProfile* KSyncProfile::clone() | 43 | KSyncProfile* KSyncProfile::clone() |
44 | { | 44 | { |
45 | KSyncProfile* myClone = new KSyncProfile(); | 45 | KSyncProfile* myClone = new KSyncProfile(); |
46 | myClone->setRemotePw(mRemotePw); | 46 | myClone->setRemotePw(mRemotePw); |
47 | myClone->setRemoteIP(mRemoteIP); | 47 | myClone->setRemoteIP(mRemoteIP); |
48 | myClone->setRemotePort(mRemotePort); | 48 | myClone->setRemotePort(mRemotePort); |
49 | myClone->setRemotePwAB(mRemotePwAB); | 49 | myClone->setRemotePwAB(mRemotePwAB); |
50 | myClone->setRemoteIPAB(mRemoteIPAB); | 50 | myClone->setRemoteIPAB(mRemoteIPAB); |
51 | myClone->setRemotePortAB(mRemotePortAB); | 51 | myClone->setRemotePortAB(mRemotePortAB); |
52 | myClone->setRemotePwPWM(mRemotePwPWM); | 52 | myClone->setRemotePwPWM(mRemotePwPWM); |
53 | myClone->setRemoteIPPWM(mRemoteIPPWM); | 53 | myClone->setRemoteIPPWM(mRemoteIPPWM); |
54 | myClone->setRemotePortPWM (mRemotePortPWM); | 54 | myClone->setRemotePortPWM (mRemotePortPWM); |
55 | myClone->setPreSyncCommand( mPreSyncCommand ); | 55 | myClone->setPreSyncCommand( mPreSyncCommand ); |
56 | myClone->setPostSyncCommand( mPostSyncCommand ); | 56 | myClone->setPostSyncCommand( mPostSyncCommand ); |
57 | myClone->setLocalTempFile( mLocalTempFile); | 57 | myClone->setLocalTempFile( mLocalTempFile); |
58 | myClone->setRemoteFileName( mRemoteFileName ); | 58 | myClone->setRemoteFileName( mRemoteFileName ); |
59 | myClone->setPreSyncCommandAB( mPreSyncCommandAB ); | 59 | myClone->setPreSyncCommandAB( mPreSyncCommandAB ); |
60 | myClone->setPostSyncCommandAB( mPostSyncCommandAB ); | 60 | myClone->setPostSyncCommandAB( mPostSyncCommandAB ); |
61 | myClone->setLocalTempFileAB( mLocalTempFileAB); | 61 | myClone->setLocalTempFileAB( mLocalTempFileAB); |
62 | myClone->setRemoteFileNameAB( mRemoteFileNameAB ); | 62 | myClone->setRemoteFileNameAB( mRemoteFileNameAB ); |
63 | myClone->setPreSyncCommandPWM( mPreSyncCommandPWM ); | 63 | myClone->setPreSyncCommandPWM( mPreSyncCommandPWM ); |
64 | myClone->setPostSyncCommandPWM( mPostSyncCommandPWM ); | 64 | myClone->setPostSyncCommandPWM( mPostSyncCommandPWM ); |
65 | myClone->setLocalTempFilePWM( mLocalTempFilePWM); | 65 | myClone->setLocalTempFilePWM( mLocalTempFilePWM); |
66 | myClone->setRemoteFileNamePWM( mRemoteFileNamePWM ); | 66 | myClone->setRemoteFileNamePWM( mRemoteFileNamePWM ); |
67 | myClone->setShowSummaryAfterSync( mShowSummaryAfterSync ); | 67 | myClone->setShowSummaryAfterSync( mShowSummaryAfterSync ); |
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 | ||
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"); |
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"); |
100 | mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device"); | 104 | mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device"); |
101 | mLocalTempFilePWM = "/tmp/passwords.pwm"; | 105 | mLocalTempFilePWM = "/tmp/passwords.pwm"; |
102 | mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm"; | 106 | mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm"; |
103 | 107 | ||
104 | mRemotePw = "abc"; | 108 | mRemotePw = "abc"; |
105 | mRemoteIP = "192.168.0.99"; | 109 | mRemoteIP = "192.168.0.99"; |
106 | mRemotePort = "9197"; | 110 | mRemotePort = "9197"; |
107 | 111 | ||
108 | mRemotePwAB = "abc"; | 112 | mRemotePwAB = "abc"; |
109 | mRemoteIPAB = "192.168.0.99"; | 113 | mRemoteIPAB = "192.168.0.99"; |
110 | mRemotePortAB = "9198"; | 114 | mRemotePortAB = "9198"; |
111 | 115 | ||
112 | mRemotePwPWM = "abc"; | 116 | mRemotePwPWM = "abc"; |
113 | mRemoteIPPWM = "192.168.0.99"; | 117 | mRemoteIPPWM = "192.168.0.99"; |
114 | mRemotePortPWM = "9199"; | 118 | mRemotePortPWM = "9199"; |
115 | 119 | ||
116 | mShowSummaryAfterSync = true; | 120 | mShowSummaryAfterSync = true; |
117 | mAskForPreferences = true; | 121 | mAskForPreferences = true; |
118 | mWriteBackExisting = false; | 122 | mWriteBackExisting = false; |
119 | mWriteBackFuture = false; | 123 | mWriteBackFuture = false; |
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 | } |
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 ); |
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 ); |
152 | mRemotePwPWM = config->readEntry( "RemotePwPWM", mRemotePwPWM ); | 160 | mRemotePwPWM = config->readEntry( "RemotePwPWM", mRemotePwPWM ); |
153 | mRemoteIPPWM = config->readEntry( "RemoteIPPWM", mRemoteIPPWM ); | 161 | mRemoteIPPWM = config->readEntry( "RemoteIPPWM", mRemoteIPPWM ); |
154 | mRemotePortPWM = config->readEntry( "RemotePortPWM", mRemotePortPWM ); | 162 | mRemotePortPWM = config->readEntry( "RemotePortPWM", mRemotePortPWM ); |
155 | 163 | ||
156 | mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand ); | 164 | mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand ); |
157 | mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand ); | 165 | mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand ); |
158 | mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile ); | 166 | mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile ); |
159 | mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName ); | 167 | mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName ); |
160 | 168 | ||
161 | mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB ); | 169 | mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB ); |
162 | mPostSyncCommandAB = config->readEntry( "PostSyncCommandAB", mPostSyncCommandAB ); | 170 | mPostSyncCommandAB = config->readEntry( "PostSyncCommandAB", mPostSyncCommandAB ); |
163 | mLocalTempFileAB = config->readEntry( "LocalTempFileAB", mLocalTempFileAB ); | 171 | mLocalTempFileAB = config->readEntry( "LocalTempFileAB", mLocalTempFileAB ); |
164 | mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB ); | 172 | mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB ); |
165 | 173 | ||
166 | mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); | 174 | mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); |
167 | mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); | 175 | mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); |
168 | mLocalTempFilePWM = config->readEntry( "LocalTempFilePWM", mLocalTempFilePWM ); | 176 | mLocalTempFilePWM = config->readEntry( "LocalTempFilePWM", mLocalTempFilePWM ); |
169 | mRemoteFileNamePWM = config->readEntry( "RemoteFileNamePWM", mRemoteFileNamePWM ); | 177 | mRemoteFileNamePWM = config->readEntry( "RemoteFileNamePWM", mRemoteFileNamePWM ); |
170 | 178 | ||
171 | mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice ); | 179 | mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice ); |
172 | mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection ); | 180 | mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection ); |
173 | mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel ); | 181 | mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel ); |
174 | 182 | ||
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 | ||
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 | ||
203 | void KSyncProfile::writeConfig( KConfig * config ) | 217 | void KSyncProfile::writeConfig( KConfig * config ) |
204 | { | 218 | { |
205 | config->setGroup(mName); | 219 | config->setGroup(mName); |
206 | 220 | ||
207 | config->writeEntry( "RemotePw", mRemotePw); | 221 | config->writeEntry( "RemotePw", mRemotePw); |
208 | config->writeEntry( "RemoteIP", mRemoteIP); | 222 | config->writeEntry( "RemoteIP", mRemoteIP); |
209 | config->writeEntry( "RemotePort", mRemotePort); | 223 | config->writeEntry( "RemotePort", mRemotePort); |
210 | 224 | ||
211 | config->writeEntry( "RemotePwAB", mRemotePwAB); | 225 | config->writeEntry( "RemotePwAB", mRemotePwAB); |
212 | config->writeEntry( "RemoteIPAB", mRemoteIPAB); | 226 | config->writeEntry( "RemoteIPAB", mRemoteIPAB); |
213 | config->writeEntry( "RemotePortAB", mRemotePortAB); | 227 | config->writeEntry( "RemotePortAB", mRemotePortAB); |
214 | 228 | ||
215 | config->writeEntry( "RemotePwPWM", mRemotePwPWM); | 229 | config->writeEntry( "RemotePwPWM", mRemotePwPWM); |
216 | config->writeEntry( "RemoteIPPWM", mRemoteIPPWM); | 230 | config->writeEntry( "RemoteIPPWM", mRemoteIPPWM); |
217 | config->writeEntry( "RemotePortPWM", mRemotePortPWM); | 231 | config->writeEntry( "RemotePortPWM", mRemotePortPWM); |
218 | 232 | ||
219 | config->writeEntry( "Name", mName ); | 233 | config->writeEntry( "Name", mName ); |
220 | config->writeEntry( "PreSyncCommand",mPreSyncCommand ); | 234 | config->writeEntry( "PreSyncCommand",mPreSyncCommand ); |
221 | config->writeEntry( "PostSyncCommand", mPostSyncCommand ); | 235 | config->writeEntry( "PostSyncCommand", mPostSyncCommand ); |
222 | config->writeEntry( "LocalTempFile", mLocalTempFile ); | 236 | config->writeEntry( "LocalTempFile", mLocalTempFile ); |
223 | config->writeEntry( "RemoteFileName", mRemoteFileName ); | 237 | config->writeEntry( "RemoteFileName", mRemoteFileName ); |
224 | 238 | ||
225 | config->writeEntry( "PreSyncCommandAB",mPreSyncCommandAB ); | 239 | config->writeEntry( "PreSyncCommandAB",mPreSyncCommandAB ); |
226 | config->writeEntry( "PostSyncCommandAB", mPostSyncCommandAB ); | 240 | config->writeEntry( "PostSyncCommandAB", mPostSyncCommandAB ); |
227 | config->writeEntry( "LocalTempFileAB", mLocalTempFileAB ); | 241 | config->writeEntry( "LocalTempFileAB", mLocalTempFileAB ); |
228 | config->writeEntry( "RemoteFileNameAB", mRemoteFileNameAB ); | 242 | config->writeEntry( "RemoteFileNameAB", mRemoteFileNameAB ); |
229 | 243 | ||
230 | config->writeEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); | 244 | config->writeEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); |
231 | config->writeEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); | 245 | config->writeEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); |
232 | config->writeEntry( "LocalTempFilePWM", mLocalTempFilePWM ); | 246 | config->writeEntry( "LocalTempFilePWM", mLocalTempFilePWM ); |
233 | config->writeEntry( "RemoteFileNamePWM", mRemoteFileNamePWM ); | 247 | config->writeEntry( "RemoteFileNamePWM", mRemoteFileNamePWM ); |
234 | 248 | ||
235 | config->writeEntry( "PhoneDevice", mPhoneDevice ); | 249 | config->writeEntry( "PhoneDevice", mPhoneDevice ); |
236 | config->writeEntry( "PhoneConnection", mPhoneConnection ); | 250 | config->writeEntry( "PhoneConnection", mPhoneConnection ); |
237 | config->writeEntry( "PhoneModel", mPhoneModel ); | 251 | config->writeEntry( "PhoneModel", mPhoneModel ); |
238 | 252 | ||
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 | ||
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h index e970b50..aad63d3 100644 --- a/libkdepim/ksyncprofile.h +++ b/libkdepim/ksyncprofile.h | |||
@@ -59,133 +59,147 @@ class KSyncProfile : public QObject { | |||
59 | void setRemoteIPPWM( const QString& n ) {mRemoteIPPWM = n;} | 59 | void setRemoteIPPWM( const QString& n ) {mRemoteIPPWM = n;} |
60 | QString getRemoteIPPWM( ) { return mRemoteIPPWM; } | 60 | QString getRemoteIPPWM( ) { return mRemoteIPPWM; } |
61 | 61 | ||
62 | void setRemotePort( const QString& n ) {mRemotePort = n;} | 62 | void setRemotePort( const QString& n ) {mRemotePort = n;} |
63 | QString getRemotePort( ) { return mRemotePort; } | 63 | QString getRemotePort( ) { return mRemotePort; } |
64 | void setRemotePortAB( const QString& n ) {mRemotePortAB = n;} | 64 | void setRemotePortAB( const QString& n ) {mRemotePortAB = n;} |
65 | QString getRemotePortAB( ) { return mRemotePortAB; } | 65 | QString getRemotePortAB( ) { return mRemotePortAB; } |
66 | void setRemotePortPWM( const QString& n ) {mRemotePortPWM = n;} | 66 | void setRemotePortPWM( const QString& n ) {mRemotePortPWM = n;} |
67 | QString getRemotePortPWM( ) { return mRemotePortPWM; } | 67 | QString getRemotePortPWM( ) { return mRemotePortPWM; } |
68 | 68 | ||
69 | void setPreSyncCommand( const QString& n ) {mPreSyncCommand = n;} | 69 | void setPreSyncCommand( const QString& n ) {mPreSyncCommand = n;} |
70 | QString getPreSyncCommand( ) { return mPreSyncCommand; } | 70 | QString getPreSyncCommand( ) { return mPreSyncCommand; } |
71 | void setPostSyncCommand( const QString& n ) {mPostSyncCommand = n;} | 71 | void setPostSyncCommand( const QString& n ) {mPostSyncCommand = n;} |
72 | QString getPostSyncCommand( ) { return mPostSyncCommand;} | 72 | QString getPostSyncCommand( ) { return mPostSyncCommand;} |
73 | void setLocalTempFile( const QString& n ) { mLocalTempFile= n;} | 73 | void setLocalTempFile( const QString& n ) { mLocalTempFile= n;} |
74 | QString getLocalTempFile( ) { return mLocalTempFile;} | 74 | QString getLocalTempFile( ) { return mLocalTempFile;} |
75 | void setRemoteFileName( const QString& n ) { mRemoteFileName = n;} | 75 | void setRemoteFileName( const QString& n ) { mRemoteFileName = n;} |
76 | QString getRemoteFileName( ) { return mRemoteFileName;} | 76 | QString getRemoteFileName( ) { return mRemoteFileName;} |
77 | 77 | ||
78 | void setPreSyncCommandAB( const QString& n ) {mPreSyncCommandAB = n;} | 78 | void setPreSyncCommandAB( const QString& n ) {mPreSyncCommandAB = n;} |
79 | QString getPreSyncCommandAB( ) { return mPreSyncCommandAB; } | 79 | QString getPreSyncCommandAB( ) { return mPreSyncCommandAB; } |
80 | void setPostSyncCommandAB( const QString& n ) {mPostSyncCommandAB = n;} | 80 | void setPostSyncCommandAB( const QString& n ) {mPostSyncCommandAB = n;} |
81 | QString getPostSyncCommandAB( ) { return mPostSyncCommandAB;} | 81 | QString getPostSyncCommandAB( ) { return mPostSyncCommandAB;} |
82 | void setLocalTempFileAB( const QString& n ) { mLocalTempFileAB= n;} | 82 | void setLocalTempFileAB( const QString& n ) { mLocalTempFileAB= n;} |
83 | QString getLocalTempFileAB( ) { return mLocalTempFileAB;} | 83 | QString getLocalTempFileAB( ) { return mLocalTempFileAB;} |
84 | void setRemoteFileNameAB( const QString& n ) { mRemoteFileNameAB = n;} | 84 | void setRemoteFileNameAB( const QString& n ) { mRemoteFileNameAB = n;} |
85 | QString getRemoteFileNameAB( ) { return mRemoteFileNameAB;} | 85 | QString getRemoteFileNameAB( ) { return mRemoteFileNameAB;} |
86 | 86 | ||
87 | void setPreSyncCommandPWM( const QString& n ) {mPreSyncCommandPWM = n;} | 87 | void setPreSyncCommandPWM( const QString& n ) {mPreSyncCommandPWM = n;} |
88 | QString getPreSyncCommandPWM( ) { return mPreSyncCommandPWM; } | 88 | QString getPreSyncCommandPWM( ) { return mPreSyncCommandPWM; } |
89 | void setPostSyncCommandPWM( const QString& n ) {mPostSyncCommandPWM = n;} | 89 | void setPostSyncCommandPWM( const QString& n ) {mPostSyncCommandPWM = n;} |
90 | QString getPostSyncCommandPWM( ) { return mPostSyncCommandPWM;} | 90 | QString getPostSyncCommandPWM( ) { return mPostSyncCommandPWM;} |
91 | void setLocalTempFilePWM( const QString& n ) { mLocalTempFilePWM= n;} | 91 | void setLocalTempFilePWM( const QString& n ) { mLocalTempFilePWM= n;} |
92 | QString getLocalTempFilePWM( ) { return mLocalTempFilePWM;} | 92 | QString getLocalTempFilePWM( ) { return mLocalTempFilePWM;} |
93 | void setRemoteFileNamePWM( const QString& n ) { mRemoteFileNamePWM = n;} | 93 | void setRemoteFileNamePWM( const QString& n ) { mRemoteFileNamePWM = n;} |
94 | QString getRemoteFileNamePWM( ) { return mRemoteFileNamePWM;} | 94 | QString getRemoteFileNamePWM( ) { return mRemoteFileNamePWM;} |
95 | 95 | ||
96 | void setPhoneDevice( const QString& n ) { mPhoneDevice = n;} | 96 | void setPhoneDevice( const QString& n ) { mPhoneDevice = n;} |
97 | QString getPhoneDevice( ) { return mPhoneDevice;} | 97 | QString getPhoneDevice( ) { return mPhoneDevice;} |
98 | void setPhoneConnection( const QString& n ) { mPhoneConnection = n;} | 98 | void setPhoneConnection( const QString& n ) { mPhoneConnection = n;} |
99 | QString getPhoneConnection( ) { return mPhoneConnection;} | 99 | QString getPhoneConnection( ) { return mPhoneConnection;} |
100 | void setPhoneModel( const QString& n ) { mPhoneModel = n;} | 100 | void setPhoneModel( const QString& n ) { mPhoneModel = n;} |
101 | QString getPhoneModel( ) { return mPhoneModel;} | 101 | QString getPhoneModel( ) { return mPhoneModel;} |
102 | /* | 102 | /* |
103 | void set( const QString& n ) { = n;} | 103 | void set( const QString& n ) { = n;} |
104 | QString get( ) { return ;} | 104 | QString get( ) { return ;} |
105 | */ | 105 | */ |
106 | 106 | ||
107 | void setFilterInCal (const QString& n ){ mFilterInCal = n;} | ||
108 | void setFilterOutCal (const QString& n ){ mFilterOutCal = n;} | ||
109 | void setFilterInAB (const QString& n ){ mFilterInAB = n;} | ||
110 | void setFilterOutAB (const QString& n ){ mFilterOutAB = n;} | ||
111 | QString getFilterInCal () { return mFilterInCal ;} | ||
112 | QString getFilterOutCal () { return mFilterOutCal ;} | ||
113 | QString getFilterInAB () { return mFilterInAB ;} | ||
114 | QString getFilterOutAB () { return mFilterOutAB ;} | ||
115 | |||
107 | void setName( const QString& n ) {mName = n;} | 116 | void setName( const QString& n ) {mName = n;} |
108 | QString getName( ) { return mName;} | 117 | QString getName( ) { return mName;} |
109 | void setShowSummaryAfterSync( bool b ) { mShowSummaryAfterSync = b;} | 118 | void setShowSummaryAfterSync( bool b ) { mShowSummaryAfterSync = b;} |
110 | bool getShowSummaryAfterSync( ) { return mShowSummaryAfterSync ;} | 119 | bool getShowSummaryAfterSync( ) { return mShowSummaryAfterSync ;} |
111 | void setAskForPreferences( bool b ) { mAskForPreferences= b;} | 120 | void setAskForPreferences( bool b ) { mAskForPreferences= b;} |
112 | bool getAskForPreferences( ) { return mAskForPreferences;} | 121 | bool getAskForPreferences( ) { return mAskForPreferences;} |
113 | void setWriteBackExisting( bool b ) { mWriteBackExisting = b;} | 122 | void setWriteBackExisting( bool b ) { mWriteBackExisting = b;} |
114 | bool getWriteBackExisting( ) { return mWriteBackExisting;} | 123 | bool getWriteBackExisting( ) { return mWriteBackExisting;} |
115 | void setWriteBackFuture( bool b ) { mWriteBackFuture = b;} | 124 | void setWriteBackFuture( bool b ) { mWriteBackFuture = b;} |
116 | bool getWriteBackFuture( ) { return mWriteBackFuture;} | 125 | bool getWriteBackFuture( ) { return mWriteBackFuture;} |
117 | void setWriteBackFile( bool b ) { mWriteBackFile= b;} | 126 | void setWriteBackFile( bool b ) { mWriteBackFile= b;} |
118 | bool getWriteBackFile( ) { return mWriteBackFile;} | 127 | bool getWriteBackFile( ) { return mWriteBackFile;} |
119 | void setWriteContactToSIM( bool b ) { mWriteContactToSIM= b;} | 128 | void setWriteContactToSIM( bool b ) { mWriteContactToSIM= b;} |
120 | bool getWriteContactToSIM( ) { return mWriteContactToSIM;} | 129 | bool getWriteContactToSIM( ) { return mWriteContactToSIM;} |
121 | void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;} | 130 | void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;} |
122 | bool getIncludeInRingSync( ) { return mIncludeInRingSync;} | 131 | bool getIncludeInRingSync( ) { return mIncludeInRingSync;} |
123 | void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;} | 132 | void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;} |
124 | bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;} | 133 | bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;} |
125 | void setIncludeInRingSyncPWM( bool b ) {mIncludeInRingSyncPWM = b;} | 134 | void setIncludeInRingSyncPWM( bool b ) {mIncludeInRingSyncPWM = b;} |
126 | bool getIncludeInRingSyncPWM( ) { return mIncludeInRingSyncPWM;} | 135 | bool getIncludeInRingSyncPWM( ) { return mIncludeInRingSyncPWM;} |
127 | void setSyncPrefs( int n ) { mSyncPrefs= n;} | 136 | void setSyncPrefs( int n ) { mSyncPrefs= n;} |
128 | int getSyncPrefs( ) { return mSyncPrefs;} | 137 | int getSyncPrefs( ) { return mSyncPrefs;} |
129 | void setWriteBackFutureWeeks( int n ) { mWriteBackFutureWeeks= n;} | 138 | void setWriteBackFutureWeeks( int n ) { mWriteBackFutureWeeks= n;} |
130 | int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;} | 139 | int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;} |
131 | void setWriteBackPastWeeks( int n ) { mWriteBackPastWeeks= n;} | 140 | void setWriteBackPastWeeks( int n ) { mWriteBackPastWeeks= n;} |
132 | int getWriteBackPastWeeks( ) { return mWriteBackPastWeeks;} | 141 | int getWriteBackPastWeeks( ) { return mWriteBackPastWeeks;} |
133 | void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;} | 142 | void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;} |
134 | bool getIsLocalFileSync( ) { return mIsLocalFileSync;} | 143 | bool getIsLocalFileSync( ) { return mIsLocalFileSync;} |
135 | void setIsPhoneSync( bool b ) { mIsPhoneSync= b;} | 144 | void setIsPhoneSync( bool b ) { mIsPhoneSync= b;} |
136 | bool getIsPhoneSync( ) { return mIsPhoneSync;} | 145 | bool getIsPhoneSync( ) { return mIsPhoneSync;} |
137 | void setIsPiSync( bool b ) { mIsPiSync= b;} | 146 | void setIsPiSync( bool b ) { mIsPiSync= b;} |
138 | bool getIsPiSync( ) { return mIsPiSync;} | 147 | bool getIsPiSync( ) { return mIsPiSync;} |
139 | void setIsKapiFile( bool b ) { mIsKapiFile= b;} | 148 | void setIsKapiFile( bool b ) { mIsKapiFile= b;} |
140 | bool getIsKapiFile( ) { return mIsKapiFile;} | 149 | bool getIsKapiFile( ) { return mIsKapiFile;} |
141 | private: | 150 | private: |
142 | QString mName; | 151 | QString mName; |
143 | QString mPreSyncCommand; | 152 | QString mPreSyncCommand; |
144 | QString mPostSyncCommand; | 153 | QString mPostSyncCommand; |
145 | QString mLocalTempFile; | 154 | QString mLocalTempFile; |
146 | QString mRemoteFileName; | 155 | QString mRemoteFileName; |
147 | QString mPreSyncCommandAB; | 156 | QString mPreSyncCommandAB; |
148 | QString mPostSyncCommandAB; | 157 | QString mPostSyncCommandAB; |
149 | QString mLocalTempFileAB; | 158 | QString mLocalTempFileAB; |
150 | QString mRemoteFileNameAB; | 159 | QString mRemoteFileNameAB; |
151 | QString mPreSyncCommandPWM; | 160 | QString mPreSyncCommandPWM; |
152 | QString mPostSyncCommandPWM; | 161 | QString mPostSyncCommandPWM; |
153 | QString mLocalTempFilePWM; | 162 | QString mLocalTempFilePWM; |
154 | QString mRemoteFileNamePWM; | 163 | QString mRemoteFileNamePWM; |
155 | 164 | ||
156 | QString mRemotePw; | 165 | QString mRemotePw; |
157 | QString mRemoteIP; | 166 | QString mRemoteIP; |
158 | QString mRemotePort; | 167 | QString mRemotePort; |
159 | 168 | ||
160 | QString mRemotePwAB; | 169 | QString mRemotePwAB; |
161 | QString mRemoteIPAB; | 170 | QString mRemoteIPAB; |
162 | QString mRemotePortAB; | 171 | QString mRemotePortAB; |
163 | 172 | ||
164 | QString mRemotePwPWM; | 173 | QString mRemotePwPWM; |
165 | QString mRemoteIPPWM; | 174 | QString mRemoteIPPWM; |
166 | QString mRemotePortPWM; | 175 | QString mRemotePortPWM; |
167 | 176 | ||
168 | QString mPhoneDevice; | 177 | QString mPhoneDevice; |
169 | QString mPhoneConnection; | 178 | QString mPhoneConnection; |
170 | QString mPhoneModel; | 179 | QString mPhoneModel; |
171 | 180 | ||
181 | QString mFilterInCal; | ||
182 | QString mFilterOutCal; | ||
183 | QString mFilterInAB; | ||
184 | QString mFilterOutAB; | ||
185 | |||
172 | bool mIncludeInRingSync; | 186 | bool mIncludeInRingSync; |
173 | bool mIncludeInRingSyncAB; | 187 | bool mIncludeInRingSyncAB; |
174 | bool mIncludeInRingSyncPWM; | 188 | bool mIncludeInRingSyncPWM; |
175 | int mSyncPrefs; | 189 | int mSyncPrefs; |
176 | bool mWriteBackFile; | 190 | bool mWriteBackFile; |
177 | bool mWriteBackExisting; | 191 | bool mWriteBackExisting; |
178 | bool mWriteBackFuture; | 192 | bool mWriteBackFuture; |
179 | int mWriteBackFutureWeeks; | 193 | int mWriteBackFutureWeeks; |
180 | int mWriteBackPastWeeks; | 194 | int mWriteBackPastWeeks; |
181 | bool mAskForPreferences; | 195 | bool mAskForPreferences; |
182 | bool mShowSummaryAfterSync; | 196 | bool mShowSummaryAfterSync; |
183 | bool mIsLocalFileSync; | 197 | bool mIsLocalFileSync; |
184 | bool mIsPhoneSync; | 198 | bool mIsPhoneSync; |
185 | bool mWriteContactToSIM; | 199 | bool mWriteContactToSIM; |
186 | 200 | ||
187 | bool mIsPiSync; | 201 | bool mIsPiSync; |
188 | bool mIsKapiFile; | 202 | bool mIsKapiFile; |
189 | }; | 203 | }; |
190 | 204 | ||
191 | #endif | 205 | #endif |