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 | |||
@@ -161,2 +161,5 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
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 ); |
@@ -179,2 +182,10 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
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 ); |
@@ -189,2 +200,9 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
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); |
@@ -204,2 +222,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
204 | gb3->setEnabled( false ); | 222 | gb3->setEnabled( false ); |
223 | connect ( mWriteBackExisting, SIGNAL( toggled ( bool ) ), gb4, SLOT ( setDisabled ( bool ) ) ); | ||
205 | } | 224 | } |
@@ -356,3 +375,15 @@ void KSyncPrefsDialog::readFilter() | |||
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 | } |
@@ -432,2 +463,3 @@ void KSyncPrefsDialog::profileChanged( int item ) | |||
432 | saveProfile(); | 463 | saveProfile(); |
464 | readFilter(); | ||
433 | currentSelection = item; | 465 | currentSelection = item; |
@@ -478,2 +510,7 @@ void KSyncPrefsDialog::profileChanged( int item ) | |||
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 | ||
@@ -647,5 +684,7 @@ void KSyncPrefsDialog::saveProfile() | |||
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 | } |