author | zautrix <zautrix> | 2005-01-14 21:17:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-14 21:17:00 (UTC) |
commit | ee9df90c4898f4ed624be2d4e94918fcc80060e9 (patch) (unidiff) | |
tree | d15e5e2e7fd4120d09fdda2ab4331ade67082e84 /libkdepim/ksyncprefsdialog.cpp | |
parent | 620f8de219ee34c209960f02c8296c0568dd5d8b (diff) | |
download | kdepimpi-ee9df90c4898f4ed624be2d4e94918fcc80060e9.zip kdepimpi-ee9df90c4898f4ed624be2d4e94918fcc80060e9.tar.gz kdepimpi-ee9df90c4898f4ed624be2d4e94918fcc80060e9.tar.bz2 |
sync settings
Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 45 |
1 files changed, 42 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 | |||
@@ -158,8 +158,11 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
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); |
@@ -176,8 +179,16 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
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 | ||
@@ -186,8 +197,15 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
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); |
@@ -201,8 +219,9 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
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 | } |
@@ -353,9 +372,21 @@ void KSyncPrefsDialog::readFilter() | |||
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() |
@@ -429,8 +460,9 @@ 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()); |
@@ -475,8 +507,13 @@ void KSyncPrefsDialog::profileChanged( int item ) | |||
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); |
@@ -644,11 +681,13 @@ void KSyncPrefsDialog::saveProfile() | |||
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 | { |