summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kcmconfigs/kabconfigwidget.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kcmconfigs/kabconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.cpp32
1 files changed, 7 insertions, 25 deletions
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
index 0c3a199..e970c3d 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
@@ -85,8 +85,8 @@ class ExtensionItem : public QCheckListItem
85 85
86}; 86};
87 87
88KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name ) 88KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *name )
89 : QWidget( parent, name ) 89 : KPrefsWidget( prefs, parent, name )
90{ 90{
91 QVBoxLayout *topLayout = new QVBoxLayout( this, 0, 91 QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
92 KDialog::spacingHint() ); 92 KDialog::spacingHint() );
@@ -173,10 +173,9 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name )
173 173
174} 174}
175 175
176 176void KABConfigWidget::usrReadConfig()
177void KABConfigWidget::restoreSettings(KABPrefs* prefs)
178{ 177{
179//US prefs was KABPrefs::instance() before 178 KABPrefs* prefs = KABPrefs::instance();
180 179
181 bool blocked = signalsBlocked(); 180 bool blocked = signalsBlocked();
182 blockSignals( true ); 181 blockSignals( true );
@@ -193,11 +192,12 @@ void KABConfigWidget::restoreSettings(KABPrefs* prefs)
193 192
194 blockSignals( blocked ); 193 blockSignals( blocked );
195 194
196 emit changed( false );
197} 195}
198 196
199void KABConfigWidget::saveSettings(KABPrefs* prefs) 197void KABConfigWidget::usrWriteConfig()
200{ 198{
199 KABPrefs* prefs = KABPrefs::instance();
200
201 prefs->mAutomaticNameParsing = mNameParsing->isChecked(); 201 prefs->mAutomaticNameParsing = mNameParsing->isChecked();
202 prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); 202 prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked();
203 prefs->mSearchWithReturn = mSearchReturnBox->isChecked(); 203 prefs->mSearchWithReturn = mSearchReturnBox->isChecked();
@@ -207,25 +207,7 @@ void KABConfigWidget::saveSettings(KABPrefs* prefs)
207 mAddresseeWidget->saveSettings(); 207 mAddresseeWidget->saveSettings();
208 208
209 saveExtensionSettings(); 209 saveExtensionSettings();
210 KABPrefs::instance()->writeConfig();
211 210
212 emit changed( false );
213}
214
215void KABConfigWidget::defaults(KABPrefs* prefs)
216{
217 mNameParsing->setChecked( true );
218 mViewsSingleClickBox->setChecked( false );
219 mMultipleViewsAtOnce->setChecked( true );
220 mSearchReturnBox->setChecked( true );
221 mAskForQuit->setChecked (true);
222
223 emit changed( true );
224}
225
226void KABConfigWidget::modified()
227{
228 emit changed( true );
229} 211}
230 212
231void KABConfigWidget::restoreExtensionSettings() 213void KABConfigWidget::restoreExtensionSettings()