summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kcmconfigs/kabconfigwidget.cpp
Side-by-side diff
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
};
-KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *name )
+ : KPrefsWidget( prefs, parent, name )
{
QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
KDialog::spacingHint() );
@@ -173,10 +173,9 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name )
}
-
-void KABConfigWidget::restoreSettings(KABPrefs* prefs)
+void KABConfigWidget::usrReadConfig()
{
-//US prefs was KABPrefs::instance() before
+ KABPrefs* prefs = KABPrefs::instance();
bool blocked = signalsBlocked();
blockSignals( true );
@@ -193,11 +192,12 @@ void KABConfigWidget::restoreSettings(KABPrefs* prefs)
blockSignals( blocked );
- emit changed( false );
}
-void KABConfigWidget::saveSettings(KABPrefs* prefs)
+void KABConfigWidget::usrWriteConfig()
{
+ KABPrefs* prefs = KABPrefs::instance();
+
prefs->mAutomaticNameParsing = mNameParsing->isChecked();
prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked();
prefs->mSearchWithReturn = mSearchReturnBox->isChecked();
@@ -207,25 +207,7 @@ void KABConfigWidget::saveSettings(KABPrefs* prefs)
mAddresseeWidget->saveSettings();
saveExtensionSettings();
- KABPrefs::instance()->writeConfig();
- emit changed( false );
-}
-
-void KABConfigWidget::defaults(KABPrefs* prefs)
-{
- mNameParsing->setChecked( true );
- mViewsSingleClickBox->setChecked( false );
- mMultipleViewsAtOnce->setChecked( true );
- mSearchReturnBox->setChecked( true );
- mAskForQuit->setChecked (true);
-
- emit changed( true );
-}
-
-void KABConfigWidget::modified()
-{
- emit changed( true );
}
void KABConfigWidget::restoreExtensionSettings()